[Game]Matti's Nightmare



I have at least 4-5 SD cards of various sizes lying around.
I’d be very surprised to encounter someone who doesn’t own a single SD card (be it micro SD or regular).

I don’t use Discord, so this is the first I’ve heard of this.


Phew! Finally!

I have now changed the room definition format to use less ram. Before, five rooms took about 10 KB, including list of sprites, tiles, etc. Now it takes about 3 KB :slight_smile: It was an exhausting task first to figure out how to save ram, and then change the room definitions and room “loading” logic accordingly.

This is what I did:

  • Used tuples instead of lists
  • Reduced the number levels in the tuple-tree
  • Packed all 8-bit values to one bytes literal

Now, one room definition looks like this:

    ( # *** room5
        "Nightmare begins",
        # Tile definitions
            # id  bitmap               flags
            0x0, data.backgroundSurf0, 0,
            0x1, data.wallSurf1,      glob.TILE_FLAG_BLOCKING,
            0x7, data.backgroundSurf1, 0,
            0xC, data.floorSurf0,      glob.TILE_FLAG_BLOCKING | glob.TILE_FLAG_PLATFORM,

        # Exit triggers
            # id, newRoom,   newX,                   newY 
            0xf,  3,    8,  -999,
        # Sprites
            # Scissors
            # Bitmaps
                # bitmap         offset
                data.scissorsSurf0, (-2,0), 
                data.scissorsSurf1, (2,0),
                data.scissorsSurf2, (0,0), 
                data.scissorsSurf1, (0,0),
            # wx, wy,  bx1,   by1,      bx2,   by2
            60,   10,  -999,     0,   999,  14*8,
            #   id trg  vx  vy adu dir del bTy hfl vfl coi

            # Clock
            # Bitmaps
                # bitmap         offset
                data.clockSurf0, (0,0), 
                data.clockSurf1, (0,0),
                data.clockSurf2, (0,0), 
                data.clockSurf1, (0,0),
            # wx, wy,  bx1,   by1,      bx2,   by2
            20,  17,  20,  -999,    90,   999,
            #   id trg  vx  vy adu dir del bTy hfl vfl coi

            # Juice
            # Bitmaps
                # bitmap         offset
                data.juiceSurf0, (0,0), 
                data.juiceSurf1, (0,0),
            # wx, wy,  bx1,   by1,      bx2,   by2
            9,  44,  -999,  -999,   999,   999,
            #   id trg  vx  vy adu dir del bTy hfl vfl coi


Release v0.2

  • The boss fight is there, “The giant feet fleet”
  • The game can now be played to the end :slight_smile: Who will be the first?

Before i can call it a game, there are some missing things to do like the ending fanfare, but I want to give this to early testers already :slight_smile:

Here: https://haviital.itch.io/mattis-nightmare


I’m pretty sure I beat it:


I woke up! The nightmare is over!

However, I don’t think I played it the right way. I went back and forth between the “Nightmare begins” and “The worst mare!” screens and grabbed the cup in the first screen over and over until I had enough points to go down though the door requiring 4 coins. Maybe things that give coins shouldn’t respawn? I could only find 3 places that had a coin item (aside from the secret room), so I guessed that I needed to get one of them at least twice.

Whenever I press B, the sound cuts out for a second, not sure why. Also, how do I avoid getting hit right at the entrance to “The worst mare”? an enemy is right on top of me right when I enter the room.

I like the boss room, that was cool. All the room themes and music go well together. I like the secret room as well :wink:.


You were the first to solve it :slight_smile: Thanks for the comments too.

Yes, I need to fix this.

Good catch. I have left some test code there. Fixed.

Yes, I changed the timing now.


The game has now been released (v0.3) !

Here: https://haviital.itch.io/mattis-nightmare


Changes, v0.2-0.3:

  • The animated startup screen
  • The info screen
  • Adjustments to the gameplay
  • “Game finished” music


Great! Would still like to see a way to restart after a Gameover other then resetting the Pokitto tho…


I thought it is not a big deal. Thought, it is not necessarily very hard to fix.
Btw. How do you like the startup screen? It just goes on and on :wink: There are some pretty nice fg/bg combinations further on.


I really like what you did. And I know it’s an easy fix about the after gameover issue, it’s just making it so that it goes back to the title screen by pressing a button. Just feels more complete if you can do it. Either way, great job!


Yes, I think I will do it like that.


A small update (v0.4):

  • No more need to reset the device after game lost
  • Small fixes

Download: https://haviital.itch.io/mattis-nightmare


Could someone test if this works in Windows? It is the Pokitto Simulator running Matti’s Nightmare. It supports audio also.

Unzip the zip file and execute the MattisNightmare\run.cmd file.
MattisNightmare_v04.zip (2.5 MB)

Edit: It works for me but I want to be sure that needed dlls etc. are in the packet.


Works for me on Linux with Wine.


works great here on windows 10.
you can jump over the walls and glitch out.


There is now a windows version of the game, using Pokitto Simulator, in https://haviital.itch.io/mattis-nightmare


Great game!
Imho the music adds so much to the game!

Small remark/bug maybe: whe I die in the worst mare room and restart the game, the music from that room keeps playing…

ps I also suck at it, I only find 3 rooms…

Playing music?

Added the “Matti.pop” file to Itch. That is for loading from the SD card.


@Hanski : resized gif to same size as other games


9 posts were split to a new topic: Game mechanics