the game is simple:
object moving through a maze of walls by direction keys
this is 2D like the old 'Nibbles' game
The walls are made up of a textbox array (shaped in small squares) and my object moves around the screen in increments equal to the height and width of one piece of the wall.
So, it simplifies whether or not the object has collided since i loop through like:
for t = 1 to 10
if object.top = txtWall(t).Top then
if object.Left = txtWall(t).Left then
(collision)
exit for
end if
end if
next t
and that works. problem. as the map gets more intricate (more than say 50 pieces of wall squares) the game slows to a crawl.
Faster way?
Thanks
Wengang




Reply With Quote