Skip to main content
gamedev.net
🔒 Locked

python: game logic

Started by Bith Feb 22, 2006 at 10:26 AM 3 replies 700+ views
Original Post
Bith
Bith
I have read tutorials that tought me how to script in python and I also know how to use it for 3d graphics. However as far as the actual game logic I'm pretty lost. I did I google search but didn't come up with any good resources. Could someone please post a good tutorial about game logic programming in python
Skeleton_V@T
Skeleton_V@T
I haven't started with scripting language until recently (using Lua (toLua++ as the bridge) and took a look at Python). From what I perceived, you'll hard code complex game events and have the script activate and glue these events together to form a scripted scene.

Scripting languages are generally intended to be easily modified, even for non-programmers. As a result, scripts should not be complex and be too tied to the underlying game engine mechanism.
--> The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones <--
Kylotan
Kylotan
Quote:
Original post by Bith
Could someone please post a good tutorial about game logic programming in python


The logic is going to be fundamentally the same as in any other language. A general game programming tutorial should help.
Bith
Bith
Well, it seems that everywhere I look (even on gamedev.net) all the articles are written for C++ programers.
Kylotan
Kylotan
Yes, because most people write their code in C++, but the 'logic' - ie. the general program flow and organisation - is standard across all mainstream languages. So you can look at the shape of the code in Java and transfer that to Python or C quite easily.

On the other hand, if you're not sure about game programming in general, you might want to ask in the For Beginners forum about how to structure your code.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.