[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] "Nutshell" Version 2007.4.11
http://kschnee.xepher.net/code/nutshell_basic.py.txt
Here's a version of the physics sim/game framework, containing these
classes:
-Entity: An object with a location, mass, size, and velocity.
-Creature: A subclass of Entity that has built-in movement code.
-BasicWorldsim: A simulated space that contains Entities and keeps track
of their behavior.
-Worldsim: An incomplete subclass of BasicWorldsim that shows the
beginnings of terrain.
The code is long and messy, so I'd appreciate comments. If you run the
thing you'll see a Pygame window with some little circles, one of which
you can control with the arrow keys, Space, and F. There are a couple of
commented-out text examples at the very bottom too.
The "license" shown at the top is the "I-don't-know-what-I'm-doing"
license. I'd like to keep some advanced code to myself if I get far
enough, but figure that at least this code and some basic RPG stuff
should be released as freeware. It's not ready for that though; next
version?
Kris