How to add collitsion detection to a map

Started by
3 comments, last by kaysik 19 years, 5 months ago
how do you add colltion detection on a bitmap a certin points so you wont beable to walk through a wall or something. I know this question has been asked before. But I seam not to be able to find the replys alos I looked over the tutorials on gamedev and I could not find one the was exactly related to my problem. I am using one big bitmap and I want it simple to figure out the frame work then work on getting it more percics. And I am doing it in 2d with direct draw for now Thanks for the help [Edited by - kingpinzs on November 11, 2004 6:02:59 PM]
Advertisement
Well, i believe you are talking about 2D collision detection, it depends on a lot of factors, like, if you are using a tile based map, or if you want to make an exact collision detection for something.

I think you need to specify your problem a bit
--------------------------------------------- If God with me, Who against me?Personal Web Samuel Prince Blog...
does any one have any idea how to do this? While I have been wating for a reply I have been crusing googl to llok for the answer but I can not find any on using a single bitmap as the map and having the image detec collisions with parts of the image.
can any one help with this problem?
Is it that you have a huge bmp which is your map and you want to make some parts where you can't walk? Or do you have a tilemap and you to make some of the tiles imparsable?

If its in 2D get a piece of paper and you should be able to work out some good old if() statements that will stop you going where you don't want. After that there are quite a few 2D collision detection tutorials out there which I'm sure you could put to good use! Collision detection is one of the hardest things todo in games so don't expect there to be an easy answer - basically there are 98358637 ways todo it and 2876374 different implimentation of each technique so find one you like and stick to it.

This topic is closed to new replies.

Advertisement