A Port of my waternet (gp2x) game for gamebuino aka
A port of the GP2X version of Waternet to the Gamebuino AKA. Connect the pipes so the water from the source reaches every tile of the level, in one of three game types:
Each game type has tutorial, easy, medium and hard levels (unlocked one by one), custom levels, and random easy, medium and hard levels generated on the spot. The graphics, sounds, music, levels and the two skins of the GP2X version are all there, at the same 320x240 the AKA’s screen has.
| AKA | Action |
|---|---|
| D-pad / joystick | move in the menus, move the cursor; left / right choose a level |
| A | select; in a game: rotate the tile (or slide the row / column under an arrow) |
| B | select; in a game: rotate the other way (or slide) |
| MENU | back |
| L1 / R1 | previous / next skin |
| C / D | volume down / up |
Quit in the main menu, or RUN + MENU held for half a second anywhere in the game, goes back to the launcher; RUN on its own switches the AKA off as in every game.
Copy the SD_files/WATERNET folder to the root of the SD card and start Waternet from the
launcher. The folder holds firmware.bin, meta.json, screen.bmp, the levels, the music,
the skins and the LICENSE. The game writes its unlocked levels, volume and skin to settings.dat there.
Levels are the GP2X version’s text files: put your own in WATERNET/levels/<game type>/custom
as level1.lev, level2.lev and so on (rotating, sliding or slidingrotating).
ESP-IDF 5.5 and the official Gamebuino AKA library,
which is used where it is checked out (C:/github/Gamebuino_AKA_lib by default, or set
AKA_LIB_DIR):
idf.py set-target esp32s3
idf.py build
build/waternet.bin is copied to SD_files/WATERNET/firmware.bin by the build.
The graphics, skins, font, sounds, music and levels are the GP2X version’s original files in
assets/, converted by tools/convert_assets.py (Pillow, and ffmpeg for the music):
python tools/convert_assets.py <ffmpeg>
It writes main/assets/assets.bin (the default skin, the font and the sounds, built into the
firmware) and the SD card folder’s levels, skins, music and screen.bmp. A skin on the card is a
folder in WATERNET/skins with a .bin file for each image it changes and a color.txt with
its text colour; the default image is used for the others.
The GP2X version was a single waternet.cpp, split up here:
| File | What it is |
|---|---|
main/main.cpp |
start up and the state loop |
main/intro.cpp, titlescreen.cpp, credits.cpp, gametypemenu.cpp, leveltypemenu.cpp, nolevelsfound.cpp, levelselector.cpp, game.cpp, levelcompleted.cpp, levelsfinished.cpp |
one file per game state |
main/CWorld.cpp |
the playfield: the levels, rotating, sliding, the water, random levels |
main/CSelector.cpp, CMenus.cpp |
the cursor and the three menus |
main/gamefuncs.cpp, commonvars.cpp |
what the states share: volume, settings, skins, music, the globals |
main/gfx.cpp, sound.cpp, input.cpp, platform.cpp |
what SDL did on the GP2X, on the AKA library |
Waternet is created by Willems Davy, Willems Soft 2007. The default skin graphics are made by me!
The music is taken from the internet using midisite.co.uk and was named techrap1 & techrap2, by an unknown composer.
The game is based on Simon Tatham’s Portable Puzzle Collection.
A big thanks goes out to nagelfar for pointing out how I could generate levels programmatically; I didn’t know the solutions were just a maze.
Another thanks goes out to [M]att, Aniruddha and LeoS for testing out the game.
Another BIG BIG THANKS goes out to Fusion_Power, who had some great ideas on how to improve the game and kept me motivated on changing the stuff he requested. He also made some great looking skins which are included in the game (FP_Aquaeduct and FP_Brixx). So if you’re playing the game with one of his skins, be sure to thank him as well!
MIT, see LICENSE.