Some sort of playground

Share your projects and Chipmunk enhancements.
Post Reply
lexs
Posts: 1
Joined: Sat Sep 15, 2007 2:15 pm
Contact:

Some sort of playground

Post by lexs »

This is my little project with chipmunk, actually my first program using opengl and sdl.

You can draw static lines and dynamic boxes and circles. You can also spawn a "pod" as the game started out as a clone to the popular flashgame linerider. My little engine (which basically is a mere wrapper around chipmunk, opengl and sdl) also supports concave polygons by an optimal polygon decomposition algorithm from CGAL http://www.cgal.org/.
It also supports zooming and moving the viewport.
I do my development on linux but it also compiles on windows and probably os x too.

Everyone loves screenshots:
Image

Everyone loves demos:
http://rapidshare.com/files/55971838/engine.zip.html
http://www.megaupload.com/?d=SCJXECTN
It's a windows binary and the dll for sdl.

Controls:
F1 - draw static lines.
F2 - draw dynamic boxes.
F3 - draw dynamic circles.
F5 - spawn the "pod"

Move the view by holding the spacebar and left mousebutton down while moving the mouse.
Zoom in and out by rolling the scrollwheel, tap it to reset the view to default.

You cant move, pause, reset or remove the objects yet, thats planned however.

One strange "bug" is that if you zoom out quite a bit and draw a giant box it stats eating maxing the cpu. Why is this?
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: Some sort of playground

Post by slembcke »

lexs wrote:One strange "bug" is that if you zoom out quite a bit and draw a giant box it stats eating maxing the cpu. Why is this?
Chipmunk uses a spatial hash for the broadphase collision detection. The hash cells are a constant size, meaning that a very large object will need to be hashed into many cells.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests