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.
The Time Loop itself with the reset.
Time and Health UI.
More tiles to have the bed, and some atmosphere.
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.
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.
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 timeloop. All the content is here pretty much
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.
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.
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!