Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i need some assistance on writing a simple graphics program

Status
Not open for further replies.

DragonsEyE56

Programmer
Dec 11, 2000
1
US
my question is this im writting a simple version of pac man for experiance and leaning im using borland c++ 4.0 and so far i have lets say a map class and a pacman class the pacman can move around and through the map maze so how do i get him to not go through the walls of the maze

if u can answer this thanx
 
Well...

If you've got a smilar setup to the arcade game then presumably you have a 2D array somewhere that holds data on the fixed position grpahics (such as walls, dots, fruit, etc).
Just check the 'grid' position of the pacman and see if it is allowed to enter each grid position.

I can probably help some more if this is no good.

vt@vantumour.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top