Day 22

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.

Day 21

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.

Day 20

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.

Day 19 – It starts getting hard!

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:

Screen Shot 2015-12-26 at 11.23.48 PM

Day 18

We learned about “else if” today! “Else if” is used to differentiate two different commands so that only the first one happens, not all of them at once. Also got a mini-challenge to see if we could program the Enter key to display a string when pressed. I did it correctly in my head so that’s a good sign.

They’re going very slow in this section, but that’s a good thing. Not only is scripting probably the hardest thing we’re going to face as budding programmers, but I have bonus motivation because I can’t actually follow along until I get home. Though now that I think about it, I’m not traveling around anywhere else so I could jury-rig Mom’s apple up and code there. Thoughts for a day that isn’t Christmas.

Shout out to my favorite gift of this Christmas, Justin! Second place was GI Joe: Commando Attack which is literally the best board game on the planet bar none. That’s right, that one you’re thinking of right now is worse. Go play GI Joe Commando Attack and try to disagree with me.

Day 17

Mid-Section Quiz today. Normally when there’s a mid-section quiz I take it and then watch a video, but this time I’m letting it slide because (1) I’m not actually implementing the videos and I don’t want to get further behind when I go home and catch-up (2) I got 8/8 of the quiz which shows I’m fucking awesome and (3) It’s Christmas Eve and my Xmas presents of “Write Mom and Dad wikipedia pages on them” is dangerously behind and must be done by tomorrow. So that’s why I’m not currently playing my shiny new copy of Counter-Strike: Global Offensive one of my blog readers bought me (That’s the Daily SPUF blog, not this blog. Nobody reads this blog) I’ve wanted to play CSGO for a long time but couldn’t rationalize paying 25 bucks for it.

Day 16

Man, I miss back when I had my desktop and no family obligations. Well okay let’s be fair, my family is awesome and I love every one of them, and I don’t get to see them often so I’m loving the chance to reconnect with everyone, but they’re not great for the ole productivity. But I won’t break the chain!

Today’s video we added some more variables and learned how to make the game react to the user pressing keys. Also learned that ctrl-apostrophe lets you explore the manual, which is super useful. We learned the difference between Start (which checks at the beginning only) and Update (which checks every frame). Also got introduced to the Collapse function, a good way to prevent the console from being flooded with identical responses.

Day 15

Welp, here I am at Grandma’s house. Grandma’s at a ripe old age and we only get two days with her before having to zip home for Christmas so I spent the entire day in her company, meaning I have to do my video tonight. But like I explained before, I’m at grandma’s now, far away from the prepared desktop and sitting idly with my slowass cannot-do-Unity laptop.

But here’s where the “Don’t break the chain” system works its magic, because I want to keep the chain going so bad I watched a video even though I can’t do it! We covered variables, got to watch him define the variable “max” as the highest number the player can choose, and “min” the lowest number (ie 1). Then we got it to print some things. Except I didn’t, I just followed along but I totally knew how to do that beforehand so we’re not surfing into totally new territory or anything.

Chain is unbroken, even if it’s got some pretty weak links slinking along right now. Probably not the best time to add ten pushups a day like I was toying with doing.

Day 14

Yeah, day 14 is the same premise as day 13. Lemme explain;

So yesterday I put all that shit on my laptop so I’ll have a laptop, but it was super slow. This isn’t a great laptop, the reason I put my Unity plans on hold before was because Unity was freaking laggy and bloated and everything took forever to do. So I waited until I got my new desktop for my birthday.

But now I’m at my parent’s house and said desktop is in Austin but I realized “Hey! I can use my mom’s Apple desktop!” So today I spent way too long installing Unity and making all the dumb stuff for the third time. And GUESS WHAT we go driving to grandma’s tomorrow, aka a place that DOESN’T have the desktop I just blew a bunch of time developing on, so I’m restricted again to my damn laptop. I don’t know if I can code on it, I really don’t.

But I will. Because nobody said coding was easy, and I’m not breaking the chain for anything, especially not wimpy problems like below-average hardware. We’re making a console game for god’s sake, I’m just gonna tank through it. And then eventually I can fly home and do all of it again as I update my actually-decent desktop! 😀 Gotta love programming!

In other news, got to see Star Wars Force Awakens. It was pretty awesome, deserves all the money it’s making.

Day 13 – Actually day 12 again

I rewatched yesterday’s video and just retraced the steps instead of moving onto a new video. Still technically didn’t break the chain (after all, I said I’d watch a video a day, didn’t say a NEW video) and I just flew home to California so I’ve been on planes all day. So I had to recreate Number Wizard into this new computer. I’m ready to actually move forward tomorrow, but it’s gonna be painful these next nine days cause this laptop is sooooooo slow…

Still, nobody ever said genius was easy.