Ice Boat Challenge Port Re-revamp

Good Morning from my Robotics Lab! This is Shadow_8472, and today, I am going over the “boat race” I ported to Minecraft 1.13 vanilla. Let’s get started.

At the beginning of the week, GrifterMage, an admin on the Minecraft server I play on, showed interest in getting the boat race up and running again sometime soon. I had already changed its host server over to a “Paper” server, like the server the project is being built for. Everything worked for a little while, but one day, the datapacks I tried sending weren’t working. I restarted my server, and my “original” copy was broken.

I decided to rebuild the backbone of the project from the ground up. While Grifter recommended I reuse as much as possible, I knew there was a certain amount of spaghetti logic at the end. I figured it would take less time to take the lessons I learned last time and make a version 2.1.

Grifter said he was okay with work-in-progress “untested” datapacks, so I made provisions as I set up my workspace. With Derpy set up as a VNC machine, I experimented with different arrangements of windows on both Derpy and my home Windows machine until I ended up with something that works.

My creative server with the secret boat race development laboratory in an Ice Spikes biome served to manufacture the structure files. From there, I would switch over to Derpy, where I would copy them into the “original” datapack along with the “originals” of the functions to run the whole setup. The datapack was stored in a special file on the desktop beside another file called Nightly Backups. This file did not live up to its name. I saved between two to four zip files per day there; whenever I felt I needed to make a progress report to Grifter I would open a terminal and run a command to zip the datapack for both storage and transmission.

The greatest flaw I perceived in my design last time was my inability to be sure someone else could set the game up on another server, so I created a “Clean Paper Server” to test my datapacks myself where I wouldn’t need to worry about anything accidentally relying on some scoreboard objective I forgot to make sure was created. Once I was done, all I had to do was delete the old server, copy the Clean Paper Server beside itself on Derpy’s desktop, copy the datapack into Clean Paper Server (copy 1), launch the server, hop in with my client on Windows, load both halves of the arena, and install the Ice Boat Challenge game. If this were something I was planning on needing to do over the course of a month or more, I would have looked into writing a script to automate what I could on Derpy.

The design objectives of this version remain almost the same as my first attempt at porting the boat race. I want to minimize the load on the server, while making it as easy as possible to develop other games for the system. I ended up coming up with a number of standards, like a “home” block for most command blocks in the Level Slots (floors a level can be loaded into) to run their commands from, forming a sort of two-way vector between the homes of each Alcove and Level Slot.

One improvement I noted in my notes for future development was to set up something similar for navigating the alcove. When Grifter introduced the /data merge command to me so I could use the same structure block for basically anything I wanted, he hinted that Minecraft 1.14 might actually let commands pipe information stored in such structures as input to other commands. I made sure to note that in many places within the comments of my functions. /data merge also opens up the possibility of multiplayer games that hijack functionality from the alcoves, so I made provisions for that functionality in the future.

This time around, the game starts when a player steps in an alcove. The Game Center operating system checks the player’s score for what game they want to play, and loads that game’s loader into the Level Slot for that alcove using a structure block in the home coordinates. The loader checks what slot it’s in, then checks what level to load for the player in the Level Slot’s alcove. It tries to load in the first half of the level, but if it fails for any reason, it has a carefully staged self-destruct to reset the Level Slot while making sure the redstone bits don’t accidentally pop off while multiple blocks are being changed (I’m pretty sure Minecraft likes to work from low y values on up based on an experiment I did with End Gateways, and my observations here back up this hypothesis).

After the loader, a series of command blocks embedded into each level takes over. These blocks handle spawning in the boat, teleporting the player, animating the boat so it does its cool spin, and checking for if the player has won or left their boat. It is here that I fixed a bug where the last version would smash players’ faces every once in a while. I used some redstone to space out commands. One of the last major bugs I faced before I got the main show working was dealing with how I hooked up the win detector. I had two blocks on repeat calling the same function and feeding into the same conditional chain command block. I ended up moving the win condition and giving it its own, dedicated command block.

A very big thanks to Grifter for all the help he’s given me this week. He got me started and helped me build inertia until I understood things well enough to continue mostly on my own. He also provided a friendly Discord avatar for me to explain the problem to in the hopes he would have time to help fix my current bug, only for me to keep working on it and often find it on my own.

A final word: documentation. Documentation is the link between you programming now and whoever is working on your project in the future. I have a whole folder in the root directory of the datapack with what the logic behind the Game Center and the Boat Challenge game is supposed to be. It also has a list of known bugs, a list of naming conventions I found helpful, credits, and even some general notes for what to do for if someone ever rewrites the project again

Final Question: Have you ever gone back to redo a project, only to find you’ve sped up by a fairly large margin


Leave a Reply