Jump to content

Need help creating Candy Crush type of game.


Recommended Posts

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

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.