SFML community forums
Help => Graphics => Topic started by: section_two on June 18, 2011, 12:59:48 am
-
Hi, im from argentina.
I want to know if someone can explainme the method for detect colision in a large world, tile based, with many objects, but they move in a free way, not in a tile based style.
Looping every object in the world ?? mmm...no.
Maybe split the world in many little worlds, and check the ones in same world piece.
Or.....
Sry if this is not the right forum for ask this.
Sry for my english too.
Thanks.
-
OR....
In memory, draw every colision object in one color.....red....., and check if it is already a red pixel before it draw.
OR.....
-
new problem, how i know witch object to draw?
Looping every object position, and see if its in the screen range.
Pd. Im new in this kind of game programming.
-
You know you can edit your post, right?
-
Splitting the world into many small worlds should be the right aproach.
Inside those small worlds, you would've to check all objects against each
other.
That also solves the second problem: Keep track of the currently visible
small part of the world. Only draw the objects in that one (and maybe in
adjacent ones).
-
Thanks MK. I'll try in that way. Hope you reply my future questions. I have a lot.