Archive for April, 2006

Gaming project in python II

Thursday, April 27th, 2006

Since the last announcement on the game in python some work was done on it. My graphics-guy produced the first models in Blender which we imported successfully into Ogre.

My first goal was to get the tool-chain in-place. Currently all we need is Blender, any python IDE (i stabilized on using Eclipse with the pydev plugin - great stuff, esp. the debugger), a graphics program. That’s about it. We will probably need a few more tools:

  • an easy to use model viewer for the artist. I dug up a few quite usable model viewers but i think i need a model viewer more specific to the needs of the game. Later on we will use node references in the models (null objects, e.g.) to save space and so.
  • An easy way to deploy it in several forms
    • source (duh)
    • win32 executable. Did that a thousand time and already know how to do that
    • apple executable. I know how to do that but i have no idea how difficult it will be with the newly introduced ppc/intel issues
    • linux executable. A no-brainer with cx_freeze or something similar.
  • Since the game will be data-driven we need an editor sooner or later. I thought about creating my own toolchain in pure python starting from within Blender to standalone tools that should be as general-purpose as possible. I have a nice GUI in Blender, that basically reimplements a full blender gui for general use

Since i decided on a multiplayer game i had some thoughts about how to structure the whole thing. There will be a server and a client. Each component will have several threads: One networking thread that does all the network stuff (twisted can do that for me pretty easily), one game-logic thread. The client will have the additional presentation layer which in itself uses a couple of more threads (music e.g. is in it’s own thread). To get it all playing together nicely will be interesting. My first goal is then to create a 3d chat client-server architecture. Two clients can connect to the server and chat using the 3d presentation layer. Additionally they are notified of incoming messages with sounds.

While coming up with that plan i realized one thing i am missing the most currently: A GUI! Since that will be a vital part in the game i want the gui to be as configurable as possible from within python. For several reasons i do not want to use the CEGUI which is so popular in the ogre community. I will probably try to port ocempgui to the pyogre/pygame combination and see if that works. I had a good look at the ocempgui and liked what i saw. Probably i will rip out a few things but most of it well engineered, esp. the event system. For some reason i would really like to have gui elements being 3d objects in themselves not mere overlays. This would make a lot of sense for a few elements i identified, esp. a time-line like bar at the bottom that will display daytime, weather, month…

Another thing i wanted to have a look into is marry the ogre scenegraph with openal to get sorround sound. This is definitely a nice-to-have and nothing else. If i can’t pull it in a safe way that needs only little maintenance i will ommit it.

The first screenshot from within the engine. Not a lot to see so far but it was already quite rewarding to play arounf wit 3d and python. Game0002.png