Frozen game

Hi!
I am programming the Frozen game (available for Android) which is pretty much like Candy Crush Saga.
The program should swap two elements of an array selected by the player clicking on them. 
My problem is that the program keeps on swapping the elements. 
And I don't know how to change the numbers of the array to pictures (i.e. number 1 is a blue stone, 2 is a red one,...).
Please somebody help me!
Thanks in advance
Attachments:
mygame.vi ‏65 KB

Start with a few simple LabVIEW tutorial before starting such a project. (For example you might learn that "index array" is resizable.)
Then sit down and think about the code layout and design template that would be most approriate.
After glancing at your code for a few milliseconds, here are some of the glaring mistakes I noticed (I am sure there are many more...):
Your random number generator is flawed, because it does not produce an fair and even distribution. Edge elements only occur with half the probability of the other elements.
Why are there so many stop buttons?
You have a loop that does a gigantic amount of data manipulation based on exactly two local variables as fast as the computer allows. Except for filling a few meaningless indicators, most of the code gets stripped out by the compiler because it produces no output. So why is it there?
You have another small while loop that operates on the array based on the value of four local variables, repeating the same operation over and over, again as fast as the computer allows. If this calculation is important, it only needs to be done if one ot the inputs changes, and not over and over, millions of times per second. This code belongs in the event loop to execute when a mouse-down occurs and the code is in the correct state. It seems to swap two elements of a 2D array, this is much more easily done using the "in place element structure" and "" (or simply cross the wires).
Now let's have a look at the loop with the event structure:
Delete the timeout case since you don't use it.
You don't need a stacked shift register. Get the current value after the event structure and use a feeback node for the immediately previous value.
In the "mouse down" event you do some exceedingly convoluted calcuation based on the coordinates. For some ideas on how to do it better, have a look at my old 4x4 tic tac toe game posted here long ago. Your game is much simpler and I truly believe that your game could be written with code fitting on a postcard. Try it!
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • Frozen Game -- iPod unresponsive

    Right, so I got the Song Summoner game a few days ago (really spiffy, shameless plug, yadda yadda) and up until now, it has been working. I put my iPod on it's speaker/radio set for the morning while I did homework, and it seemed to be working just fine, though it was a little moody because it defaulted to my last selection, games, which it didn't know how to play. Once I'd redirected it towards the music, it was fine.
    So later I ejected it, intending to play the game, and was presented with the message,
    "This game cannot be launched.
    This may be a result of a full iPod.
    It's been stuck on that ever since.
    I'm pretty sure being "full" isn't the problem, since it was working last night, and I haven't added any music since then (nevermind that even with all my movies, it's still less than halfway full), so I'm inclined to believe that the speaker system caused the problem (hence the narrative at the beginning).
    I've pressed all the buttons (often simultaneously), connected it to my computer, connected it to the speaker system, and now it's just kind of sitting there. It's like a zombie, really. o_o;
    Is there a fix? I'm not opposed to a reset -- everything's on my computer anyways, it's not like I'll lose much -- but I'd like to avoid that if I could; I don't want to start over on the game.

    I'm having the exact same problem. Everything was working fine last night when i was listening to music, and this morning i tried to open up a game, and the message showed up. The ipod doesn't even show up on my computer when i connected it. I would really love to find out how to fix this. By the way, is your ipod still like that or did anything change?

  • Flash player 10 cause video player and games in internet frozen

    sir or madm,
         we have a problem with flash player 10.1 to cause frozen games and videos in the internet.  how we solve the problem to run smooth with games and video to use flash player 10.1   we need some help to solve problem.  thanks

    Hi Ken, Well I'm glad you have FP & IE8 back on good terms:-) Just for the record, I gave you some possible conflicts. You didn't seem as though you wanted advice, rather telling me what actions you had taken and that FP 10.2 was the problem.
    Had I listed specific conflicts, you would have been more aggravated than you already were:-)
    Sorry, but you may have responded in the same way, if you had been on this side of the forum for the past week and a half.
    Steve is correct in what he said. Some of the insults, cursing and more directed to me on a public forum has not been pleasant.
    I receive a lot and I mean a lot of email notifications so even tho the nasty comments have been taken down from the forum,
    my emails still exist.
    By the way, you don't see this very often at all on the Flash Forum. In fact I can't recall if I have ever seen that myself. Nice to see though:-) Post#20 at this thread: http://forums.adobe.com/thread/792233?tstart=0 
    Hitomi Kudo
    68 posts since
    Nov 12, 2009
    Thanks for posting back your progress, glad you tried again.
    Regards,
    eidnolb

  • Cannot make in-app purchases or retrieve purchased in-game content

    HELP!! Before anything else, this problem started immediately after the big iTunes update a few weeks ago. I have 32gb/3rd gen ipod Touch and it should not be experiencing these problems. I have latest software, also have in-app purchases turned on in settings on Touch.
    There are only two games I play regularly that have the in-app purchase feature. One is We Rule & other is DragonVale. I can click on the area where purchases can be made, but when I attempt to do so, it freezes the screen and I have to reboot iTouch. I've even had to un- and re- install both games NUMEROUS times. When I go back in, I can still play the game (collecting coins, harvesting crops or feeding/breeding dragons), but cannot make in-app purchase. I got a new game called Twisted Lands which has an in-game unlock feature (costs $) and I can't even unlock that game. Also, in We Rule, there is content that was purchased with cash (and not the game's version of cash, which is called mojo....you purchase mojo and then are able to rush crop production, purchase specific content, etc). Some of the content that was a cash only transaction is now unavailable to me due to this problem. For example, I have crowded realms in We Rule and did re-decorating. As such, I have to place certain items in the game's inventory....some items which were paid for as a direct cash (via iTunes of course) purchase. Because of the in-app problem, I cannot retrieve or access my own previously purchased content that sits in frozen game limbo (the item will show as loading but of course it never does).
    I've written to both game developers, ngmoco (for We Rule) and backflip studios (for DragonVale). Both were extremely courteous and both feel positive the problem is on iTunes' end and not theirs. I also wrote to iTunes/Apple Support and they have been unable to provide a solution. Their latest email to me was to come to this forum and post this problem. I was so frustrated the other day that I uninstalled both games, turned features off and then back on, restored iTouch to original settings and then reinstalled both games....did not help.
    I also thought about uninstalling iTunes on my computer and reinstalling it but have never done so and a little worried about doing that. I honestly don't know where else to turn or what to do about this problem. Anyone that can provide advice or assistance would truly be helpful. Thanks in advance!!
    ellylons

    HI...
    Since you already purchased the app, make sure subscriptions is turned on > iTunes Store: Purchasing and managing auto-renewing subscriptions
    iTunes Store: About In-App Purchases

  • GT70 0nc GTX 670MX Driver Crashes, and BAD performance.

    I purchased a gt70 ONC 494US and at first I updated all drivers and software on win 8 x64, I tried running multiple games off of steam and none of them were running smoothly, some of them not at all, (borderlands 2, arma II, fallout 3.....) I installed an SSD and a fresh version of win 7 64 ultimate, used only drivers from MSI, and still had crashes and couldn't even run a benchmark.
    The only solution I have found to run a select few games, is by uninstalling ALL nvidia software and drivers, using windows default VGA drivers for the 670mx, however, this only works for a few games, and some others won't start because they don't find a capable GPU.
    I have read MANY forums, most of them go through the typical, use the nvidia control panel to change the power settings, global settings, and roll back drivers to the originals. NONE of this made any difference.
    I have read that there is a firmware beta ec flash? But, even the tech forum from MSI the link didn't go anywhere. I know this is a common problem, and especially with steam games. Yes, the power light turns orange, and i turn on turbo mode, I also turned on the indicator showing the nvidia gpu is being used, but games will not get past the title screen if they start at all, and the nvidia driver crashes.
    Help?

    Quote from: t.s.girdwood;111417
    Currently I am trying the new 340.52, before this I had reset to FACTORY image with the original OEM drivers, 306.14 (I believe). For the intel, again I started with the OEM hd 4000 drivers, currently I have the may 2014 drivers, 10.18.10.3621. Before hand, no there was no error, just a frozen game I had to kill with task manager, now I am getting the error that the vram is full. Using GPU-z I see that the dedicated vram isn't even being used. Ideas?
    For the BIOS, EC firmware update, you can find them under the download page of MSI.
    Win8 BIOS:http://www.msi.com/support/nb/GT70_0NC.html#down-bios&Win8 64
    Win7 BIOS:http://www.msi.com/support/nb/GT70_0NC.html#down-bios&Win7 64
    update guide:http://www.msi.com/files/pdf/Flash_BIOS_by_UEFI_BIOS_Setup_Utility_en.pdf
    Win8 EC:http://www.msi.com/support/nb/GT70_0NC.html#down-firmware&Win8 64
    Win7 EC:http://www.msi.com/support/nb/GT70_0NC.html#down-firmware&Win7 64
    update guide:http://www.msi.com/files/pdf/Win8_EC_Update_Step_by_Step_Guide.pdf
    For the game settings GeForce Experience provides, I wouldn't say it's an optimized setting but the settings only for your references.
    Since the tested game environment and system configurations might be different, I'd go for my own settings in order to find the best gaming experience.
    Like BlueAlexFPS said, the GTX670M has similar performance as GTX765M, it would be ridiculous to have the same performance like GTX780M. If what you said is true, then why they are they putting 780M out on the market?
    I'd keep the graphics driver from MSI website, since a windows generic driver could gives you only the basic level graphics performance and not to mention without the Optimus, you wouldn't know if which graphics it's running.
    *Make sure you're having battery and AC adapter both plugged while running the games.

  • Sims Freeplay refuses to load but i CANNOT delete it!! I've made WAAAY too much progress... Can the mighty Cloud still store my info if I save now?....

    Hi guys, ok so my biggest problem is, is that I have made sooooo much progress in the Sims (like level 46-completed all alien goals, and just got the weather machine)  so I have never uploaded to the cloud --well it did upload a few times automatically but then I went in and deleted it to make more room but never uploaded again.
       My question is if I buy cloud space -it tells me to upload info I need about 20gb of space to upload all the info.  S that means I need to spend about 40bucks on more space just to upload my free game (and some pictures).   So I'm alright spending the money BUT my question is-- if I buy the space and do an upload for the sims, will it load the progress that I'm at currently?   Here's the dilemma; about a week ago, I was just making everyone go ice skating when it froze, so I gave it a minute....then another....then I went to another app and came back to it....then I shut down the app and started it back up and still frozen although when I went back to it, it stayed frozen and continues to stay frozen on the Sims loading screen...the blue one in the beginning. When I turn it on, I get the little tip for the day, and I hear the music start up and then change as if its about to turn the screen over so I can see my Sims but it just stays there" I am so upset about this!!! I know it's just a silly game but I have invested sooo much time and care into these guys and they are like my friends! Plus I'll never be able to get two story houses again or woodworking coins for elevators and all the other updates that just makes me want to cry      
    Please, please, please can someone help me! Please tell me some good news that if I upload to the cloud now, it'll be able to pick up the frozen game and get the progress and be able to save it!!!!!  Thanks for any advice you guys. I just have absolutely no idea what in the world to do 
       I am working on an   iPad 3(the new gen)
                                              32gb
    I'm not sure what other info you would need but please just let me know. Please and thank you in advance for any and all help! I am soo depressed.

    Yes,ranchers, I did try that a bunch of times- thanks for trying.
    I'm gonna list all the things I did (that I can can think of):
    Tried to force close the app.
    Turned on/off wiFi
    Tried letting it just run on the screen it's stuck at for like 15 minutes
    Ugh...my brain is turning off-I think it's frozen like my Sims!    Cornball I know.
    But I've tried everything I could think of which is a bunch more things than what I was able to list. And I'll do my best to answer any questions cause I know from looking all over on different forums that I'm not the only one this is happening to. It happened to a bunch of people who I think are still waiting for theirs to get fixed.
    Can the cloud save me if I upload today?

  • Very serious issue with MSI K8N Neo2-FX: need urgent help!

    Hi! I am facing the following problems:
    1. 3D Mark 05 demo, COD2 single player and Half Life 2 become semi-frozen.
    2. The audio loops, and audio & video go out of sync.
    3.VPU Recover/Infinite loop issue DOES NOT kick in.
    4. The semi frozen game responds poorly to mouse movement.
    Note: All redundant processes and programs in Windows XP are closed. My system specs:
    Athlon 64 3000+ E6
    256 mb ddr333 kingston valueram + 256 mb ddr400 kingston valueram=512 mb ddr333 total memory running in dual channel mode @ 2.5-3-3-7 (RAM is OK, worked fine on my previous system)
    MSI K8N Neo2-FX bios version 1.B0(latest) chipset: nforce 3 250gb http://www.msi.com.tw/program/produc...il.php?UID=649
    gigabyte radeon 9600XT BIOS Part Number BK-ATI VER008.015.058.000 (Card stable at 1.6 V AGP, 1.5 V gave me VPU Recover; Card ran fine on my previous system)
    Realtek ALC 850 onboard audio
    Antec SL 450 450 watt PSU (new, voltages ok) latest drivers/bios/firmware for everything Windows XP Pro SP2 + all updates. Please help.

    Quote from: Richard on 03-May-06, 08:40:18
    bhanja_trinanjan,
    If you can get 2.3.3.6 Mushkin, OCZ, or Corsair, then you would be the set.
    PC-3200 or higher would be the way to go. If you ever plan on overclocking, then PC-4000 is the best option.
    Take Care,
    Richard
    Thanks for your help. I am trying to locate Corsair dealers in Kolkata(My hometown). Are there any known issues with the K8N Neo 2 FX? I bought this motherboard just a few days back and I am facing so many problems.
    Does this motherboard undervolt the AGP and RAM slots? Will I have to increase AGP and DDR voltage to make my system stable? Doesn't the raising of these voltages shorten the life of the video card and ram modules? I want to buy Corsair/OCZ/Mushkin. But in case it's unavailable, will Kingston RAM lead to an unstable system?

  • While playing a game my iphone went completely frozen, it does not respond to any input, not even to holding down the on/off hey. Any ideas?

    While playing a game my iphone went completely frozen, it does not respond to any input, not even to holding down the on/off hey. Any ideas?

    Try a reset. That is holding the sleep/wake and home button together until you see the Apple logo and release. That will reset the iPhone, but will not affect your data.
    Thanks! It worked just fine!
    MRP66

  • I am trying to download a game app and it is just frozen saying it is waiting how can I just cancel it?

    I am trying to download a game app and it is frozen says waiting. How do I cancel it?

    If you are downloading multiple apps then they will download one at a time. If it's just the one app that you are downloading (and you're using wifi if it's over the 20 meg limit for 3G), then try a reset and see if it resumes loading after the iPad has restarted : ress and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • [games] frozen-bubble

    Frozen bubble is a highly addictive game .... http://www.frozen-bubble.org/
    One caveat : it is incompatible with SDL_perl 2.X which is in Arch right now (they say that several times on their home page, and I can confirm that :-( ).
    Hence, I made sdl_perl119 which provides the version that frozen bubble was coded with. Luckily after some digging, I found that the old version is still availablt on CPAN - no idea for how much longer, though. I hope (expect ?) that frozen bubble will be updated eventually ...
    I used quite a bit the "depends", "provides" and "conflicts" fields in the two packages. So beware ! I tested it, but that does not mean, the PKGBUILDS are perfect.
    EDIT on Oct 4th : Just to make life easier, here are the two PKGBUILDS :
    # Contributor: Andreas Schweitzer <[email protected]>
    pkgname=frozen-bubble
    pkgver=1.0.0
    pkgrel=1
    pkgdesc="Award winning, highly addictive game."
    depends=('sdl_image' 'sdl_mixer' 'sdl_perl>=1.19<=1.20' 'sdl_gfx')
    source=(http://guillaume.cottenceau.free.fr/fb/$pkgname-$pkgver.tar.bz2)
    url="http://www.frozen-bubble.org/"
    md5sums=('2be5ead2aee72adc3fb643630a774b59')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    make PREFIX=/usr || return 1
    make PREFIX=$startdir/pkg/usr install
    # Contributor: Andreas Schweitzer <[email protected]>
    pkgname=sdl_perl119
    pkgver=1.19.2
    pkgrel=1
    pkgdesc="The OLD version of SDL_perl. SDL Perl is a Perl wrapper for SDL, sporting all the SDL bits you would expect, including fullscreen OpenGL."
    depends=('sdl' 'sdl_gfx' 'freetype2' 'libjpeg' 'sdl_ttf' 'sdl_image' 'libpng' 'libogg' 'libvorbis' 'sdl_mixer' 'sdl_net' 'alsa-lib')
    source=(http://search.cpan.org/CPAN/authors/id/D/DG/DGOEHRIG/SDL_perl-$pkgver.tar.gz)
    url="http://sdlperl.org/"
    md5sums=('f4d532623cb3feddf7e54aece1de53e6')
    provides=('sdl_perl')
    conflicts=('sdl_perl')
    build() {
    cd $startdir/src/SDL_perl-$pkgver
    ./configure --without-alsa
    make || return 1
    make DESTDIR=$startdir/pkg install
    rm $startdir/pkg/usr/lib/perl5/5.8.1/i686-linux/perllocal.pod
    rm $startdir/pkg/usr/lib/perl5/site_perl/5.8.1/i686-linux/auto/SDL_perl/.packlist

    And here they come :
    First install sdl_perl119 with this PKGBUILD :
    # Contributor: Andreas Schweitzer <[email protected]>
    pkgname=sdl_perl119
    pkgver=1.19.2
    pkgrel=2
    pkgdesc="The OLD version of SDL_perl. SDL Perl is a Perl wrapper for SDL, sporting all the SDL bits you would expect, including fullscreen OpenGL."
    depends=('sdl' 'sdl_gfx' 'sdl_ttf' 'sdl_image' 'libvorbis' 'sdl_mixer' 'sdl_net' 'alsa-lib')
    source=(http://search.cpan.org/CPAN/authors/id/D/DG/DGOEHRIG/SDL_perl-$pkgver.tar.gz)
    url="http://sdlperl.org/"
    md5sums=('f4d532623cb3feddf7e54aece1de53e6')
    provides=('sdl_perl')
    conflicts=('sdl_perl')
    build() {
    cd $startdir/src/SDL_perl-$pkgver
    ./configure --without-alsa
    make || return 1
    make DESTDIR=$startdir/pkg install
    rm $startdir/pkg/usr/lib/perl5/*/i686-linux/perllocal.pod
    rm $startdir/pkg/usr/lib/perl5/site_perl/*/i686-linux/auto/SDL_perl/.packlist
    And after perl_sdl119 is installed build frozen_bubble from here :
    # Contributor: Andreas Schweitzer <[email protected]>
    pkgname=frozen-bubble
    pkgver=1.0.0
    pkgrel=2
    pkgdesc="Award winning, highly addictive game."
    depends=('sdl_image' 'sdl_mixer' 'sdl_perl>=1.19<=1.20' 'sdl_gfx')
    source=(http://guillaume.cottenceau.free.fr/fb/$pkgname-$pkgver.tar.bz2)
    url="http://www.frozen-bubble.org/"
    md5sums=('2be5ead2aee72adc3fb643630a774b59')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    make PREFIX=/usr || return 1
    make PREFIX=$startdir/pkg/usr DESTDIR=$startdir/pkg install || return 1
    rm $startdir/pkg/usr/lib/perl5/*/i686-linux/perllocal.pod
    rm $startdir/pkg/usr/lib/perl5/site_perl/*/i686-linux/auto/fb_c_stuff/.packlist
    In case it should not work, I'll put tar balls with everything on http://bootblock.de/arch/
    Something else, I noticed : that
    http://sdl.perl.org/ seems to be now maintaining SDL Perl - and they seem to be considering 1.20.4 to be the latest version ....

  • I have made an in app purchase then the game has frozen but still taken my money

    For the 3rd time now i have made an in app purchase and then the app has frozen but still taken my money.
    it is getting ridiculous and i want something to be done about this

    If you haven't received the item then try the 'report a problem' page to contact iTunes Support : http://reportaproblem.apple.com
    Or you can try contacting iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    For the game freezing, have you tried closing it via the phone's taskbar, doing a soft-reset of your phone, and if they don't fix it reported it to the game's developer ?

  • Part downloaded game frozen, how can I delete

    Partly downloaded game on Safari frozen.  Can't delete
    cant quit, frozen.   How do I fix this please helpplease help

    You don't download games from Game Center, you download them from the AppStore.
    Touch and hold on the icon until it jiggles, then press the X to delete.

  • TS1702 20 in 1 games is frozen.can't even exit.....can anyone help

    Hi, I bought the app 20 in 1 games and it installed fine.i" m playing a hidden object game and I"ve completed level 1 no problem,but with 3 things left to find on level 2..... It has frozen.i can" t even exit.....can anyone help please

    Try a Reset [Hold the Home and Sleep/Wake buttons down together for 10 seconds or so (until the Apple logo appears) and then release. When the screen goes blank then power ON again in the normal way.] It is 'appsolutely' safe!

  • HT4314 How do i get out of a frozen screen that says "updating games"?

    How do I get out of frozen screen that says "updating games"?

    Reset:
    Hold the home and power buttons at the same time until the Apple boot logo appears. No data will be lost.

  • My bejeweled game is frozen and I can't get it unstuck

    My game bejeweled is frozen and I can't get it unstuck.  Help.

    Hi pam5551,
    Welcome to the Support Communities!
    The article below may be able to help you with this.
    Click on the link to see more details and screenshots. 
    iOS: Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/ts1702
    Cheers,
    - Judy

Maybe you are looking for

  • I keep getting "The document could not be saved. A file I/O error has occurred."

    Everytime I try to save a PDF file in Reader X... "save as...PDF" I get the "The document could not be saved. A file I/O error has occurred." When I save it "save as...Text" is saves.

  • [Help] Windows 8.1 - Windows Update Cleanup not clearing

    Hi guys, I've been troubleshooting my MSI Laptop GE40 for quite awhile now, but I am just unable to find a solution online. My laptop is running Windows 8.1, I was doing some cleaning up for my laptop using Disk Cleanup. After running Disk Cleanup (W

  • Sql statement takes long to execute even with index

    Hi I have the following sql statement. Its explain plan states its "TABLE ACCESS FULL". But upon creation of index for table PWRKF2MV, using IDX(pafidt,ppdept,prodno,ppname) and IDX2(pmfaci,prodno), it uses both indexes but time taken to execute is s

  • Urgent: question about timing in LabVIEW

    Good Evening .. First of all, I'am a labVIEW beginner so be easy on me! I want to check if an input has the same value for a certain amount of time, for example, if some input has a voltage above 2 V for 10 seconds, how can I express that using a for

  • Capacity Planning - CM38

    Hi All, I am doing a report similar to CAPACITY PLANNING - CM38, My problem is I am unable to get the data, I wonder how to pick the data from all the tables, In selection screen just entering Workcenter and Plant and alll details about the Planned o