03-20-2021 12:25 PM - edited 03-20-2021 12:50 PM
Hi All,
I'm getting back into LabVIEW and decided to recreate the classic game of pong. Yes, I can see there are a few examples knocking around online but I wanted to give this a good go my self first.
I have attached my attempt so far which shows how I Intend to tackle this in LabVIEW. Before I continue and add the 'logic' (ball direction/ paddle interaction etc).. I was hoping to get some feedback on my general approach to this. It's a simple producer/ consumer setup to handle the user input (paddle left/right up and down) and a cluster to handle the 'game data'. But so far it seems a bit... lumpy ?
Any advice would be appreciated,
Thanks,
🙂
03-20-2021 12:49 PM - edited 03-20-2021 01:22 PM
Code looks pretty clean, but there are a few things that could be simplified.
I am sure there are more things to add. Maybe others want to chime in. 😉
03-20-2021 01:44 PM
03-21-2021 01:18 PM
OK, I made a quick demo during Sunday breakfast demonstrating the action engine idea. Note that the board updates at regular intervals. No need for queues, channels and all that.
Just to give you some general ideas. Most of the ball logic is still missing.
03-21-2021 03:07 PM
Thanks very much for the great information 😃
That looks brilliant.
I'll implement your suggestions and complete the game/ update this thread with the result...
Thanks again/
03-24-2021 04:33 PM
Attached is my latest attempt.
Overall I'm pleased with the result. The ball logic isn't the best and the the general scalability of the program could be improved. But I'm happy with the outcome as a 'REV1' 😉
I want to try and shift this to an OOP approach. What would be the best way to implement this ?
Any tips welcome 🙂
Thanks again.