Parallax scrolling and collision detection are still a bit clunky, but level 1 is beatable! In part due to that afformentioned collision detection clunkiness, but still ☺️
I’ve got one more level to make, a few cutscenes to do (including bonus ending cutscene), and a lot of cleanup so the map behavior is more predictable, but I’m happy with the progress (and the little Easter egg-y type things I was able to sneak in 😁). Now, I’m going to take a break and research bullet hell games... for no particular reason 🙃
Found some tutorials that helped explain maps and the camera. Per the PICO-8 docs, camera() is not intuitive, so I didn’t get very far into the actual level.
But I did spend an inordinate amount of time making sprites and fleshing out the title screen! (Note: pal() replaces orange with non-transparent black when the map is drawn)
And I struggled with “baby’s first sound design” (the Master’s artron flicker makes what one might call a “noise” now 😅)
But the best part was learning about export. PICO-8 does a great job of letting you focus on the actual game design and game logic, while making the other stuff (like sharing the cart, aka “cartridge”) really easy. Literally, just export <filename>.html and you get an HTML and JS file.
Serve those from wherever, or just open the HTML file in your browser, and you can play your game! It was so easy 😱
See how the gif had a little play button and showed the PICO-8 load screen? That’s because the game’s been exported and was running in Chrome. “So it’s just running locally on your machine?” you might ask. Hahahha. Heheh. heh....
WRONG.
Who do you think I am? A fucking amateur?! Absolutely not.
Ya girl actually bought a $2 domain and deployed this sucker. Check it out!
This is how it renders in the mobile browser, buttons and all! I didn’t have to do anything beyond exporting it and slapping 2 files up on a server. Honestly, the part that took the longest was waiting for DNS to propagate. I could not be happier with the experience ❤️❤️❤️
I’ll share the URL in a future post once the game actually does something, but if you feel compelled to see the rough version in the meantime, hmu and I’ll link you! The noises really enhance the experience 😂
Yesterday, with the help of @bridgs phenomenal tutorial videos, I learned all about sprite creation, controller input, palettes, collisions, and in-game gravity. I’m also pleased to report that adding a state machine to manage the title screen vs game screen only took about 3 seconds (I don’t know why I thought it’d be more complicated than that?)
It felt like a ton of work for how little code I ended up writing (<150 lines of Lua) but I must say, even though their arms and legs don’t move yet, I would die for them:
And despite being completely fried by the end of the day (dear god, I had no idea there were so many collision detection algorithms...), it was so nice to feel excited about a programming project again 😭 The Master’s title screen artron flicker was the last feature I added before I closed my laptop for the night, and I’m just... 😭💙💙
Aaanyway, today is all about running and jumping animations, so if I don’t post an update, it’s because I rage-threw my computer out the window 😊 💃🏻
The Doctor can run (in place) and jump, and he looks down to see where he’s going to land! There’s also a little “brrRRING” sound effect on each jump, but it’s a gif, so just imagine it in your head. I promise it’s cute❤️
Next steps will be learning about maps 😁
If you’re interested in some bonus nerd ramblings, they’re below the cut 🤓
👋🤓
Ok, at some point I’m going to need to buckle down and figure out a debugging workflow. PICO-8 doesn’t support breakpoints, so I’m doing it the sloppy way and just printing a bunch of shit to the screen. It’s not efficient, especially when a crash happens before my prints execute.
It wouldn’t be so bad, but the runtime errors aren’t always the most... helpful, and honestly, idk if this is a Lua thing or if it’s a limitation of the subset of Lua that PICO-8 implements. Lua is a 27 year old language (for comparison, Python is 30) so I have to think this is another intentional artificial limitation.
Like, what am I supposed to do with this 😂:
Sometimes you do get a helpful traceback and error message (oh look, I forgot to call the method on the instance. Again 🙄), and they happen mid-draw, which is good for a chuckle. I think I just like “seeing” how far the code executes before a crash.
So... unit tests... I don’t have any, and I hate that. I don’t think PICO-8 has a test runner, but I’ve seen a few posts about an external project called pico-test, which I’m very interested in trying it out. It’s just hard to divert time and energy to yet another New Thing when all I wanna do is make my little babies run and jump (lol said every developer ever when tasked with learning testing frameworks). Perhaps I’ll bite the bullet soon though, because for the life of me, I cannot figure out why my collision detection stopped working when I abstracted it out:
All in all, today was fun. Having all my code in a single file with zero tests is making me very twitchy, but I did at least get everything up into a private github repo (and let me tell you the terror I had when I realized this old laptop has a password protected SSH key that I haven’t had to remember in many years... jfc 😅I did finally remember it, thank god, but I have never seen my old digital ocean droplet life flash before my eyes like that before).
Maybe when I’m a little more comfortable with the concepts, I’ll switch back to the PICO-8 IDE. It is really cute, and it lets you split your code into “tabs”, which would ease my organization woes. But for now I’m just sticking with Sublime Text 2. And I guess your tests can’t fail if you don’t write them to begin with.
I’m really resonating with the PICO-8 console because the artificial size limitations force developers to get creative. You’ve only got so many screen pixels, sprite slots, colors, etc. The controls are limited to the d-pad and two buttons. You have to be efficient.
Considering my absolutely ridiculous Super Mario Sunshine/FLUDD head canons and my soul-crushing despair about global warming, capitalism, and wildly unregulated innovations coming from the tech sector have been on my mind A LOT, the more I plan for how it’s all going to fit in one game, the more I wonder...