I am making a version of the iPhone game Don't Step On The White Tiles (hence the name), but need help with one thing- moving the tiles down. I've tried this:

Code:
For(A,3,1,-1
rowSwap([A],A,A+1→[A]
End

It just takes too long. Also, I've done this to display the matrix:

Code:
For(A,1,4
For(B,1,4
Output(A,B,sub("0-",[A](A,B)+1,1
End:End

Again, it takes too long. The code itself is easy, but very lagging. Any help would be appreciated.
I don't know of a faster way to manipulate that matrix, unfortunately. And that display method is about the best you can do with a matrix. You could speed up displaying if you used a string to store the data rather than a matrix, but that would make manipulating the data much slower.
Okay, guess it'll just be another lagging game. Thanks, though. And I have Mines to keep me busy...
I'm not familiar with the game, but why do you need to move the rows down? Could you move them up instead? If you switch to strings, it might be easier and quicker to use substrings and concatenation instead.
This is the game:
http://www.cultofmac.com/269960/dont-step-white-tiles-ultimate-test-reflexes-video-review/

I guess you could move upwards, but could you please explain concatenation? I wanted it to be more like the game.
(But... I could have the user hold the calc upside-down... Very Happy )
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement