Omnimaga
Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: Raylin on April 18, 2011, 05:27:56 pm
-
How do you distinguish between different tiles on the ground in Axe, based on pixel-by-pixel collision?
-
By pixel-by-pixel, I assume you mean the pixel-test() command?
Sadly the only way I know of is to store a copy of your map in the back buffer, where every solid tile are plain black (or has a black mask corresponding to every solid part of the tile) and the rest is white, then pixel-test from there, kinda like what I did in Super Sonic Ball. It has been 8 or 9 months since I touched Axe, though.
-
If you're using a tilemap, you should definitely not be using pixel by pixel collision detection. Since you already have the tilemap data, its much easier to just write a quick tile detection routine that gets the current tile at a given (x,y) on the map.
-
Can you elaborate on that?
How do you NOT use pixel by pixel detection in Axe?
Isn't that how smooth collisions and stuff work?
-
I think Quigibo thought you meant collision via pixel testing. Maybe you wanna check out a post I made a bit ago about the subject of per pixel collisions with both square tiles and masked tiles.
http://ourl.ca/4279/169823
-
There are ways of accessing which tile the player is in through pointers. I still use Builder's method except I never figured out masked tiles >.<