Page 1 of 1

Python: Could that work?

Posted: Fri Sep 19, 2014 03:28 am
by BEAST
I'm going to ask a small programming question. I know that Transfusion is lacking in coders, and Quake C is a hard language to learn, but what if another language could be used in compatibility with Quake C?

I've learned that Python is the easiest programming language to learn, and that it can be made compatible with programs written in C++. Could Python be used in compatibility with Transfusion to make it more flexible?

I know the answer may be no, but if is, I'd like to know why.

What kind of programming would be needed to get the animations and the gameplay working just right?

Re: Python: Could that work?

Posted: Fri Sep 19, 2014 07:57 am
by N0t_mINe
BEAST, you deserve an answer by someone with far greater know how than what I have. Years of asking questions like the one you've just posed have left me with a passing familiarity with some of the issues involved however, so allow me to say this:

darkplaces is based on the quake engine as I'm sure you' are aware. Quake was hard wired to use a C like language called quakeC (really just the C language with a different syntax). The problem is that coders have been learning a more powerful language called c++ for over 20 years now and hardly anyone learns plain old C anymore. As you've already guessed from the context Ive been hinting at, the two languages are largely incompatible.

Python is a scripting language. Scripting languages are designed to take advantage of hard code that's already written into the game, you really can't use script to put something in that isn't there. The doom port zdoom for example was just hard coded to have a vampire attack. Of course You wouldn't know this playing regular doom on the port because there is no monster that uses that code in the regular game, a scriptor has to come along and modify a monster to use said code.

MONSTER: LOST SOUL
ATTACK: VAMPIRE
DAMAGE: 10 PT PER SEC
LOCOMOTION: FLIGHT
SPEED:22

etc. etc.

The above isn't real DECORATE btw. it's just there to give you an idea. People have been asking the darkplaces devs to add a scripting language for years. To my knowledge it never got one.

Re: Python: Could that work?

Posted: Tue Sep 23, 2014 03:12 am
by N0t_mINe
I just answered the f••• out of that question!

Re: Python: Could that work?

Posted: Sat Sep 27, 2014 10:55 pm
by BEAST
N0t_mINe wrote:I just answered the f••• out of that question!
I did read it! I did read it! Sorry, I took too long to respond to thank you. I wish some of the Transfusion veterans had participated too, but your answer has satisfied me.

But what if a new scripting language could be added to Dark Places, or if Dark Places modders made one on their own without Lord Havoc?

Re: Python: Could that work?

Posted: Sun Sep 28, 2014 01:47 am
by N0t_mINe
BEAST wrote:
N0t_mINe wrote:I just answered the f••• out of that question!
I did read it! I did read it! Sorry, I took too long to respond to thank you. I wish some of the Transfusion veterans had participated too, but your answer has satisfied me.


Point taken and you were right to make it btw. It would be great to see some if the old hands pop in, take a load off, and sit a spell. At the end if the day I'm just a guy who reads too much doom wiki tbh.
BEAST wrote: But what if a new scripting language could be added to Dark Places, or if Dark Places modders made one on their own without Lord
Havoc?
Heh, Dp is gpl'ed so there's nothing stoping a coder from creating their own fork of dp with scripting. There is a strong cultural element to this argument though, check out this thread I dug up on google.

http://quakeone.com/forums/quake-help/s ... uakec.html

I think these folks both have good points btw, but like you, I have a
single-player-first outlook on the situation,
so I support scripting.

Re: Python: Could that work?

Posted: Sun Sep 28, 2014 07:09 am
by Tchernobog
N0t_mINe wrote:At the end if the day I'm just a guy who reads too much doom wiki tbh.
You mean you have been cheating on us with another wiki? :P

Re: Python: Could that work?

Posted: Mon Sep 29, 2014 12:57 am
by N0t_mINe
@Tcherno:

I just read it for the technical articles, I swear!

Re: Python: Could that work?

Posted: Mon Sep 29, 2014 05:15 am
by Tchernobog
N0t_mINe wrote:I just read it for the technical articles, I swear!
Now you have gotten me concerned for whatever else is on there... :shock:

In all seriousness, I am dragging this thread hopelessly off topic. Carry on people. :oops: