A Port of my waternet game to the 32blit sdk (picosystem, 32blit, ...)
This is the 32blit version of my Waternet game which is a multiplatform puzzle game initially written for old consoles and handhelds like Game Boy (Color), Game Gear, Master System, Analogue Pocket and Mega Duck using the gbdk sdk. This a port based on the gamebuino meta version
Button | Action |
---|---|
A | Confirm in menu and level selector, rotate or slide action while playing |
B | Back in menu, level selector and game |
The aim of the game, in any game mode is always to connect all pipes so that water can flow through them from the water point source. How you can accomplish this depends on the game mode. The game has a help section in the main menu where you can always check up on the rules of each game mode.
You need to connect all the pipes so water flows through them, by pressing the A button on a pipe, to rotate the single pipe.
You need to connect all the pipes so water flows through them, by pressing the A on the arrows of a row or column. The row or column will move all pipes in the direction the arrow is pointing at.
You need to connect all the pipes so water flows through them, by pressing the A on the arrows of a row or column. The row or column will move all pipes in the direction the arrow is pointing at. You can also press the A on a pipe, to rotate the single pipe. This is a combination Rotate and Slide mode.
Graphics (tiles), i converted using the Gimp Image Editor and the Gimp tilemap gb plugin from the gameboy tiles created in Game Boy Tile Designer and the titlescreen graphic is based on a modified title screen image from my waternet game i made for gp2x and windows. I designed the title screen in the Gimp Image Editor to just have the word waternet and the waterdrop.
Sound are just simple tones that play quickly
Music was made using Online Sequencer, i created single channel, non mixed music files and later converted this music to an array storing the frequencies of notes to be used. I got this idea from the sheep it up game developed by Dr. Ludos. He stored the frequencies to be used for the music notes in a array. So i used the same system and all i had todo was convert the music from onlinesequencer i made to such array (by hand) as well.
You can find the music files i used for the game below:
Waternet game concept is based on the Net and Netslide game from the Simon Tatham’s Portable Puzzle Collection, it’s my own implementation of these 2 game concepts mixed into one game
This is a basic template for starting 32blit projects for the Pimoroni PicoSystem.
It shows a minimal code layout and asset pipeline, giving you a starting point for a new project.
It’s based on the original template
project from the
32blit beta, with added asset
handling, and some tidying up to fit in with how I do things.
The number 1 reason is portability! 32blit SDK will build for:
And is portable to any platform supporting SDL2.
This means you can ship your game to more people on more platforms, share it online to play, and reach a little further than the confines of PicoSystem!
Additionally the 32blit SDK has some conveniences:
Use this template to generate your own project.
Consult the 32blit wiki for guides on various parts of the SDK:
We recommend using Linux to work with PicoSystem/Pico SDK. It’s the path of least resistance!
This guide was tested with Ubuntu 21.04, and most of these instructions will work in its WSL (Windows Subsystem for Linux) equivalent.
You’ll need a compiler and a few other dependencies to get started building C++ for PicoSystem:
sudo apt install git gcc g++ gcc-arm-none-eabi cmake make \
python3 python3-pip python3-setuptools \
libsdl2-dev libsdl2-image-dev libsdl2-net-dev unzip
And the 32blit tools:
pip3 install 32blit
If pip gives you warnings about 32blit being installed in a directory not on PATH, make sure you add it, eg:
export PATH=$PATH:~/.local/bin
You might also want to add this to the bottom of your ~/.bashrc
.
You’ll also need the various SDKs for PicoSystem and 32blit.
It’s recommended you keep all of the SDKs in a directory alongside your project, this makes it easier for CMake to find them:
git clone https://github.com/32blit/32blit-sdk
git clone https://github.com/raspberrypi/pico-sdk
git clone https://github.com/raspberrypi/pico-extras
If you’ve got local copies of the Pico SDK, Pico Extras and 32blit SDK alongside your project, then you can configure and build your .uf2 like so:
mkdir build.pico
cd build.pico
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../32blit-sdk/pico.toolchain -DPICO_BOARD=pimoroni_picosystem
If you’d like the Pico SDK to handle grabbing Pico SDK and Pico Extras for you, you can use:
mkdir build.pico
cd build.pico
cmake .. -DCMAKE_TOOLCHAIN_FILE=../../32blit-sdk/pico.toolchain -DPICO_BOARD=pimoroni_picosystem -DPICO_SDK_FETCH_FROM_GIT=true -DPICO_EXTRAS_FETCH_FROM_GIT=true ..
:warning: Note: This approach is not recommended, since you might be reconfiguring a few times during your project and re-downloading things unecessarily!
Connect your PicoSystem to your computer using a USB Type-C cable.
From a power-off state, hold down X (the top face button) and press Power (the button at the top left, next to the USB Type-C port).
Your PicoSystem should mount as “RPI-RP2”. On Linux this might be /media/<username>/RPI-RP2
:
cp your-project-name.uf2 /media/`whoami`/RPI-RP2
The file should copy over, and your PicoSystem should automatically reboot into your game.
If you’re not using hires
mode and need some more RAM, it can be disabled:
...
blit_executable(amazing-lores-game ...)
...
target_compile_definitions(amazing-lores-game PRIVATE ALLOW_HIRES=0)
These features of the 32blit API are currently unsupported on any pico-based device:
HOME
and MENU
buttonsOpenMode::cached
Additionally some supported features have limitations:
screen
surface is RGB565 instead of RGB888hires
screen mode is not double-buffered, usually resulting in a lower framerateget_metadata
is missing the author
and category
fieldsblit::random
is not a hardware generator