Discussion:
caterpillar detect collisions
Fabio Varesano
2011-07-01 14:56:13 UTC
Permalink
Hi everyone,

Do you remember the snake videogame?
http://en.wikipedia.org/wiki/Snake_%28video_game%29

I'm trying to implement something like that using Soya starting from
basic-5.py.

I'm now trying to detect when a collision happens, I mean when the
Caterpillar head pass over its own body. I guess this may be a good
task for ODE, but I'm still too unexperienced with Soya and ODE to
find a solution.

Any idea?


Thanks,

Fabio
deavid
2011-07-02 10:42:52 UTC
Permalink
You can try to emulate two kinds of collisions: real collisions, or
collisions fixed by a board or something similar.
If you want a real collision (locate the sphere touching with other
sphere) the only way that will work correctly is using ODE. That's
because real collisions are very complex to find in a small amount of
time, and, if you try to create your own algorithm, it probably will
end being too slow (because you will end doing this with python).

But if you want to do a "snake game", maybe you don't need any of
these real collisions, if your snake walks over a board or something
similar. I mean, if you are trying to create a classic snake game (90ยบ
turns and so) but with a new appareance, you can implement your own
collisions using the board. Even if you want to try a game with less
restrictions, the "board" is the most efficient way to know what's
happening. Some collisions systems use a "grid" to know in a very fast
way if two shapes may collide.
Post by Fabio Varesano
Hi everyone,
Do you remember the snake videogame?
http://en.wikipedia.org/wiki/Snake_%28video_game%29
I'm trying to implement something like that using Soya starting from
basic-5.py.
I'm now trying to detect when a collision happens, I mean when the
Caterpillar head pass over its own body. I guess this may be a good
task for ODE, but I'm still too unexperienced with Soya and ODE to
find a solution.
Any idea?
Thanks,
Fabio
_______________________________________________
Soya-user mailing list
https://mail.gna.org/listinfo/soya-user
Loading...