Near Year’s Eve is upon us, and it’s time for some New Year’s Resolutions. I’ll be making those, but not on this blog. I’m spending enough time learning Unity and the ‘Don’t Break the Chain’ is working fine enough that I don’t think I need the additional help.
Matter of fact, I’m upgrading. Starting this new yer, I’m going to try and do two videos a day. After all I’m only hurting myself by taking my time. I am by no means committing to the doubled workload. On off-days I’m only doing a single video, but I’m going to try and move things along in the hopes of getting to my actual dream of making completely unique games. To that effect, I took the Section 2 end quiz and watched the “Wrapping things up” video today so we can get into the good stuff tomorrow; Section 3, where we make a text-based adventure game. I’m excited.
Today was kinda difficult to motivate myself to do…when the next video is called “Debugging Your Code” and its 11 minutes long and it’s freaking New Year’s Eve and I have no groceries cause I just got back from my trip so I’m starving to death and you know what fuck it I’m done.
Experiment’s over. No more coding, no more chain.
Naw jk I finished it and it has some good stuff. Gotta be honest, I didn’t finish it in one go like normally though. First it talked about the importance of understanding the compiler; the compiler gives you a lot of information on what went wrong, where, and why, and it can be invaluable to deciphering what you did wrong.
Next we went into rubber duck programming. Way ahead of you, devs; not only is this blog serving as my outlet, I’ve got Brenna the Rattata sitting beside me on my desk if I need real-time assistance.
We moved onto a dire warning never to assume, because assumptions can cause fundamental problems when you build your code around them and they turn out to be wrong. I’ve spent enough time making games in Multimedia Fusion to 100% understand that concept; its awful when the problem turns out to be “you copy-pasted stuff into the wrong line” and everything you did was technically correct in your head, you just didn’t lay it out on paper the right way.
Then we moved into the Minimum Viable Test case, a good guideline for removing all extraneous code and narrowing it down to just the code that isn’t working. I’ve done this before, though I prefer the “create a new project that only uses the bit that isn’t working,” an example of me doing that is here. I guess that’s a bit closer to the “Scientific Method” idea they describe after that.
For day 23 I finished catching myself up with the Series. My Number Wizard looks just like his and I playtested it the whole way through, catching bugs and missing a lot of semi-colons. But now we’re on target! I’ll be watching a new video tomorrow.
Since this is a pretty paltry blog post, I thought I’d address a throwaway question my brother had. In order to test my new iOS exporter for Clickteam Fusion I ported Oedipus in my Inventory to Mac and sent it to him to play. He thought it was cute but didn’t get the ‘Content Art’ joke in the gag Collector’s Edition page (click the staff on the main menu to see it).
Well, the ‘joke’is simply that I stole (with minor recoloring) the main character from an old shitty game I made while teaching myself about platforming elements. It’s called ‘Hector’s Odyssey” and if for whatever reason you wanted to see where the shepherd came from, here you go. Sorry I can’t give you the Mac versions, they’re at home on my parent’s desktop and they didn’t have sound anyway.
Whew, flew back to Austin today. The trip to my family’s was really one of the best I’ve ever had. I had heartfelt conversations with all three of them individually, and we had deep conversations as a family and I think we all learned a lot about each other and our bonds only strengthened. Also got to see old friends and even had a good trip to Grandma’s in there and everybody came away happy. Top Notch.
I’m not actually that tired but I do have the writing bug, feel super motivated to finish this story I started called “The Delectable Constable” but I can’t leave Unity hanging so I finished 80% of rewatching Course 2 in its entirety and updating my game to have all the right stuff. (Note to future self: that means tomorrow continue from course 19) Tomorrow I’ll finish catching up to Course 2 and complete Number Wizard so I can move onto Course 3, which hopefully includes how to publish this game.
Fun fact: Everytime something was broken it turned out I either missed a semi-colon or added an extra space. EVERY TIME. I better get used to this, I suspect.
Today we wrapped up our work on Number Wizard, ending by adding some pretty code that cleans up the game’s appearance when played in console, as well as did a bit of debugging. He solved the problem me and Quentin identified in the previous video and he also fixed the game not resetting the variables to 1 and 1001 when we restarted the game. Even though today was called “Finishing up Number Wizard” I suspect we’re going to do a bit to get it published and all tomorrow.
Which is amazing timing because I fly to Austin tomorrow! Which means I’ll be ready to go make my game and actually have something to publish! I never got around to making my parent’s Apple have the right stuff, seemed a waste when I’d be back in Austin so soon.
Not gonna lie, day 20 kinda took me for a ride. Dunno if it was because it’s 1am and I’m half-asleep but refactoring is a little wonky. I didn’t know what the hell was going on as he dragged everything out of Start into a new function and then just called said function at Start. But it became clear when he dragged the “here’s what to do when making a new guess” code into a new function and then just called it so that you didn’t have to repeat the code multiple times.
But I’m still not 100% on what happened so I’m reviewing it until I can grasp it in its entirety because I just know this is some fundamental shit and I’m gonna have to know this. But maybe, like, later. I gotta rewatch this whole sector anyway once I go home in 48 hours.
Whelp, nine-minute video today, and it was a doozy. We’re getting into the nitty-gritty, and I can’t tell you how annoyed I am that I’m watching from the sidelines instead of actually doing the coding alongside him. Once I return to Austin on the 29th I’ll have to spend a day fixing that.
But I’m doing the next best thing and following along making sure I understand exactly what happens at every step. Today we learned about setting items outside of either the Start or Instance function if you wish them to be unrestrained by either qualifier. We used this to help define the max (whats the maximum possible number?), min (What’s the lowest possible number?) and guess (What number did I just guess?) variables.
Two things I was unsure about this video.
(1) At every step we redefined the min and guess variables thusly:
min = guess:
guess = ( max +min / 2);
Okay great, this redefines our guess. But I don’t get why it didn’t break everything by immediately thereafter redefining min based on the new guess. Apparently this is the part where coding and mathematics variables differ because it appears old lines will not redeploy after being executed, otherwise our current code would break into infinite loop.
(2) The professor solved an ‘edge case’ (unusual circumstance caused by using the extreme borderline values) where the computer would never guess 1000, only guessing 999 due to the way the aforementioned code rounded down. He solved this by adding this to the Start function:
max = max + 1;
So let’s walk through this logically: We’re setting the maximum to 1000 at the beginning of the game, then immediately redefining it to Max+1. Why aren’t we just defining the max to be 1001 before executing the Start function? The weird workaround seems silly and an unnecessary complication.
Update: Oh wait, just realized. If you do that, the game will tell the player that the highest number they can pick is 1001. Also shoutout to this guy who spotted a problem that made the code even better: