This is my snake game code, which I have been working on for almost a year now. It is only about 960 Bytes, and has some great features. There is a high score table of 35 high scores; the game can be paused (and unpaused) by pressing the 2nd button; while the game is paused, press mode to quit; there is an indicator to show which end of the snake is the head while the game is paused, just so you remember for when you go to unpause the game; there is a display at the bottom of the screen that actively tells you your score; game play is continuous so there arent levels, but the calc won't run out of ram while you play, nor will it slow down; the highest score possible is 400, or a length of 404, because the snake starts at a length of 4. Note that Weregoose gave me a small optimized piece of code on an older thread. This code segment that he wrote is an optimized version of the original section of code that I wrote and was using until he helped me out. His optimized version saved me a few bytes. I don't remember exactly how many, but I think it was 5-10. I do not believe that his optimizations had any impact on the speed of the program; if they did affect the speed, it wasn't noticeable.
I will specify exactly which lines of code are not my own when I finally post the program (PROGRAM POSTED BELOW).
The maximum speed of the game under ideal conditions is approximately 15 fps, but I believe it to generally run at about 13.5 fps, at least on my calculator. I did actually measure, many times, so these numbers do mean something.
Other features of the game:
If you are in the middle of a game, and you get a high enough score for it to make it on the scoreboard, and you quit the game for whatever reason, the program WILL update the highscore table with your new score.
There is a simple title screen that also explains the controls of the game
There is menu with 3 options
I think these are self-explanatory.
Anyway, keep in mind that this is likely not the final version. Therefore, I would appreciate it if anyone with any optimizations keep them to themselves, as I want to figure it out on my own. Any and all feedback is welcome (good or bad; I also would be glad to see suggestions), but please do not post alternative codes or optimized segments of code (if I need optimizations, I'll ask for help, just as I did in the case where Weregoose provided me with assistance). I hope you all like my version of snake.
One final thing:
In my experience, this program has been unbearably slow on the TI-83+, so I recommend playing it on the TI-84+ or the TI-84+SE
This version of this program was designed for 2.55MP