01-30-2018 10:28 AM
i will make it by using boolean, is this possible? .
if this is possible, how to move the flakes using a mouse to a designated place.
I am still confused when integrating the mouse to move the flake, so when it is in the correct coordinates, the flake will stop. of course in the early stages, the coordinates of these flakes will be in a random place ..
can you give an example ..
01-30-2018 11:24 AM
There are zillion things you will have to tackle before you are done (been there done that!).
Figure out how to use an event structure to detect a Mouse down/up. You will need that to detect when a user clicks on a puzzle piece and drop sit.
Figure out how to detect a Mouse Move - This will be used to move the piece along with the mouse.
Figure out how to get the coordinates of a Boolean - You will need this to figure out if the user clicked on a Boolean.
Figure out how to set the position of a Boolean using property nodes.
Figure a state diagram describing the process of selecting moving and dropping - You will need this to code the object move using a mouse.
to get you started...
See this thread about dynamic Event registration. I posted an example of dropping a Boolean image in a picture indicator in that thread.
See this thread for links to thread about using a picture control.
Please note grabbing an part of an image in a picture control and moving it is an advanced task. Save that for latter.
Also note that to get a puzzle piece with convex borders will require to figure out how to create a mask for the image. It can be done but is not trivial.
When you are done post it so others can learn from your example.
01-30-2018 12:27 PM
My personal opinion is that making a game is a GREAT way to learn a programming language! There are some links to LabVIEW tutorials and other learning tools on the main LabVIEW forum page. Use them and try to work what you've learned into your code and then post what you have, even if it is incomplete. We can then show you what was good as well as what needs work. Take that knowledge, try to incorporate it and post again (and again as many times as needed - the more you post, the more we can help)! That way we can guide you to making a successful, well-crafted product! 🙂