03-16-2014 06:29 AM
Hi guys,
I have posted this before... But this is my final(ish) version.
I have re-created Game of Life in LabVIEW and made a few changes, such as 3D and my own take on the game. I would be very grateful for any feedback/improvements on the game and people's thoughts.
I am by no means a great LabVIEW programmer, but really enjoy the program. It seems to run quite slow, I am unsure if that is due to my laptop, or because I haven't best used LabVIEW's functions.
Either way, any feedback would be awesome.
Also, I am not the best 'clean-er upper' of LabVIEW so, apologies if it seems messy, I have tried to make it as logical as possible!
Thanks,
MyronHuzan
03-17-2014 07:17 AM
Hi MyronHuzan,
I tried your game and its very funny! On my PC (2 core 3 GHz, 8 GB RAM) is game also quite slow. I think it is during using a lot of VI Server references. In this cases I usualy use default value of controls and initialize them to default value after VI start (via Invoke node). But I donť know which way runs faster.
I haven't have so much time to study your code in details. But your game look nice and its funny.
Grear work!
Simyfren
03-17-2014 07:41 AM
Hi Simyfren,
Thanks for the feedback, I used references just to make the program a little more tidier. I'm not familiar with Invoke nodes, might have a look at them:)
Thanks,
MyronHuzan
03-17-2014 04:21 PM
Holy Property Nodes Batman!
But seriously you have way too many property nodes, and references.
Many places you are using a property node to read the value of a control, when the terminal is placed right next to it.
You also have tons of controls all hidden being used as variables. The wire is the variable. Use a shift register.
You could also benefit from a state machine, and probably Core 1 & 2 training.
That being said congradulations on developing code that works and does what you want. And thanks for sharing.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-18-2014 03:53 AM - edited 03-18-2014 03:54 AM
@Hooovahh wrote:
Holy Property Nodes Batman!
But seriously you have way too many property nodes, and references.
Many places you are using a property node to read the value of a control, when the terminal is placed right next to it.
You also have tons of controls all hidden being used as variables. The wire is the variable. Use a shift register.
You could also benefit from a state machine, and probably Core 1 & 2 training.
That being said congradulations on developing code that works and does what you want. And thanks for sharing.
Hi Hooovahh,
Thanks for the feedback, I did go property node crazy... I think I know where you are talking about having the control next to property node, I had that because if I had the control linked instead it gave me update errors and wasn't updating as I would have liked, I think that was due to the while loop, but the way I have it now works as I intended, so I left it like that:P
I do have a lot of hidden controls, but with the different 'version's of Game of Life they become visible as and when they need to.
I am not sure what State Machines are or Core 1 and 2 training, would you be able to elaborate on that.
Thanks,
MyronHuzan
03-18-2014 10:03 AM
@MyronHuzan wrote:
I am not sure what State Machines are or Core 1 and 2 training, would you be able to elaborate on that.
A State Machine is the bread and butter of most small to medium size projects. There are of course other design patterns but this is the most common one used. Here are a few links:
Core 1 & 2 is the first two levels of official training offered by NI. They lay the foundation for good programming development in LabVIEW.
Core 1 and 2 aren't free but there are some free resources if you want to learn more. Here are some links.
3 Hour Introduction http://www.ni.com/white-paper/5243/en/
6 Hour Introduction http://www.ni.com/white-paper/5241/en/
LabVEW Basics http://www.ni.com/gettingstarted/labviewbasics/
Self Paced training for students http://www.ni.com/academic/students/learn/
Self Paced training beginner to advanced, SSP Required http://sine.ni.com/myni/self-paced-training/app/main.xhtml
LabVIEW Wiki on Training http://labviewwiki.org/LabVIEW_tutorial#External_Links
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
03-18-2014 10:09 AM
@Hooovahh wrote:
@MyronHuzan wrote:I am not sure what State Machines are or Core 1 and 2 training, would you be able to elaborate on that.
A State Machine is the bread and butter of most small to medium size projects. There are of course other design patterns but this is the most common one used. Here are a few links:
Core 1 & 2 is the first two levels of official training offered by NI. They lay the foundation for good programming development in LabVIEW.
Core 1 and 2 aren't free but there are some free resources if you want to learn more. Here are some links.
3 Hour Introduction http://www.ni.com/white-paper/5243/en/
6 Hour Introduction http://www.ni.com/white-paper/5241/en/
LabVEW Basics http://www.ni.com/gettingstarted/labviewbasics/
Self Paced training for students http://www.ni.com/academic/students/learn/
Self Paced training beginner to advanced, SSP Required http://sine.ni.com/myni/self-paced-training/app/main.xhtml
LabVIEW Wiki on Training http://labviewwiki.org/LabVIEW_tutorial#External_Links
Wow, thanks!
I will give them a look over soon, it should be very useful, thanks alot!:)