[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] "Nutshell" Simple Game Framework



I'm trying to build a game framework that's simple and easy to use, and that incorporates the ideas of a huge game space and basic physics that I've been working on. I don't care about complex physics simulations like hinges, and am willing to callously treat objects as hard boxes standing upright, on or above a plane. I just want characters that can run and jump around in a game world and interact with stuff.

As a result you can so far make a game world with an object in it that can move around, with the following code:

import Nutshell
w = Nutshell.BasicWorldsim()
w.MakeEntity(nature="Object",name="Pretzel",velocity=[1.0,0.0,0.0])
w.SimulationStep()

The collision detection isn't quite done yet, but motion is, it's optimized for efficiency, and I'm going to build on the basic worldsim class to get zones that can be loaded/saved.

I'm willing to open-source this if anyone's interested, especially if people are willing to help with graphics/graphics code. My question is, does it seem reasonable to build a goodly chunk of the game character code into the simulation, ie. having RPG stats mixed in with the class that handles the physics of living creatures? Considering the module as a pure physics simulation, that seems odd, but since a physics simulation doesn't really need a "Creature" class at all, maybe it's justified.

Kris