Hello everybody!
I want to tell you a little about how my work "Small FC: 3 in 1" was created" https://alrado.itch.io/small-fc-3-in-1
Of course, many people noticed the strange name, what could it mean?
The answer is simple - three games are written in fantasy console "Small"=)
I came up with the idea to make a fantasy console that would work inside a MiniMicro virtual computer π
The characteristics of Small FC are as follows:
Screen resolution: 96x64
Border width: 12, height: 8
Pixel scale: 8
Palette: 16 colors
MiniMicro displays are used in this way:
0-REPL display, primarily for debugging
1 - used for border
2-6 - used for output pixel graphics
7 - used for setting back color/image or for output pixel graphics
So Small FC uses only pixel graphics, just like in the good old days )
No layers with tiles, sprites, or text.
For convenience, pixel graphics are created using indexed images - i.e. an array with numbers from 0 to 15
To output sounds and music, a player of notes, melodies, and samples was written.
The fantasy console features are implemented via separate libraries, for example, for working with indexed graphics, these are: iDraw, iPrint, iFont, iText, iSize.
The following classes are also used: IndexedImage, IndexedSprite representing indexed graphics, and SmallSprite, SmallAnimation for sprites with collisions and animation.
In general, I was so interested in writing fantasy console that it was written much more than I managed to apply in those three games, what were presented )
As soon as the game jam is complete, I will post all the code on gitHub for those who will be interested.
Of course, the Small FC project is still very young, but I tried to make an interesting fantasy console, not like the others.
And now about the difficulties I had to face.
Performance of the MiniMicro WebGL build.
As soon as I started writing the first drafts of games, I decided to check how everything works in the web.
Here was a surprise - a lot of what I wanted to do worked awfully slowly.
It became clear that each algorithm should be implemented focusing primarily on the performance of the web.
Performance print pixel graphics.
Yes, pixel-by-pixel printing of graphics in MiniMicro is not very fast, but it is not its main feature.
It can work with text, sprites, and tiles - but my concept was to work with pixel graphics.
This restriction prompted me to use non obvious techniques such as placing static and updated graphics on my layers, shifting layers (displays) instead of redrawing their contents and erasing areas of graphics instead of printing them )
Yes, blocks in the game Crackout are erased when the ball hits them, not printed.
And in the game Tetris, shapes are drawn using the drawRect command, because it works much faster than pixel-by-pixel drawing.
Long loading of libraries in the WebGL build.
In my work, I used this approach - each game is independent, it just loads when you start and when you exit it, the shell loads again to launch games, the main menu. This is a better approach compared to keep everything in one file during development, and later open source code in MiniMicro - because to open a file in it long about 600 lines of this one, but the file is long, around 2000 lines is quite another.
But then I discovered that each download to the web takes 6 seconds or more. It turned out to be all about importing libraries - after all, they were loaded again in each file.
To solve this problem, I wrote a separate class that imported all the necessary libraries, and then loaded the shell to run the games.
Thus, libraries are imported only at the first launch.
Whatever it was, but overcoming difficulties makes us stronger =)
A few words about the games themselves and the shell for launching them.
First of all, I started from the visual representation and best performance that I could achieve in the game.
Launcher.
Of course, when creating the shell, I was inspired by the 9999 game cartridge for the NES/FamiCom video game console https://www.youtube.com/watch?v=t0AKLRDPKUc
And when I saw the graphics by NicoFerra from palette usage example https://lospec.com/palette-list/spanish-sunset
I realized - this is what I need. However, it had to be redrawn, because the resolution of Small FC is much smaller π
Tetris.
After I managed to write the game's mechanics I began to choose a design that would fit the spirit of the old time and met a very impressive example
Tetris screen reference by ι¬Όι· ζη https://twitter.com/kirai_s It also had to be redrawn, since both the palette and resolution are used their own.
Crackout.
I was very impressed with the mockup of the game by Davit Masia in this example of the palette https://lospec.com/palette-list/matriax8c
Very well drawn. Based on it, the graphics were created.
Detective.
This game was written the very first and has a unique-no one understands the mechanics ))
When I was choosing a palette for Small FC, I met a SWEETIE 16 PALETTE and example image by grafxkid https://lospec.com/palette-list/sweetie-16
This is just genius. I wanted to enjoy this work indefinitely, so I made a game where you need to explore almost every element in this pictureπ
Credits.
Actually, this is a secret section and I may not write about it ))
But I would like to take this opportunity to thank all the pixelart artists whose work was used, as well as ToraBora personally - for the endless testing, all help and support, as well as for editing my illiterate texts in English ))
It was interesting and exciting to solve non-standard problems when writing games and create a very small fantasy console - for a minute, the screen resolution of which is half that of PICO8 ))
And all this in the MiniScript language in the Mini Micro virtual computer.
Thank you for being able to read the entire text to the end! π
Oh, if you suddenly press a random key and something strange happens in the game - do not be surprised, it is Easter egg ))
Have enjoy with creating games!