Skip to main content
gamedev.net
🔒 Locked

Collision

Started by Pinzix 1 reply 900+ views
Original Post
Pinzix
Pinzix
The SDL libray could create an event call (like the mouse shifting) when two sprite have a collision?
Roots
Roots
You could write your own user event that is put into the event queue when a collision occurs, but you'd still have to do the collision detection yourself. And since you need to do the collision detection (SDL can't do it for you), you might as well just handle the collision right there instead of waiting to process the event queue and find out you need to handle a collision.


But for reference, if you want to know more about SDL User Events look here: SDL Wiki Doc - UserEvent
Lazy Foo
Lazy Foo
I have a couple tutorials on collision detection. They'll probably be useful to you.
Lazy Foo's SDL tutorials

[Edited by - Lazy Foo on August 9, 2007 7:52:40 PM]
Learn to make games with my SDL 2 Tutorials

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.