i seem to be popping up a lot in here lately
so, this time it's about collision detection... here's what i've got.
i just used a text file to hold maps (for now). it's basically just a grid with x's and o's. so a map will look like this:
so i can load that, store it in all in a 2d array, and draw tiles so that it looks like that map.Code:xxxxxxxxxxxxxxxxxxxx xoooooooooooooooooox xoooooooooooooooooox xoooooooooooooooooox xoooooxxooxxooooooox xooxxoooooooooooooox xoooooooooooooooooox xxxoooooooooooooooox xooooooooooooooooxxx xooxxoooooooooooxxxx xooooooooooooooxxxxx xxxoooooooooooxxxxxx xooooooooooooxxxxxxx xoooooooooooxxxxxxxx xxxxxxxxxxxxxxxxxxxx
so now, how would i do some collision detection? so that i know if my little character is hitting a wall, standing on a ledge, bumping his head when jumping, etc... i assume i test the character's x and y coords against something.. but what, exactly? i searched around, but didn't really find what i was looking for...
i really just need to know what to check the player's x/y coordinates against.. i should be able to get it from there.. i hope
(it probably shouldn't have taken that long of a message for such a question, but i'm not very good at getting a messge across... oh well)