stasta
10-30-2000, 09:26 PM
Here is my drawing of my maze. How do I start with the code? Any help?
Helpstasta 10-30-2000, 09:26 PM Here is my drawing of my maze. How do I start with the code? Any help? BillSoo 10-31-2000, 12:34 AM It appears that you already have some code. It appears to be some kind of "pong" game. You've then drawn some shapes on top of the form. If this is the route you want to go to create your maze, then you can do collision testing in a couple of ways. The first way is to keep a list of the coordinates of all objects (eg walls) in the maze. Since your walls are made up of rectangles, that should be simple. Then, every time you move, check for a collision. The second way is to take a sample of the pixel colour in front of the ball. If it is blue, then you know that a wall is ahead of you. This will not work with the map as you've created it since the shapes are on top of the form, not "in" it. For that, you'd have to draw the walls on the form. "I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder |
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum