This is a demo for a system I developed that can store console-size game worlds on a Pico-8 cart. It contains every level and sublevel map from the original Super Mario Bros., and you can run and jump through all of them. There's no level progression, sound, or things to interact with besides platforms, but the map data includes placeholders for enemy spawn points and interactive objects, just uncomment a line in the init() function to make these visible. I'm not planning to release the finished game, as I don't want it to be taken down for copyright reasons, but I wanted to show some definitive proof that large-scale games are possible on Pico-8.
Cart Technical Info:
- Uses standard map() and sprite flag functions (w/special camera offsets)
- 60fps w/ CPU usage between 11-25%
- 1352 tokens, including streamlined platformer engine and graphics/map decompression systems
- 35% of compressed storage limit
- All maps contained in 3.9KB of binary data in map area
- No data stored in the 8KB spritesheet
The big thing is the last point on the list. Instead of storing the nearly-incompressible level data in strings, I instead store the spritesheet in a string because it compresses over 2:1, leaving a full 12KB of potential level storage space. This means that while leaving the majority of compressed data capacity and token count unused, 3 copies of every Super Mario Bros. level could fit on the cart! By my estimates, the worlds of mid-tier NES games like Megaman, Ninja Gaiden, Castlevania, Zelda, and even SMB2 (or original ones with similar scope and detail) could fit within that 12KB limit with some optimization. For instance, I estimate that Zelda 1's whole world could fit in around 6KB.
This demo was built entirely in Pico-8, using a graphical level editor that I plan to release in the near future. It's currently a bit limited due to being tailored to the quirks and limitations of SMB, but I intend to add some more features and make it easy for anyone to build their own large game worlds using a simple point-and-click interface. Here's a little preview =).
Oh hey, neat! I had this same exact idea a while back and I messed around for a bit trying to make something similar myself, yours seems a great deal more efficient, though, using the whole map I would've likely only just barely managed to cram everything in. It's messy and really only an experiment that I was messing around with, and I did everything by hand and etc etc etc, anyway, good job! I have a considerably more complex metatile system I use based off the Genesis/Megadrive Sonic games, I should definitely try and see if I can use your tricks to make that more efficient.
Feel free to use my tiles, not just you, but anyone who wants to. I feel I did a good job replicating the look of the originals. You've definitely got a nicer Mario sprite, though. It'd honestly be really cool to see someone port a full-length NES game, shame that doing so at least with SMB1 will likely incur the wrath of the big N. I may attempt to port one of the 8-bit Sonic games someday myself, though.
Thanks, (oh, and btw, I do really like your small Mario sprite =)
I know others have worked on metatile-type systems before, I just wanted to push things further with a really efficient system that lots of people can use. Hopefully people will like and use my editor once it's released, as I'd like to see more games that don't require devs to invent a new custom compression system or cut resolution or active screen area in half to fit much content on a cart.
I think my approach is simpler than others largely because I haven't learned to code using elaborate scripting and OOP, but very basic stuff (including tinkering a bit with actual BASIC). I actually got the core idea from watching a tutorial from Doc Robs on YouTube in which he used the map() function multiple times at once to make a scrolling background. I wondered if this could be used for individual objects in a level like trees and blocks. With some trial and error I figured out how to make levels this way, with the map data area serving as a sort of scratchpad, or palette of objects that can be mapped wherever I want.
Here's a super-compact version of the core idea that takes just 135 tokens and (besides the data strings) uses fewer characters than a single tweet. It only has a chunk of Level 1-1 which I repeated a few times because I had to code each object in by hand in hex, but it's capable of full levels. My current build has more storage-efficient level formatting, is way easier to make levels for, and makes game interactivity much easier, but the basic idea is very straightforward.
Metatiles and mirroring (simetric metatile so you store only half of it) has been a solid proven approach to increase map size reducing variation in map desing for ages, particularly in NES. There's even extremes like zelda that had full screen height 16px wide metatile columns and conformed the screens with very few bytes each. Nice to see some good implementations on that.
What do you mean, exactly?
Thanks, this took quite a while to get working how I wanted, but I just got annoyed that I was able to make a little tweetcart platformer in 280 characters that was 160 screens in size, but would be limited to a world 1/5 that size using the standard map system.
I'm working on ideas for the next version of the editor, hopefully making it versatile enough to handle a wide variety of games. At the moment I'm trying to see if the game world from Mega Man 2 could be made to fit into a cart, and how that might work ;).
Thanks. Don't put yourself down too much, though, I have absolutely no idea how to make a card game. =)
Oh, I know it's definitely not perfect (the little bugs in the collision detection bother me more than the imperfect physics), I just wanted to get a functional little platformer engine in there with relatively low token use, and for only 400 tokens I'd say it's pretty good. There is momentum, I guess it just doesn't work the same way as in the original game and I didn't figure out how to animate acceleration smoothly. If I were releasing the finished game I'd try and make the controls feel spot-on.
@JadeLombax I'm super proud of my card game! I play it every day, which is why I still find the occasional bug, haha. PICO-8 has been a fun creative outlet with lots to learn in a very satisfying way when it all comes together. Seeing what can be accomplished with some of the more advanced techniques like this one blows my mind, but it's great knowing I can study the code and work out what's going on . . . eventually :).
[Please log in to post a comment]