At tonari, we love Rust.
We love it so much weâve built our entire technology stack on it, from the image processing software that handles our high-throughput video pipeline, to the firmware powering our little control panels and rotary encoders. And you know what they say â when youâre in love, you want to tell the world.
Thatâs why we organized 2022âs edition of the Tokyo Rust Game Hack event! This gathering, which we also hosted in 2019, is a great excuse to meet Tokyo based rust developers for a fun night of pizza, beer, and⊠Gaming? Developing? Gameveloping? This isnât your typical game jam; read on to find out why.
Opening our doors
Despite the weight of the last three years, itâs clear the communityâs spirit hasnât fully rusted out (har har). Soon after opening the doors to Straylight â the non-profit maker space from where tonari mainly operates â we were taken aback by the energy of our attendees. We werenât quite sure what to expect, so we were super grateful to receive a stream of enthusiastic, chatty guests from all corners of the world.
We could write an entire article about every guestâs workflow and background; letâs just say that some of the setups they brought were pretty unusual. Once we got introductions and drinks out of the way, it was time forâŠ
The Bombercrab Challenge đ„đŁđŠ
So what was the Bombercrab Challenge? As we hinted at before, it was neither a game jam nor a game proper, but something squarely in between. If youâve played Bomberman in the past you already know the basics: characters move around in a grid, dropping bombs that explode in a cross pattern, with the objective of taking every other player out or, in our case, to survive the longest in the âhillâ area of the map.
The twist, and what made the game attractive to our rustacean guests, is that they didnât get to control their characters with an arcade stick or a controller. Instead, the characterâs brains were written in Rust and uploaded live any time, even mid-match! Setting up the environment through our template was a matter of minutes; replacing the name
and team_name
methods was enough to make a character ready to go.
The Bevy + WebAssembly magic required to make this happen is worth its own blog post, but suffice to say it was a very interesting challenge with a lot of subtle questions to consider. Weâll explore the inner workings in detail another time; today weâre here to talk about our participantsâ inventiveness. Hang tight, because there was a lot of it.
Shy beginnings
An interesting aspect of this challenge is that it wasnât limited to physical attendees; the game was streamed on twitch (click for the VOD), where remote players could participate in the same round. Shortly after kickoff and solving a couple minor technical hitches, the first character entered the arena, to great success!
Eh⊠Maybe not so much. Characters had to make do with a very limited view of their surroundings, so it would take some time for characters to avoid being hit by their own bombs, let alone their opponentâs. In other words, weâd be seeing the image below for quite some time. Thankfully the evening had barely started, and pizza came just in time to ease everyone into some deeply focused hacking.
Something that surprised us is how analytically most players approached the challenge at first. Rather than jumping directly into coding their strategy, several people spent their first hour poking and prodding at the inner mechanisms of the game. In this phase, we saw a few characters with suspicious names show up â perhaps testing the robustness of our string validation â and a few others crash and burn as they, deliberately or not, tripped the limitations we had set in place for the character AIs. No infinite loops taking the game hostage!
Speaking of names, a few keen players noticed that player names could be used as a very primitive way to debug and introspect on the characterâs behaviour, since the structure of the game otherwise allowed few ways to understand why the characters were failing to do what players intended. At this point of the game, mysterious numbers starting appearing on top of characters, their meaning each teamâs guarded secret. For some, it helped them know the vision range of their characters, for others the value of their own internal variables.
A quick trip to Finland
While the game supported a constant rotation of maps in an alternating pattern â a simple, classic map followed by a more inventive one â it soon became clear that we had been a bit⊠optimistic with the size and difficulty of the special rounds. The poor bombermen had little to work with, given their limited, slowly expanding view of the immediate surroundings. While our attendees would end up surprising us even in the hardest maps, we needed to do something quickly to make the special rounds remotely winnable.
Thanks to the wonders of open source, team moimoi
contributed with a map cleverly shaped like the flag of their home country, which soon turned into one of the most fun â and definitely one of the bloodiest â arenas thanks to its brutal simplicity.
It was in the first round of the Finland map that we saw our first victor emerge. Congratulations to sometypes
(wholesometypes
on Twitch) for taking the first of what would be many victories. It was certainly no fluke due to the mapâs size: sometypes
would quickly become a menace in the following rounds.
With the ice broken and this first victory as a motivator, characters got smarter, preferring picking up powerups to walking into bombs, replacing their aimless wall-walks with a more orderly trek towards the hill area. More victories were had, many by sometypes
, who supplemented their initial peaceful strategy with more active evasive maneuvers, and soon also by Mark
from team Polyglatte
, who found a great niche in the Castle map, and Hidari-Kun
from team Reiwa
, who was the last one standing after a particularly bloody round.
Congratulations to everyone who managed to find glory on their way to the hill!
Ashkanâs mad spiral run
No event about hacking would be complete without an insane, out of the box approach that breaks all expectations. While everyone refined their bomber AIs, an unassuming character that seemed to do little but spawn with slightly different names (Ashkan
, Bshkan
, Cshkan
âŠ) was cooking something very, very unique.
You see, one of the rules of the event allowed players to upload a new character AI any time, even within a round. The intention behind this rule was to allow participants to correct mistakes in their logic without having to wait for the next round to start. However, Ashkan saw something else in that rule. What about if, instead of uploading a new character infrequently, he uploaded a new character for each turn?
By simplifying his character to do a single thing at a time, and building a real time controller app that uploaded a variant of the character on every keypress, Ashkan managed to manually play bomberman, ducking and weaving past the AI driven characters. How exactly this was achieved involves magic too dark to include in this blog post, but letâs just mention it involved a hex editor on a raw .wasm
file.
Itâs difficult to describe the energy in the room when the fully manual character made a crazy run to the center of what so far had seemed an unassailable fortress: the Spiral
map. Everyone cheered as the character with an ever-morphing name inched its way to the finish line, under an intense time crunch, punctuated by a few close calls with its own bombs.
The ensuing victory, even though comparatively small in its 17 points, was one of the most exciting of the night, and remains the only one on that particular map. A run for the ages!
Game over⊠play again?
As the evening drew to an end, the discussion moved on to ways to improve and iterate on the game, something that our attendees have followed up with pull requests. Itâs amazing to see the energy they brought to the event carry on after it; the spirit to give back is what keeps open source alive, and what gives us the motivation to come up with the next gathering. We already have ideas on how to tweak the formula, so make sure you keep an eye on the usual channels!
Thanks everyone that helped make this event a great success! If you missed it, donât worry; weâll strive to continue to make events accessible to outside participants. If youâd like to host a game event yourself, our game code is fully open source, and we welcome contributions.
If youâre a Rust developer in Tokyo and youâd like to get in touch, donât be shy and send us a message to hey@tonari.no. Weâll be happy to let you know when the next event is happening. And if you'd like to generally follow our progress at tonari, please consider signing up for our monthly newsletter.
See you at the next Tokyo Rust Game Hack! đŸ
Find us đ
Facebook: @heytonari Instagram: @heytonari X: @heytonari