Python: Could that work?

General discussion relating to the Transfusion project.

Moderator: General Discussion Moderators

Post Reply
User avatar
BEAST
Zealot
Posts: 167
Joined: Tue Jun 16, 2009 05:59 am

Python: Could that work?

Post 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?
User avatar
N0t_mINe
Acolyte
Posts: 629
Joined: Wed Nov 30, 2011 05:35 am
Location: LURKERS DON'T DRAMA.

Re: Python: Could that work?

Post 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.
User avatar
N0t_mINe
Acolyte
Posts: 629
Joined: Wed Nov 30, 2011 05:35 am
Location: LURKERS DON'T DRAMA.

Re: Python: Could that work?

Post by N0t_mINe »

I just answered the f••• out of that question!
User avatar
BEAST
Zealot
Posts: 167
Joined: Tue Jun 16, 2009 05:59 am

Re: Python: Could that work?

Post 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?
User avatar
N0t_mINe
Acolyte
Posts: 629
Joined: Wed Nov 30, 2011 05:35 am
Location: LURKERS DON'T DRAMA.

Re: Python: Could that work?

Post 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.
User avatar
Tchernobog
Tchernobog's Love Child
Posts: 1402
Joined: Tue May 27, 2008 07:30 am
Location: Rural Alberta, Canada
Contact:

Re: Python: Could that work?

Post 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
User avatar
N0t_mINe
Acolyte
Posts: 629
Joined: Wed Nov 30, 2011 05:35 am
Location: LURKERS DON'T DRAMA.

Re: Python: Could that work?

Post by N0t_mINe »

@Tcherno:

I just read it for the technical articles, I swear!
User avatar
Tchernobog
Tchernobog's Love Child
Posts: 1402
Joined: Tue May 27, 2008 07:30 am
Location: Rural Alberta, Canada
Contact:

Re: Python: Could that work?

Post 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:
Post Reply