From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Development Best Practices Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 3D Space Explorer Game

[3-26-2010 - Evan Robinson]

[ Updated document to include a newer version of the software. No major new features, merely a fix of a few reference leaks ]

All,

Please enjoy the attached example program.

Motivation:

I wanted to create an example program which would showcase object oriented design capabilities within LabVIEW while at the same time showcasing advanced architectures including the state machine and the producer consumer loop. Of course this code is provided without warranty (express nor implied) a.k.a. "use at own risk".

An example of the program in action: http://www.youtube.com/watch?v=ASqgsISM0Uc

Design Patterns Used:

Object Oriented Programming

State Machines

Producer Consumer Loops

There are tester programs scattered throughout the project.

How to run:

  1. Download and unzip the attached.
  2. Open the file "3D Object Sandbox.lvproj"
  3. Open "/Project Files/3D Space Explorer/Event Handler State Machine/Main.vi".
  4. Run. The texture references should be stored relative to the project directory.

Using the mouse, click on the 3D picture control to move the space ship about. You can zoom in our out using the slider. You can create a new universe by clicking the create world button. You can also quit the program by pressing quit.

Questions / Comments?

Please feel free to email me: evan.robinson@ni.com

Download All
Comments
Elijah_K
Active Participant
Active Participant
on

Evan, this is a great example of the power of object orientation and the 3D picture control.  I'll undoubtedly re-use this all over the place.  Thanks for posting it!

Elijah Kerry
NI Director, Software Community
Elijah_K
Active Participant
Active Participant
on

When you open the project, the top level VI is not the one shown in the video.  It took me a while to realize that the VI I was looking for was in 3D Space Explorer >> Event Handler State Machine.llb >> Main.vi

Elijah Kerry
NI Director, Software Community
Hyro
Member
Member
on

Amazing...

Pie566942.0
Member
Member
on

I LOVE this example program.  Thanks for your effort and for sharing.

Contributors