I have been making ti-basic programs and games for several months now so I'm pretty good at games. For every game I make I add a new feature to expand my knowledge of programming in ti-basic. The next thing I want to learn how to do is make a scrolling screen. So like if a character in my game moves, he doesn't move but the screen around him moves. The only success I've had with this is inputting a huge string and having a subprogram recompile the string into a new string then outputting it. This method does work, but it's super slow and it's impossible to make a practical game out of it. I need help with this. What is the most efficient way to make a scrolling screen in ti-basic?
A scrolling screen is, as you mentioned, a nightmare in TI-Basic due to its speed. When it comes to graphics in general, the only way you can hope to speed things up (beyond using assembly, which is a completely different story) is to make either the data storage or the drawing engine more efficient. One method I've used for large graphics is to store data using strings that indicate the length of an object.
Example: Say I have a platformer and I am making a level with a platform that is 4 units long. Instead of encoding "XXXX" (or whichever character you use) for the platform, I could use "4X", which is much shorter. This isn't that hard to do using inString( and sub( commands and it can make data storage much more efficient space-wise. It also helps with drawing, because instead of using 4 Line( commands, you can use one command with a length of 4.
To connect this back to the scrolling screen question, you could load a string for the entire level, but only have the drawing engine draw a portion of it. Another option is to draw everything you've already drawn, but moved one unit over and then fill in the gap on the other side. A third option (might be slower or faster depending on the situation) is to only draw what has been changed so you don't waste time redrawing the same line.
Considering that you have made games like Pokemon in TI-Basic, it wouldn't surprise me if you already know of these techniques, but just in case you were unaware, I thought this might help out a bit. Screen scrolling is quite slow and usually impractical in TI-Basic, no matter how it is executed, but there are ways you can at least make it a bit faster.
Thanks for response kg583! That is what I was dreading: the impossibility of making a real practical game utilizing screen scrolling. I´d like to thank you for reading my other posts by the way! Yes the technique you are describing is the one I have tried and while it does work, it takes about 3-5 seconds for the calculator to load the movement. In the other games I make which utilize a flat map, it takes about the same time to load an entire new screen while for the program I was making for screen scrolling (prgmKIRBY) it has to load the new screen for each movement. Thanks for your thoughts on it tho!
I don't know nearly as much as kg583 but keep this in mind:
-When on the homescreen, one output command can cover the entire screen so by adjusting the string you can shift the display
-When on the graph screen there is an easy to use assembly hexcode for scrolling.
I never really thought about using the homescreen, but now that you mention it scrolling would be a lot easier (at the sacrifice of detail). Also, the hexcode for screen shifting only works for grayscale calculators (we're still trying to find the color version) and can be found here.