Rezar Nashoua Posted January 22, 2019 Report Share Posted January 22, 2019 Hello there, I was looking for some help in making a game similar to Candy Crush, I'm working with a friend to try and get this game to work but I'm stuck on quite a few parts of the Labview Code. I am using someone else's code for a basis but they have only managed to get an Array up to load the graphics but the specifics I cannot get down and here is where the problems lie. For one I cannot get it so that the click is restricted to only moving in 4 directions and only swapping with the block next to it. My problem at the moment is you can click any block freely which destroys the purpose of the game. Secondly I need to find a way so that when similar coloured blocks are next to each other they get removed and replaced with random coloured blocks, please if anyone could give any help that would be much appreciated. mygame_DRAFT_CA.vi Quote Link to comment
gregoryj Posted January 22, 2019 Report Share Posted January 22, 2019 crossposted here: https://forums.ni.com/t5/LabVIEW/How-do-I-create-a-Candy-Crush-game-in-Labview/m-p/3884161#M1101235 Quote Link to comment
Sparkette Posted January 22, 2019 Report Share Posted January 22, 2019 Neat idea using LabVIEW for game programming Quote Link to comment
hooovahh Posted January 23, 2019 Report Share Posted January 23, 2019 How much LabVIEW do you know? I'll admit that some of altenbach's code is using some techniques I wouldn't have thought of, but simply posting his VI and saying you are stuck gives me the impression you don't have much training. I'd recommend taking a bunch of the free LabVIEW training that is online, and then I'd recommend you start over with your own design. As for your specific question I'd say the solution is to have a conditional check (case structure) around the part of the code doing the swapping, and only perform the swap if the second click, is one move away from the first click. At the moment you aren't keeping track of what the first click is so you'll need to do that so the second click can be checked. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.