MineCraft Boat Race Port Part 4

Good Morning, from my Robotics Lab! This is Shadow_8472, and today, I’m almost done with my port of 2Cubed’s boat race. Let’s get started!

This week felt like progress was made in spurts thanks to both jam and Grifter, the two people from my MineCraft server helping me. About all my major accomplishments this week are in part to their command proofreading. Early on, I was working on the code to start the level. The /tp command and its supporting code was challenging to get just right. I came up with the idea to use an identifier block no player could [normally] see and reference it from commands later and jam helped me get something working. I was able to tune it in from there.

Jam once again helped me understand how the scoreboard works so I could build a level select. Long story short, imagine a spreadsheet. You have objectives at the top and entities on the side. Each cell at the intersection has a score to edit. There are no “global” scores, as much as I’d like to think that would make it easier on the learning curve. Objectives are added without attachment to an entity, but scores in those objectives are. Once I had that, I could step on a pressure plate to set my next_level objective to some level and load it with the alcove pressure plates.

Then came a day or few where nothing much happened, but with MineCraft 1.13 almost out, I wanted a workable demo by its launch date. A friend showed interest in seeing my work so far, and part way through the week, I scheduled a viewing on Friday, but I didn’t make it.

The next major hurdle after the teleport was how to tell if there were any players in the arena outside their boat and outside the starting area. After tossing the old command to jam and back (without luck), I passed the problem to Grifter, and he was awesome. He isolated a targeting selector I needed, where I likely would have figured it out in another few hours.

My focus sort of drifted to the win condition. Sure, it took me a while, but I eventually realized I could do it with a single command. Getting that command was another topic. I did most of the work in assembling it, and jam got me a snippet that gave me a working theory. The commands were a bit stubborn, but after I got something almost working, another chat with jam and it’s working.

The most recent challenge was targeting “cheating” players. The old game used scoreboards for almost everything. Something about a cheater tag showed up if you stood up and you weren’t in the start area. I wrote a command, finished by Grifter after hours of me doing trial and error, that spammed the word “hi” at any “cheating” players in adventure mode. And that’s where I am now. The next step is to replace the /say command embedded within the /execute with a function command to clean up players who might be done with a level.

I guess I have been making more progress than I thought this week. Before those last two breakthroughs on Sunday evening, I was all ready to make a big speech on progress and how a lack of success doesn’t mean you aren’t making any. Thomas Edison comes to mind with his brute force work on the electric light bulb. Once you know something doesn’t work, you don’t try it anymore. My difference here is that I’m documenting my progress with personal messages.

Final Question: I’ve now doubled my original project estimation time. I don’t really care. I’m getting working results on a semi-regular basis, and I might just get my 1.13 deadline. Even if I don’t make that one, I’d still like to get it working before my server updates. Have you ever worked with multiple deadlines for the same project?

Leave a Reply