Ratings (show detail)
0% of respondents wished to disqualify the entry.
screenshot from the final version
|174.3 KB||viblo||2007/09/09 10:54|
|8.3 MB||viblo||2007/09/09 10:51|
Made some great progress today: I added a help screen! Now I only have to fill it with my wisdom ;-)
|141.8 KB||viblo||2007/09/08 00:52|
Today I worked on my own and implemented a menu (and fixed our state system, but that is not visible in the screenshot). As you can see the menu has super high quality graphics :)
|108.5 KB||viblo||2007/09/05 21:25|
Day 3. Feels more like a game today.
|140.4 KB||viblo||2007/09/04 21:17|
2 days of work.. :)
|66.9 KB||viblo||2007/09/03 21:15|
Gamedev Four Elements VI
Four Elements (or "4E," as many of us call it) is GameDev.net's biggest annual competition, running for about half a year. We give you four "elements," and you go off and make a game based around them.It runns from "September 27, 2007, at 1000 hours CDT" to "April 3, 2008, at 2300 hours CDT" and the elements (aka pyweek-theme) are Ponies, Accountants, Crystals and Explosions. Even if the competition runns for half a year, it should be possible to put toghether a cool game in a week or so, right? Anyway, it would be cool if there were more python games in the competition..
Crash-bug in Bouncy
Some players complained about a KeyError exception, at "del self.shape_to_actor_map[s.contents.id]" in the destroyActor fuction. If you get this error (I havent been able to reproduce it myself) you can fix it with a small try-except-block. Replace line 248 in ActorManager.py in the following way:before:
try: del self.shape_to_actor_map[s.contents.id] except: pass
Trouble running Bouncy on Linux?
The instructions in the readme seems to be a bit unclear on what you need to do to run Bouncy under Linux, so if you have trouble in running Bouncy under linux and it complains about a .dylib file not found, read on!
You will need to compile chipmunk. It is not very hard to do:
- Unzip the pymunk-0.1.1.zip file included in the Bouncy zip. It contains Chipmunk (and pymunk, the python binding, but we only need to compile chipmunk for Bouncy to run).
- Go to the folder named Chipmunk_src
> gcc -O3 -std=gnu99 -fPIC -ffast-math -c *.c
> gcc -shared -o libChipmunkPyEd.so *.o
- Move libChipmunkPyEd.so to /usr/lib
- The game should work now.
End of day 2 - We might know what to do now
After playing with Chipmunk/pymunk and QGL yesterday and trying to put together some base code (and figuring out what to do) we put together something more game-like today. Just take a look at the nice screenshot in the bottom of this post! Bouncing balls, red squares, a green arrow and "twisters". Sure looks like a twisted game! ;)
Today we also learned to not set the shape id in code (shape.contents.id), and certainly not set the id so several shapes shared a single one (wow, that bug took a loong time to find). Otherwise the physics seem to work ok for our needs.
btw, are we the only entry using QGL? Its a small OpenGL scenegraph found here: http://pypi.python.org/pypi/QGL/9
Chipmunk 2d physics lib
In the same spirit as Hectigo and tsmaster, I have now with this post released a small library called pymunk just for pyweek! :)
Chipmunk is a 2d physics engine written in C, and can be found here: Chipmunk.
pymunk is a low level binding made with ctypes, so you can now use Chipmunk in your Python code!
The link: pymunk-0.1.zipAnd a screenshot from the included demo:
And a cut-n-paste from the readme:pymunk - pyweek5 edition
2007, Victor Blomqvist - email@example.com
pymunk is a wrapper around the 2d physics library Chipmunk
At the moment, its an autogenerated ctypes binding + a modified version
of the vector2d cookbook-snippet from pygame.org at
HOW TO USE
There is no specific pymunk documentation yet except for this readme.
However, The Chipmunk docs should be more or less enough together with ctypes,
as pymunk is just a very low level ctypes binding at the moment.
Chipmunk documentation can be found here:
See demo1.py for an example of how easy it is to use! :)
* A windows-dll of Chipmunk (or a *nix-library if you are on *nix). See COMPILE
for compile-instructions. The dll/lib should be placed somewhere where pymunk
can find it. A safe bet should be in the same folder, at least on Windows ;)
pymunk uses the source from Chipmunk SVN revision 125.
* ctypes (included in python 2.5)
If you are on a platform other than windows, you will have to build Chipmunk
on your own. It should be no problem, the source is included in the
> gcc -O3 -std=gnu99 -ffast-math -c *.c
> gcc -shared -o libChipmunkPyEd.so *.o
or run build.sh (untested!) to compile.
The output should be placed somewhere pymunk can find it.
I have plans to do a more high-level/pythonic wrapper in the future, and even
started a little. But the pyweek library release stop is today(! or tomorrow?),
so the low-level stuff had to do for now.