So I’ll attempt my luck -and skills- at the MicoJS Gamejam with a game with these constraints:
Main theme - Time Loop
General Palette - Pico-8
Gameplay Style - Top-down action - PAD to move
Assets - hand-made
Tilemap - 8x8 tiles.
The game itself is still needing a lot of things but basically follows the standard Time Loop:
You start at a position.
The second you move, a visible timer starts.
When the timer ends, the whole map resets to its initial conditions.
If you manage to get yourself KO or killed, the whole map is also going to reset.
Very tentative, a bit backroomish scenario:
After a party night, you woke up in these weirds, empty rooms. You hear some distant echoes, which include what sounds like screeches and thumping noises. After walking for a while, you always passes out, only to awaken in the same exact bed.
You do have your smartphone, but it cannot reach anything, and the GPS position is unavailable as well. The battery level replenishes and the time goes back to 7:24 each time you wake up. It is essentially useless here.
It’s already been the 10th time you’re waking up. You’re starting to think that maybe this isn’t a dream. It seems you got only a few minutes before passing out.
Can you figure out what’s happening and escape from this place?
Dev Log #1 - 2023-05-11
What was done today
So today I took a deeper look at MicoJS, understanding how sprites and tilemap worked, and implemented a basic walking simulator
Walking animation, collision detection with wall sliding.
Screenshots & GIFs.
Next steps
The Time Loop itself with the reset.
Time and Health UI.
More tiles to have the bed, and some atmosphere.
Thoughts
Since importing / updating assets is annoying, it’s best to not spend many time iterating on them.
I should have small maps. I’ll probably go for 40x30 so the largest resolution shows a whole screen of it.
The resolution range for all the devices (except the unicorn) goes from 128x128 to 320x240.
I intend to make it playable for the ESP (128x128) by having a special camera, while on the Blit32 you’ll get the full map.
It’s probably going to be a bit harder on the ESP since the field of vision is reduced anyway.
I saw the tilemaps wrapped themselves, so I might take advantage of this.
@FManga confirmed that unused resources should get optimized out, so maybe I can have minimal changes on the code while having nice things for every platforms (provided I get enough time to do so )
No sound is supported in micojs, so I’ll try to add some visible onomatopoeia as visual hints instead.
No, I don’t intend to go that way - I’d want to do something simple, like exploration, gathering items to solve some puzzles, so I can actually finish this game
A much closer comparison game would be Minit I think!
The character has a more consequent hitbox when colliding walls.
Eased a bit movement when trying to go against a corner - it’ll try to slide when possible.
There are doors!
They can be opened or closed by pressing A once when close to them (an indicator appears above them when this is possible).
They block the character when closed.
Timeloop!
A watch is now visible on the screen, indicating the current time.
Time always starts at 7:24.
When it reaches 8:00, the screen blinks and the watch resets to 7:24 - with the rest of the world as well, including your position and all the doors!
I used a tilemap with 1 black tile because I couldn’t find how to remove the current tilemap ( @FManga, that might not be that useful to implement).
Made it work on Pokitto.
I forgot to check the last time that it built and worked properly so I had to have a small debugging session
Screenshots / Gifs
The doors
The timeloop. All the content is here pretty much
Next Steps
Scoping down seriously because my binary for the Pokitto is already at 176kB and I’m far from being ready at all. The code seems to take way more space than c++ equivalent, so I need to be clever when implementing stuff.
Having some locked doors and have ways to unlock them with various items.
Some winning conditions.
Thoughts
Each instruction takes quite a lot of flash. For instance, each pair of setPen(aColorIndex) + clear() would use between 170 and 190 bytes of flash.
Using local variables instead of calls doesn’t necessarily reduce the flash use too.
Code reuse is necessary.
I also forgot to test a HW build. It’s something that needs to be done regularly!
There is a weird lag every 3-4 seconds and I can’t figure out why. @lucentbeam is also experiencing it, it seems. That doesn’t break much the gameplay for me since it’s a rather slow game but it feels weird.
I really hope I can make more than a Door Operator Simulator
I recovered some flash memory by making 1-instance classes (like the Watch, the Scene and the Character) into collections of fully global variables and functions (tho I prefixed them with the original class name, e.g. Scene_render() instead of scene.render(). This liberated around 15KB of flash memory, some of which I reused to implement features.
Map & Camera:
Now using a 40x40 tilemap so it can be played “nicely” on the 32blit (I kinda wish there would be a 2x feature tho because 320x240 is still quite big).
The Camera is now following the Character.
The Camera is constrained to the Map.
Watch:
I added indicators, here is an excerpt of the guidebook:
1 - Network Connectivity.
2 - Battery Level.
3 - Current Time.
4 - Estimated Health Level.
This is mostly cosmetic
Screenshots / Gifs
Showing off the Camera following the player, and the Watch UI!
How it should appear on the ESP. A player might have to rely more on their memory if I got the time I might redo the watch UI so it’s a bit smaller.
Next Steps
Think of way to add interactions, such as objects and so on.
Because currently it’s still a Door Operator Simulator with a timeloop .
Thoughts
While I managed to shave some memory, I still don’t have much. I’ll have to be clever with code reuse, e.g. by reusing the Door’s code for levers and so on.
I’ll probably speed up the character but that’ll probably be for balancing the game later.
Thanks to @FManga there is a HTML5 preview. Only a Preview because as of now, a small bug will make the whole page scroll away when pressing up or down keys, yet it should still make a nice demo.
I’m not sure if it works on anything but the Pokitto and Gamebuino Meta unfortunately
Screenshots / Gifs
Some of the new stuff - levers, keys and the bed. Maybe something else?
Next Steps
Release the sources on github!
Thoughts
Battle for RAM.
It’s actually quite an annoying thing - when you’re lacking of RAM, various part of the memory might be rewrote.
In my case, it messed up with the list of entities, and made them all vanishes when the y-sort was done.
I had to scrap a lot of things to make it work. I wish I had spent this time on drawing more tiles to make it nicer.
What makes it annoying is that you need to build a HW version and test on your device each time.
Yet I’m glad it’s finished. It’s not too fun, yet it’s finishable, a bit challenging too and more importantly - it’s done!.