[Game]Pomifactory

I took @andrea_i’s Pokifactory and rewrote it using MiniLib. Code is written from scratch, but I used most of the original graphics with some changes. I tried to send pm but haven’t got any response. However, I think it’s ok based on what @andrea_i wrote on the Pokifactory thread:

I’m totally happy for anyone to tear it apart as they please. If one day we can play that thing on our pokitto I can only be grateful really!

So here it is:

Pomifactory

Pop: Pomifactory.pop (94.3 KB)
Bin: Pomifactory.bin (50.5 KB)
Source code: https://github.com/jpfli/Pomifactory

This project was mainly to see if I could make a complete game with the basic graphics and sound functions I have added to MiniLib.

I wanted to mimic the old electronic games, so instead of movable sprites I’m using sprite sets that are like bit sets, but every bit controls visibility of corresponding static sprite. Bits can be shifted left or right just like in a bit set, so I can e.g. move all items on a conveyour belt with a single shift command. Everything is drawn directly to LCD, no screen buffers used.

Game supports saving highscores in a cookie, but it asks you before creating the cookie. The code is based on the PokittoCookie class, and assuming I didn’t do some horrible mistake, it shouldn’t accidentally erase all your saved highscores of other games.

14 Likes

You should be able to enter the loader by calling exit(0);, no need to switch.
The code for this is in startup.cpp.

1 Like

woah @jpfli that is so damn awesome! and the pixel art has been improved too!! AAAHHH I’m super super happy about this : D

7 Likes

Well if you Hold C while turning on the pokitto you can still get to the loader. :wink:

4 Likes

I HAVE to try this asap, tomorrow is my day off, so i will play evercade and …

3 Likes

Ah, ok. I wasn’t sure if holding C should open the loader and I only tested with my older Pokitto which apparently had some ancient version. It works now after I updated the loader.

1 Like

There is now only one problem.

With Kong 2 and now this, I have no option but to recreate the earliest “video game” I remember encountering, the Nintendo G&W Greenhouse

4 Likes

Oh yes, please do! :+1:

1 Like

When can this get put in the GameDisk repo so we who have the repo setup on our cards can just git pull? Also, I feel like that should be a tip in the magazine in case others don’t know that it is an option :thinking:

2 Likes

I really would love to have a decent pop file and a reset option

1 Like

Very, very cool!

1 Like

There is now a POP file in the first post.

What do you mean by reset option?

1 Like

If created i can check if it matches the real one I have here :slight_smile:

1 Like

Great - i just meant it’s inconvenient to hold c while booting the pokitto to get back to the loader :wink:

@jpfli just had time to play this game for the first time on actual Pokitto

It is brilliant well done!

2 Likes

I added a custom “Press C for loader” screen and sound volume control (uses the I2C potentiometer, 5 dB steps) in the main menu. Pop & bin files in the first post updated.

loaderscreen

exit(0) freezes Pokitto, but adding extern "C" void __wrap_exit(int) and calling __wrap_exit(0) successfully launches the loader.

I also added a check for SysTick counter rollover in the function returning current time. It sometimes happened that the SysTick interrupt was triggered while executing the function and the returned time was off by ~100 ms.

6 Likes