Inspiration
Magtroid Pocket is a first person adventure game that drew inspiration from both 2D and 3D Metroid games, as well as classic FPS games like Wolfenstein 3D. The core gameplay elements I designed around were:
- Exploration: The player explores the map to find items to access new portions of the map to find more items, and repeat that loop.
- Combat: The player shoots enemies, with each enemy having a weakness to a particular weapon. Each weapon has unique traits and are swapped using the touchpad. The player can lock-on to, and strafe around, enemies.
- Puzzles: The player can find and solve optional puzzles and be rewarded with powerups when solved. There are special endings for both acquiring all items, and intentionally acquiring none.
- Plot: The player should have enough of a story to be interested in
Creative Development
Magfest had already developed characters and theme for the event, so I took that and wrote a plot, which was then touched and fleshed out by a friend. I tried to keep it fun and lighthearted by poking fun at videogame tropes. The tone does shift from silly to serious as the game progresses.
I drew some textures for testing, but had nearly everything including items, enemies, and textures, replaced by artist friends. A little of my art squeaked into the final game. The same friend who helped with the plot also composed all the music and sound effects for the buzzers. I could not have made this game without the tons of creative help I received, and you can read more about that in the Player's Guide.
Technical Development
I learned a ton from Lode Vandevenne's Raycasting Tutorial. It was the basis for pretty much all of the rendering. I highly recommend you go read it.
It was really important to get the rendering loop as fast as possible for fluid gameplay. A few techniques were used to improve performance.
- perf and Hotspot were used to profile the simulator and find out where the time in the rendering loop was going.
- gcov and lcov were used to more thoroughly inspect functions identified by perf & Hotspot
- Because the ESP32-S2 doesn't have an FPU, no floating point numbers were used. Instead, fixed point Q16.16 was used.
Once the rendering engine was up to speed, I wrote a combination tile based map and script editor in Python to create interactive maps. The scripts are a series of simple "if trigger / then event" statements. Triggers included entering areas, shooting walls in a specific order (puzzles!), defeating all enemies, and more. Events included opening doors, spawning enemies, showing dialog, and more. The editor would export the map and script data for the game to load later.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.