SFML community forums
Help => General => Topic started by: Shorefire on January 16, 2013, 06:02:43 am
-
Hello, I have been trying but cannot seem to succeed, can someone please re-write this for SFML 2.0, it is currently not working for the latest version. I have done some searching around and cannot find a fix, I am somewhat new to SFML so converting it to 2.0 is difficult with my limited understanding of how SFML works, a tad rusty with c++ to.
https://github.com/SFML/SFML/wiki/Source%3A-Simple-Collision-Detection
-
Well there has been quite a bit of changes between SFML 1.6 and SFML 2.0, so one can't directly convert the code. For instance the pixel perfect collision would probably be quite a performance killer (except if one keeps a copy of the images in the RAM and VRAM) and the GetAABB function is quite useless, since it kind exactly does, what now getGlobalBounds() does...
I'll now go to bed, but maybe I'll take another look a few hours later. :D
-
In that case, could you point me in the right direction of learning how to check collision with a image file, for instance, I want to be able to check collision with a collision image of my map, one being graphical for show and the other being black walls and blocks, different colors checking for different collision types, like taking damage etc.