Walls and Barriers... I Need Some Help...
Author |
Message |
DH88
|
Posted: Wed May 24, 2006 1:55 pm Post subject: Walls and Barriers... I Need Some Help... |
|
|
I'm attempting to create program with walls. It will be a sort of maze program, using keydowns and keyups to manipulate a simple sprite. My main problem is creating one wall, let alone multiple ones to nullify movement.
Does anyone know how to make a working wall, and what would you use?
ie; Picture boxes, lines, etc...
Any help would be appreciated.  |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Wed May 24, 2006 3:18 pm Post subject: (No subject) |
|
|
I'd have a 2D (grid) array for the locations of walls. Then during movement, I'd be checking against the array to see if a move is valid or not.
The maze itself will also be drawn from the array, so that math and visuals are in sync. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
Brightguy

|
Posted: Wed May 24, 2006 3:21 pm Post subject: Re: Walls and Barriers... I Need Some Help... |
|
|
You can use images for the walls if you want it to look fancier, otherwise you can use the line control or the line method. Obviously there are different ways to store the wall location internally. (e.g., one simple way would be to model the maze as a 2D grid where each wall is 1 cell.) |
|
|
|
|
 |
|
|