| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Thursday 27 September, 2007[ viblo @ 20:25 ] Gamedev Four Elements VIThe Four elements competition at gamedev started today, and I thought that some of the people from pyweek might be interested in other competitions as well: 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.. Sunday 09 September, 2007[ viblo @ 19:19 ] Crash-bug in BouncySome 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:del self.shape_to_actor_map[s.contents.id]after: try: del self.shape_to_actor_map[s.contents.id]
except: pass
[ viblo @ 19:06 ] 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:
Monday 03 September, 2007[ viblo @ 21:33 ] End of day 2 - We might know what to do nowAfter 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
Wednesday 01 August, 2007[ viblo @ 20:35 ] Chipmunk 2d physics libIn 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.zip And a screenshot from the included demo:
And a cut-n-paste from the readme: pymunk - pyweek5 edition======================== 2007, Victor Blomqvist - vb@viblo.se ABOUT pymunk is a wrapper around the 2d physics library Chipmunk (http://wiki.slembcke.net/main/published/Chipmunk). At the moment, its an autogenerated ctypes binding + a modified version of the vector2d cookbook-snippet from pygame.org at (http://www.pygame.org/wiki/2DVectorClass) 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: http://files.slembcke.net/chipmunk/chipmunk-docs.html EXAMPLE See demo1.py for an example of how easy it is to use! :) DEPENDENCIES/REQUIREMENTS * 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) COMPILE 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 Chipmunk_src folder. > 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. THE FUTURE 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. |
Current...
September 2008 [entries, ratings] Previous March 2008 [entries, ratings] > September 2007 [entries, ratings] April 2007 [entries, ratings] September 2006 [entries, ratings] March 2006 [entries, ratings] (June 2006) August 2005 [entries, ratings] Not logged in Login Register | |||||||||||||||||||||||||||||||||||||||||||||||||||||||