I've created a port of the PICO-8 platformer Celeste for the TI-84+CE. You can download it from GitHub or the Cemetech archives.

This mostly just involved hand-translating the code from the original version into C++ and then implementing the PICO-8's built-in functions. I did run into a few interesting challenges, though.

Firstly, the original program made extensive use of floating point numbers (which were actually 16.16 fixed point on the PICO-8). For speed reasons, I replaced every floating point operation with an integer one, and changed the way that speeds are stored from units of pixels to 1/256 of a pixel.

I also replaced the type object for each object with a class for each object type, which is significantly more sensible in C++. I disabled all of the sound code, for obvious reasons. If anyone gets an audio library working, I might revisit that.

The graphics are probably the most interesting part of this. The original game is 128x128, but I decided to scale it up 2x and trim off the top and bottom 8 pixels.

The LCD controller is actually in 4bpp mode, but I'm just using graphx and fontlibc for drawing the actual graphics. I left all the sprites in 8bpp mode, and converted them with a different palette, where the upper and lower nibbles of each palette entry are the same. This allows me to double the width of each pixel drawn while still using regular graphx functions.

This left spaces between lines, though, so at the end of the frame I copy each line down by one pixel to completely fill the screen. So, this allows pretty much free 2x scaling, so long as you have 16 or fewer colors.

Additionally, rather than redrawing the entire tilemap each frame, I generate it once and save it as an 128x128 RLET sprite.
Oh my goodness! This looks amazing, i had wondered if the CE could do this game and it looks like it's working perfectly.
This looks fantastic, great job Smile
Looks very nice! I like the animations and this also reminds me a bit of Cave Story for some reasons.
Looks amazing, congratulations!

I've mentioned this topic on the TI-Planet chat, I have no doubt that this will get a front-page feature there at some point - well deserved!
Looks great-I especially like the snow on the title screen and all of the smooth animation. What kind of performance are you getting relative to the original?
The original game runs at 30 FPS, and this port pretty much always runs at that speed if you're standing still, and only a bit slower than that when you're moving on some levels. I added frameskip, so the game should run at the same speed at all times, with only graphical stuttering if it's running very behind.

I also used Tanks!'s profiler during the development process, so here's the breakdown of what it's doing each frame (in this case, on level 3):

Code:
Average of last 256 frames: 37 FPS
  total: 26.458 ms
    draw: 16.950 ms
      spr: 0.651 ms
      map: 2.892 ms
        tilemap_1: 1.023 ms
        tilemap_2: 1.708 ms
        tilemap_3: 0.348 ms
      obj_draw: 4.106 ms
        player_draw: 2.728 ms
      particles: 4.760 ms
      clouds: 2.252 ms
      deinterlace: 2.979 ms
    update: 6.478 ms
      move: 1.689 ms
        move_x: 0.436 ms
        move_y: 0.903 ms
      collide_player: 0.053 ms
      collide_other: 0.375 ms
      obj_update: 6.050 ms
        player_update: 2.874 ms
This looks sick.
Awesome work! That's a really cool result!
This looks freaking awesome. Good work Smile
I only played this for a few minutes but it was really fun! The game runs way too smoothly for a port that only took about a week to make Razz
I never played the original game so I'm slowly getting use to the controls and game mechanics. Overall it's a great program, well done!
This looks great! I can't wait to give it a try Smile
It's so beautiful! It's cool seeing how you handled the graphics and LCD stuff too. Great work!
Interesting ! I wanted to make a fx-CG 50 port of Celeste classic but I was to lazy to convert Lua to C. Thanks to you this will maybe be a thing Smile
I've been playing this and I really enjoy it. So far I'm at 1600 meters Razz Great job on the port! Are you thinking about doing Celeste classic 2 at some point?
This reminds me... Someone really ought to make a Tomb of the Mask port for the CE...

Me, perhaps?

(jk i suck at anything but TI-BASIC and occasional ICE S pseudocode)

EDIT: [s]Wish this game didn't freeze up and require a RAM reset whenever you die...[/s]

Edit again: Actually, it's just on the first level. About 25% occurrence. Any thoughts?
This is awesome! Wanted to make a comment earlier but completely forgot...
Anyway, keep up the amazing work!
This looks geat! Way to go Smile
Update time!

I added a practice mode for speedrunners, and implemented saving on exit. I also fixed a potential crash, a strawberry that wouldn't collect properly, and multiple graphical issues.

During the process, I found an interesting compiler bug - LLVM will turn fwrite with a size of 1 into an fputc, but it does so in a stage where it's no longer aware that sizeof(int) == 3. So, it ends up trying to pass a uint32 to the function, which causes it to be called with the wrong arguments. I ended up just disabling optimizations in that function, since that's really the only thing in it.
Oh my goodness!! I can't believe I'm just now noticing this! Laughing
Is it feasible to create a library using your implementation of "PICO-8 built-in functions"?
  
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