LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW making a maze game

Hello,

 

We’ve been taught the basics of Labview this semester and now we have been given a project in which we have to design a game. We are going to build a simple Pac-Man game. We must have a maze, a main character (Pac-Man) which can be controlled, some enemies (Ghosts) and the Point Pills that Pac-Man will eat as he goes through the maze.

 

We already have an animation code (Pac-Man moves and opens its mouth), a code with a drawed Labyrinth (with vertical and horizontal bars) and a code for using the Keyboard to control Pac-Man in four different directions.

Now we need to decide how our character will move on the screen. Me and my lab partner can not find out how we can place the Pac-Man animation in the 2D-maze to control the character with a keyboard inside this maze.

 

We did not use an Array for our maze, so we used the function Draw Multiple Lines to build vertical and horizontal bars in the maze because we thought it would look more realistic than an array. Can we work with it or should we better use an array in this case?


Are there any helpful tips or pointers people can give us?

 

I have attached our project files. We are working in Labview 2017.

 

Thank You a lot!

0 Kudos
Message 1 of 8
(3,414 Views)

Hello,

 

we’ve been taught the basics of Labview this semester and now we have been given a project in which we have to design a game. We are going to build a simple Pac-Man game. We must have a maze, a main character (Pac-Man) which can be controlled, some enemies (Ghosts) and the Point Pills that Pac-Man will eat as he goes through the maze.

We already have an animation code (Pac-Man moves and opens its mouth), a code with a drawed Labyrinth (with vertical and horizontal bars) and a code for using the Keyboard to control Pac-Man in four different directions.

Now we need to decide how our character will move on the screen. Me and my lab parnter can not find out how we can place the Pac-Man animation in the 2D-maze to control the character with a keyboard inside this maze.

We did not use an Array for our maze, so we used the function Draw Multiple Lines to build vertical and horizontal bars in the maze because we thought it would look more realistic than an array maze. Can we work with it or should we better use an array in this case?


Are there any helpful tips or pointers people can give us?

 

I have attached our project files. We are working in Labview 2017.

Thank You.

0 Kudos
Message 2 of 8
(3,420 Views)

Was I dreaming?  I'm almost positive that I wrote 2 or 3 replies to this thread.  I'm also fairly certain that I read a few from Bob S. that have also gone missing.  Did NI have to restore the forums from a backup?  Or the more likely scenario, did we hit a branch in the time continuum after Bob combined the duplicate threads? 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 8
(3,279 Views)

There were two identical original posts (separate threads) that got merged into one here. I guess the merge produced some collateral damage and the earlier responses ended up in a black hole somewhere ... 😞

0 Kudos
Message 4 of 8
(3,266 Views)

The identical posts were merged before Bob and I posted our comments.  So the space time continuum was interrupted after the merge but before our posts.  Smiley Very Happy

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 8
(3,264 Views)

I remember reading at least one of your posts.  It was a good one really describing all the "properties" of each location in the maze that should be stored in a 2-D array.

0 Kudos
Message 6 of 8
(3,254 Views)

@RavensFan wrote:

I remember reading at least one of your posts.  It was a good one really describing all the "properties" of each location in the maze that should be stored in a 2-D array.


And I'm thinking about a level editor made out of an array of clusters containing boolean controls in the shape of a Pacman board, with a preview mode of course.  Write each level to an XML file to be read by the game engine later.  This sounds really fun.  

Capture.PNG

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 7 of 8
(3,232 Views)

@aputman wrote:

@RavensFan wrote:

I remember reading at least one of your posts.  It was a good one really describing all the "properties" of each location in the maze that should be stored in a 2-D array.


And I'm thinking about a level editor made out of an array of clusters containing boolean controls in the shape of a Pacman board, with a preview mode of course.  Write each level to an XML file to be read by the game engine later.  This sounds really fun.  

Capture.PNG


It does sound fun!  And I've found that making a game is a great way of exercising your knowledge of a given programming language.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 8
(3,206 Views)