A semi-open world sandbox game where YOU create your own world!
wapm install TheFloatingPixel/Minicraft
Need help using WAPM?Get started here
Minicraft is a semi-open world sandbox game, where YOU build your own world!
NOTE When the mouse is in the game screen, the game switches to
ARROWS+MOUSEmode. To use
ZXmove the mouse outside the game screen.
In mouse mode, most actions that require pressing
Xcan be activated using
L🖱️, the same goes for
Fun fact: This game takes up over 99.96% of all available cartridge space (65515B of 65536B), with just 21 bytes to spare!
L🖱️ means "left mouse button"
R🖱️ means "right mouse button"
M🖱️ means "middle mouse button"
ᐁ - Change selection
L🖱️ - Select
L🖱️ - Use selected item
R🖱️ - Open inventory
M🖱️ - Show the name of the clicked tile
ᐅ - Move selection
L🖱️ - Select item and close inventory
R🖱️ - Open crafting menu
ℹ️ Info: Items stack to 255
ᐁ - Change selected recipe
ᐅ - Previous / next page
L🖱️ - Craft
R🖱️ - Close menu
ℹ️ Note: In the crafting menu, there are two pages of recipes!
R🖱️ - Close
L🖱️ - Previous/next page
R🖱️ - Close
Cheat code menu
X - Write X
Z - Write Z
ᐊ - Write L
ᐃ - Write U
ᐁ - Write D
ᐅ - Write R
To save your progress
Walk into the campfire, and press
Need inspiration, or just don't feel like building? Ever wanted a peaceful farm life? Use the
Example World option in the menu to visit a pre-built farm!
If that wasn't enough inspiration for you, here are some pictures of what you can build:
And these are just some examples of what you can build
Missing resources for a build? Want to create a little chaos? Press
X at the same time to open the cheat code menu.
LRLRL - Generates 15 tree patches
The generated blocks will NOT replace already existing blocks (the same goes for
ZXUDR - Generates 15 sand patches
UDLR? - ???
DDU?? - ???
By the way, these are not all cheat codes - in total there are 7. (Can you find them?)
Programming, Textures, Music & the default palette - Me (TheFloatingPixel) AGB Palette - ANoob from Lospec AYY4 Palette - Polyducks from Lospec Mist GB Palette - Kerrie Lake from Lospec
The wasm4 console doesn't support automatically seeding randomness, so every frame the seed is set to the frame count since the start of the game. Theoretically this is not very random - practically it's random enough.
The function used to generate random numbers is:
Generating a patch of something The center block of the patch is set to the material, the neighboring blocks have a 1 in 3 chance of also being set to the material
Tile generation chances:
|1 in 3|
|1 in 3||Always||1 in 3|
|1 in 3|
Honestly, saving the game was the most interesting (and time-consuming) part of this project. Here is some info on how it is done:
The map is only 50x50 to fit into 1024 bytes, with 3 bits per tile. But 3 bits only fit 8 different tiles, so how did I fit 9? Well, the campfire is not saved inside of those three bits. Since there only can be one campfire on a map (the one that spawns when creating a new world), the position of the campfire can be saved separately from the map data, thus allowing for 9 tiles.
The save data format is:
|Version||1 byte||always 1|
|Map data||938 bytes||3 bytes for every tile, starting from the top left corner (see the table below)|
|Inventory||8 bytes||1 byte for every item, except for the pickaxe, map, campfire and book guide|
|Player X||1 byte||0 - 49 range|
|Player Y||1 byte||0 - 49 range|
|Campfire X||1 byte||0 - 49 range|
|Campfire Y||1 byte||0 - 49 range|
You may notice that the inventory in the save is only 8 bytes long, not 16 as you may expect. That is because the pickaxe, map and book guide simply never exit the players inventory, and the campfire must be placed to save the game, thus not being in the players inventory at the moment of saving.