[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Collision detection
On Wednesday 05 October 2005 09:40, Michal Wallace fired a shotgun at the
keyboard and the following appeared:
>
> So are you saying you want to start doing real
> physics? If so, you might take a look at pyODE.
> We used it in our pyweek entry (which didn't get
> finished) and it was pretty helpful.
Sorta........it's a heavily arcade'ish game, but there is enough realism to
it to justify the use of basic physics. Sometimes it's simpler/easier to
bypass the cheap hacks and just use real physics principles. :)
> Basically we just built 3d physics world for
> ODE to play with and then watched that model
> to figure out where to put the 2D sprites. So
> when you want to move your car(s) around, you
> just apply the appropriate force to the car
> object(s)...
>
> The code is here:
>
> https://blazeofglory.org/
>
> under cvs... see room.py for how the room world
> is built; physics.py and roomphysics.py and
> hero.py for the collision and motion stuff... then
> render.py for how to show the stuff on
> the screen...
Thanks. Actually I've looked briefly at PyODE. My initial impression is that
it's a bit overkill for what I'm doing....right now my own combination of
simplified physics and some "cheap" modeling on the steering is working great
for just motion, and with summing the forces to determine accelerations, I
should be able to handle collision *response* ok....that is, if I can
actually detect them. PyODE is a definite possibility, I'd just like to stick
with the most basic implementation feasible.
It's tempting to go four-point modeling on the cars, full-scale physics
simulation, etc, but I'm trying to keep the game fairly simple so I don't get
bogged down and lose interest like I usually do. :)
-Matt Bailey