Using Python to script a game?

Aahz aahz at pythoncraft.com
Sat Jun 15 04:04:10 CEST 2002


In article <cdc2589b.0206141718.7dc2ae13 at posting.google.com>,
Ben Blonder <ben at sourcecod.com> wrote:
>
>I'm writing a 3D naval tactics in C++ for the Mac. I'm planning on
>having all the object behaviors, movements, and AI controlled through
>a scripting layer. The scripts would be text files the game would
>parse and then carry out actions. All the scripts would be read at
>runtime, not compile time, so they'd all have to be interpreted.

Is this real-time or turn-based?  If the latter, I'd recommend scrapping
your C++ code and going with straight Python.

>Can I use Python to accomplish this, and if so, can you point me to
>some tutorials on integratring Python with my existing code?

Integrating might be a bit difficult if you haven't already designed
your application specifically for that purpose.  If it's a real-time
game, check out Pygame, http://www.pygame.org/
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/



More information about the Python-list mailing list