I need help using a string to turn into a map with custom barriers. i am loading the string into the matrix with a for( loop this is the code...

Code:

"<String>"→Str1
1→C
For(Y,1,8
For(X,1,16
sub(Str1,C,1→Str2
If Str2≠" "
1→[A](Y,X
End
End

I need a faster way to do this, or i could turn it into a 2D side scroller which i don't know how to do.
If you use 1 and 0 in the string instead of 1 and [spaces], you can improve this but shuffling strings and matrices will always be pretty slow...

Code:
"<String>"→Str1
1→C
For(Y,1,8
For(X,1,16
expr(sub(Str1,C,1→[A](Y,X
C+1→C
End
End

I'm assuming you meant to have C+1→C in there as well.
Thanks, now i can get to work on my sidescrolling game. (Hint... Among Us)

Good Idea
  
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