I resolve to always consider an Object-Oriented approach when starting new projects in LabVIEW
Object Oriented Programming is a very powerful approach to software architecture and programming that allows writing modular and reusable software systems. It is not only LabVIEW-specific and it is actually commonly used in the majority of larger-scale applications.
I have discovered the benefits of it when developing a 2D Platformer game concept in LabVIEW. At first I did not use objects and struggled to make multiple instances of enemies. Later I found out about LabVIEW OOP and found out how this can be implemented into my game. Once I fully understood how to apply these fundamental principles of object-oriented programming in LabVIEW environment I was able to use it in my platformer, what allowed me to create infinite number of enemy instances that were defined as objects. This made the code significantly more modular and much easier to maintain.
Therefore I decided that for my new year’s resolution I will aim to use Object-Oriented Programming with applications of larger scale from the beginning to exploit all the benefits of this software design approach.
Steps to Implement or Execute Code
Download the project archive.
Extract it to a know location.
Run the "Game Project.lvproj" file.
Run "Game.vi" file from the project explorer in LabVIEW.
How to play
Use keyboard buttons to navigate: LEFT/RIGHT to move horizontally and UP key to jump.
While in air, press DOWN to perform a stomp attack. You can also enter cheats ("Health Please" for a health boost, "Points Please" for extra points).
If you run out of HP you will be presented with a pop-up window saying "You're dead" and then your health points will re-initialise. Enemies will be spawned in random locations within the map and each will have a random speed.