I got it to work, but it needs collision detection.
It is seemingly bug free.

Code:
'ProgramMode:RUN
1->Theta
1-><r>
2->X
2->Y
5->V
5->W
"_#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5_"->Str 1
"_#E5B5_       _#E5B5_                      _#E5B5_                                          _#E5B5_                 _#E5B5_      _#E5B5_"->Str 2
"_#E5B5_                                                   _#E5B5_                      _#E5B5__#E5B5_                      _#E5B5_"->Str 3
"_#E5B5_     _#E5B5_                  _#E5B5_                 _#E5B5_                          _#E5B5_                            _#E5B5_"->Str 4
"_#E5B5_    _#E5B5_                 _#E5B5_  _#E5B5_                                         _#E5B5_ _#E5B5_                  _#E5B5_         _#E5B5_"->Str 5
"_#E5B5_  _#E5B5_             _#E5B5_        _#E5B5_          _#E5B5_                               _#E5B5_                   _#E5B5_         _#E5B5_"->Str 6
"_#E5B5_    _#E5B5__#E5B5__#E5B5_                  _#E5B5_                                            _#E5B5_ _#E5B5__#E5B5_              _#E5B5_         -"->Str 7
"_#E5B5_                         _#E5B5__#E5B5_                                                           _#E5B5__#E5B5_          _#E5B5_"->Str 8
"_#E5B5_                          _#E5B5_                                          _#E5B5__#E5B5_                       _#E5B5_   _#E5B5_"->Str 9
"_#E5B5__#E5B5__#E5B5_                                              _#E5B5_                   _#E5B5__#E5B5__#E5B5_                           _#E5B5_"->Str 10
"_#E5B5_                      _#E5B5_                         _#E5B5_ _#E5B5__#E5B5_                                              _#E5B5_"->Str 11
"_#E5B5__#E5B5__#E5B5__#E5B5_                         _#E5B5_                                            _#E5B5_   _#E5B5_                    _#E5B5_"->Str 12
"_#E5B5__#E5B5__#E5B5__#E5B5_                         _#E5B5_                                            _#E5B5_   _#E5B5_                    _#E5B5_"->Str 13
"_#E5B5_      _#E5B5_                  _#E5B5_    _#E5B5_                                                          _#E5B5_        _#E5B5_"->Str 14
"_#E5B5__#E5B5_                     _#E5B5__#E5B5__#E5B5__#E5B5_                        _#E5B5_                  _#E5B5_                            _#E5B5_"->Str 15
"_#E5B5_    _#E5B5_  _#E5B5_                 _#E5B5_                        _#E5B5_                                     _#E5B5_      _#E5B5__#E5B5__#E5B5__#E5B5_"->Str 16
"_#E5B5_                        _#E5B5__#E5B5__#E5B5_                                          _#E5B5_                  _#E5B5_   _#E5B5_     _#E5B5_"->Str 17
"_#E5B5_    _#E5B5__#E5B5_                                              _#E5B5__#E5B5_                                            _#E5B5_"->Str 18
"_#E5B5_                         _#E5B5__#E5B5__#E5B5_ _#E5B5_         _#E5B5_             _#E5B5__#E5B5_    _#E5B5_ _#E5B5_         _#E5B5_                _#E5B5_         _#E5B5_"->Str 19
"_#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5__#E5B5_"->Str 20
Do
While X=X
Locate 2,2,<r>+X-1
Locate 2,3,Theta+Y-1
If Getkey=28 And Y<>2
Then X->V
Y->W
If Theta<>1 And Theta<>14
Then Theta-1->Theta
Break
IfEnd
If Theta=14 And Y=4
Then Theta-1->Theta
Break
IfEnd
Theta=1 Or Theta=14=>Y-1->Y
Break
IfEnd
If Getkey=37 And Y<>6
Then X->V
Y->W
If Theta<>1 And Theta<>14
Then Theta+1->Theta
Break
IfEnd
If Theta=1 And Y=4
Then Theta+1->Theta
Break
IfEnd
Theta=1 Or Theta=14=>Y+1->Y
Break
IfEnd
If Getkey=38 And X<>2
Then X->V
Y->W
If <r><>1 And <r><>80
Then <r>-1-><r>
Break
IfEnd
If <r>=80 And X=11
Then <r>-1-><r>
Break
IfEnd
<r>=1 Or <r>=80=>X-1->X
Break
IfEnd
If Getkey=27 And X<>20
Then X->V
Y->W
If <r><>1 And <r><>80
Then <r>+1-><r>
Break
IfEnd
If <r>=1 And X=11
Then <r>+1-><r>
Break
IfEnd
<r>=1 Or <r>=80=>X+1->X
Break
IfEnd
WhileEnd
Theta=1=>Locate 1,1,StrMid(Str 1,<r>,<r>+20)
1<=Theta And Theta<=2=>Locate 1,3-Theta,StrMid(Str 2,<r>,<r>+20)
1<=Theta And Theta<=3=>Locate 1,4-Theta,StrMid(Str 3,<r>,<r>+20)
1<=Theta And Theta<=4=>Locate 1,5-Theta,StrMid(Str 4,<r>,<r>+20)
1<=Theta And Theta<=5=>Locate 1,6-Theta,StrMid(Str 5,<r>,<r>+20)
1<=Theta And Theta<=6=>Locate 1,7-Theta,StrMid(Str 6,<r>,<r>+20)
1<=Theta And Theta<=7=>Locate 1,8-Theta,StrMid(Str 7,<r>,<r>+20)
2<=Theta And Theta<=8=>Locate 1,9-Theta,StrMid(Str 8,<r>,<r>+20)
3<=Theta And Theta<=9=>Locate 1,10-Theta,StrMid(Str 9,<r>,<r>+20)
4<=Theta And Theta<=10=>Locate 1,11-Theta,StrMid(Str 10,<r>,<r>+20)
5<=Theta And Theta<=11=>Locate 1,12-Theta,StrMid(Str 11,<r>,<r>+20)
6<=Theta And Theta<=12=>Locate 1,13-Theta,StrMid(Str 12,<r>,<r>+20)
7<=Theta And Theta<=13=>Locate 1,14-Theta,StrMid(Str 13,<r>,<r>+20)
8<=Theta And Theta<=14=>Locate 1,15-Theta,StrMid(Str 14,<r>,<r>+20)
9<=Theta And Theta<=14=>Locate 1,16-Theta,StrMid(Str 15,<r>,<r>+20)
10<=Theta And Theta<=14=>Locate 1,17-Theta,StrMid(Str 16,<r>,<r>+20)
11<=Theta And Theta<=14=>Locate 1,18-Theta,StrMid(Str 17,<r>,<r>+20)
12<=Theta And Theta<=14=>Locate 1,19-Theta,StrMid(Str 18,<r>,<r>+20)
13<=Theta And Theta<=14=>Locate 1,20-Theta,StrMid(Str 19,<r>,<r>+20)
Theta=14=>Locate 1,7,StrMid(Str 20,<r>,<r>+20)
Locate V,W," "
Locate X,Y,"O"
LpWhile X=X

Note: The map isn't rendered until after you move the first time.

Old post: When you use the LOCATE command with a String, the whole string is placed on the screen at once. Using simple equations, you could change the start of the string displayed. Combine these with 7 strings down the screen and you would not only have very fast map rendering, but you would also have easily changeable graphics on the screen. The only problem is, I don't see how collision detection would work.

However, even on a Prizm with a max String length of 255, this would increase the max size of a map from 21x7 to 255x99(Not sure about the Y coord).
Clever idea. By Y-Cord do you mean the graph screen or the X and Y coords on the home screen? If so, shouldn't it match the number of strings you can have? In this case it looks like 99 from your post.
By Y coord I mean the number of rows available for text on the regular screen, and yes. I'm just not sure how many strings I can have at once.
I'm not sure what the Casio equivalent of substring is, but you could probably use that. If I remember correctly, there is some pretty outstanding support on their calcs, so I'm sure there's some command to do it. Smile
StrRight I believe selects everything after a certain number.
You should be able to use that or some other command to get all the characters around where the current user is, and then just check with that. I don't know how the strings are held or anything. If it's like on the TI, you'll have to have some if statements to check if the user is in row three, than above him is Str2 and below him is Str4, or something like that. Having those would probably mitigate the usefulness of this, unless you're able to store them in some kind of array. Assuming I'm understanding what you're saying correctly.
For the strings problem, you could still achieve impressively large maps with a limit of just 10 strings with your proposed method of map recal and rendering. One possible ammend to it could be to support 64*40 cell maps with only ten strings, each 255 chars long, by splitting each string into four 64 char long rows right before rendering. It would be a bit more work and slightly slower, but not too hard to not consider Smile
Maybe I could get together with some programmer buddies and build one awesome map engine.
Sarah wrote:
Maybe I could get together with some programmer buddies and build one awesome map engine.


You seem to be in the perfect place to find programmer buddies Smile
She could also have some outside Cemetech, Ashbad.

Sarah wrote:
Maybe I could get together with some programmer buddies and build one awesome map engine.
GoGoGo!
comicIDIOT wrote:
She could also have some outside Cemetech, Ashbad.


But we're for sure the cool ones!
Need some Prizm buddies first D:
Aw, Sarah. If I had more time to devote to my Prizm outside my work and hobby I'd totally be right there next to you on this.

Post a project topic and slowly develop it. People will get interested over time as more people get Prizms. Perhaps I'll take some time out of my hobby and learn the Prizm so I can slowly update it with you.

You plan to do this in BASIC, right?
comicIDIOT wrote:
Aw, Sarah. If I had more time to devote to my Prizm outside my work and hobby I'd totally be right there next to you on this.

Post a project topic and slowly develop it. People will get interested over time as more people get Prizms. Perhaps I'll take some time out of my hobby and learn the Prizm so I can slowly update it with you.

You plan to do this in BASIC, right?

Yeah
I got the scrolling to work - However, two bugs came up, the map scrolls in the direction opposite of that you move in, and it renders the wrong side of the map.
Sarah wrote:
I got the scrolling to work - However, two bugs came up, the map scrolls in the direction opposite of that you move in, and it renders the wrong side of the map.


You should share the source, perhaps we'll be able to guide you through fixing it Wink
Okay Very Happy
No collision detection yet. I reversed the X+1->X and X-1->X so that the reverse scrolling was 'fixed'. But the other issue has not been fixed.

Code:
'ProgramMode:RUN
1->X
4->Y
5->V
5->W
"----------------------------------------------------------------------------------------------------------------------------"->Str 1
"-                                              944                                          95                             -"->Str 2
"-      9                                          94                                     8                                 -"->Str 3
"-                                              9    8                5                                                     -"->Str 4
"-    9                                                              _^<2>_ 6                                          4         -"->Str 5
"-                         6                                                              9                                 -"->Str 6
"----------------------------------------------------------------------------------------------------------------------------"->Str 7
Do
While X=X
If Getkey=28 And Y<>1
Then Y->W
Y-1->Y
Break
IfEnd
If Getkey=37 And Y<>7
Then Y->W
Y+1->Y
Break
IfEnd
If Getkey=38
Then Y->W
X+1->X
Break
IfEnd
If Getkey=27
Then Y->W
X-1->X
Break
IfEnd
WhileEnd
Locate 11,W," "
Locate 1,1,StrRight(Str 1,X)
Locate 1,2,StrRight(Str 2,X)
Locate 1,3,StrRight(Str 3,X)
Locate 1,4,StrRight(Str 4,X)
Locate 1,5,StrRight(Str 5,X)
Locate 1,6,StrRight(Str 6,X)
Locate 1,7,StrRight(Str 7,X)
Locate 11,Y,"O"
LpWhile X=X
It seems all okay to me, but I guess there's something in there still causing that second error -- what exactly do you mean by the "wrong side of the map"? Is it backwards, upside down, or something?
Ashbad wrote:
It seems all okay to me, but I guess there's something in there still causing that second error -- what exactly do you mean by the "wrong side of the map"? Is it backwards, upside down, or something?


You should start on the left side, but you start on the right.
Well, I'm not sure (can't test it right now), but it seems that the problem is near the end; you don't seem to draw the player (Which I assume is the 'O'?) with an X coordinate; you draw it at (11, Y). Could that be it?
  
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 2
» 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