So a little while ago, I ported a minigame for the PokeMini called Snorlax's Lunchtime to the TI-84+/SE calculators. I've been learning how to program in C on the TI-84 Plus CE, and I thought I'd make a port of this game again, but with a little more features and better speed, written in C!

Current Screenshot


If you can't tell from the screenshot, the goal of the game is to eat the food before the arrow moves across the screen, or if it's not food (The Pichu) don't eat it. The gray border around the screen is because the original game was made for a 2:3 aspect ratio.

To-do

Sprites: 100%
Animations: 100%
Scoring: 100%
Menus: 100%
Difficulty (Speeding up if your score is higher): 100%
Bug Testing: 100%


GitHub

You can find the project on GitHub, but the code is really bad (This is my first project in C) so if you've got a weak stomach, read at your own risk!

Feel free to leave any feedback or suggestions in the post! Very Happy
I think that this looks fantastic so far! Writing it in C sure was a great idea, in my opinion. I love how the screenshot and I can't wait to see this released. Great work so far and keep up the amazing work, TIny!
Optimizations and a graphical bug:
    -You use multiple nearly identical background sprites for drawing the snorlax waving it's arms, you can just draw the snorlax and only use one background sprite, or three for the parts of the HUD.
    - The food and pichu sprites can have the right margins shrunk, the pichu sprite really needs it.
    - Every sprite you use would benefit from RLET, but since you scale them I suppose it's not possible unless you store them at full size.
    - The help, new record, and ranking menus use the same margin with different sizes, so all you need is gfx_FillRect() to draw the black part and then a loop to draw the pixels. The text and other elements can be turned into sprites too.
    - Store the idle* and food/pichu sprites as an array for the draw() function.
    - I'm not going to ruin the fun of improving the high scores bit, but the logic is to run from the lowest score to highest and move each one down if it's lower than the current, deleting 5th place and/or not doing anything if it's really low.
    - Clearing out of the game shows the main menu for a frame, it's hard to see but it is noticeable.

All things considered, it's really solid for a first-time project! I give this a 0/10 for no random inedible calculator easter egg.
I saw hee original a while back and was saddened that I couldn't play it on my CE (not realizing that z80 and eZ80 aren't compatible -- at least, not fully), so I'm glad that you're porting this!

By the way, code is code, so just as long as it doesn't spectacularly crash and is faster than a CSE, it's releasable in my book. That being said, it is generally a good idea to follow conventions for style and other things (I think there's something about "no global variables") partially because CEDev doesn't like it otherwise.

but that's mateos fault lol

Keep up the good work, and I hope this turns out well! (and yes, put in a calc easter egg pls)
Hey your code is actually decent.

A couple pointers:
  • In game.c, the first include should be game.h. This ensures that headers include all of the supporting headers they actually need. This should be applied to the other files in the repo too -- you should always include your headers before toolchain ones.
  • 16 bit integers are slower and take up more code space, so you should probably avoid them.
  • Try and see if you can get rid of the global high scores variable.

Keep up the good work, this looks fun Smile
Thanks for the kind words and tips everyone! Smile

I've been working on some of the suggestions, and I also added an easter egg! I'm not going to tell you where the easter egg is, go figure it out yourself

Thanks again for the feedback, I really appreciate it! Very Happy
I've been working some more on the program and I've made a lot of improvements! I also added difficulty, so the more your score goes up, the faster the food will fall and the less time you will have to tell what the food is before you can eat it.

Mateo: What should I use instead of 16 bit integers, and why are they slower? Just curious, and I'm excited to learn more about C on the CE Smile
Use "int", "unsigned int", "int24_t", "uint24_t" - The ez80 doesn't have native support for 16 bit operations and requires a greater compiled assembly size.
I'm happy to announce that I've released the first version of the game! You can get it from the releases page on GitHub or download it from Cemetech here: http://ceme.tech/DL2218

Please be sure to leave any feedback or bugs you find, and I hope you enjoy! 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