Day 13- Almost…

Day 13- Almost…

Quote of the Day: Well I was going to put what I consider to be one of the better quotes of the day ever in here, but it’s, ah, slightly R-rated. So instead have this random stupid Jaden Smith meme quote- “How can mirrors be real if our eyes aren’t real?”

Music of the Day: Wolfmother. I love Wolfmother. If you’ve never heard them I would recommend either Victorious or Tales, which are currently my 2 favorite songs.

Today I was driven to the office by my father, because my car is getting repairs. Advantage: I didn’t have to use or pay for gas. Disadvantage: I couldn’t go 100 down Alvernon (I’M JUST KIDDING. The fastest I’ve ever gone on Alvernon is only, like, 80 or so. Mom I’m still kidding). I started my day alone, as is the norm now. I have learned that game developers tend to be night owls if they don’t have strict hour restrictions. I am also a night owl, but I do like to get up earlyish. My entire family is laughing right now, I guarantee it.

Anyways, I started working on the teleporter again, trying to get the score issues re-fixed and health data to save over and be displayed correctly. It only took me a few minutes to get all of that working again, but the problem that then decided to present itself was the “Restart” button. It’s a pretty simple button. Just starts the game over with a fresh score, full hp, etc. Thankfully I had thought about it in my code, so restarting did fully restart you, even if you went through a teleporter during your initial play session. The problem was that once again, the health bar wasn’t saving over. And this time the player’s health, the actual numerical value, was being carried over. Which, for a restart, you don’t want. So I had to code in the order to fill the health bar again, and move around my call to instantiate the health bar a few times before I did manage to get it working. That’s about as interesting as I can make it sound. it was pretty much a bunch of Ctrl+x and then Ctrl+v in different spots of code until it worked.

So everything should be working right? I have checks for all cases, made sure quitting and restarting worked, all the data is being carried over between levels, or reset if it needs to be. I tested it all the way through with Gizmo, everything was peachy, it was great. But of course, nothing can ever be that simple. I decided to make sure it worked with all 4 bots, you know, get the most complete test I could, and lo and behold, something broke. According to my code, which was done in such a way that it was not case by case depending on the bot, but worked for any of them, there should be nothing wrong. But because of the way that Clip and Mack’s (The two who broke it. Bit was fine) attacks work, I was getting NullReferences galore whenever I tried to attack. To add some context to those names, here’s a picture of the 4 of them:

botz.PNG

Clip is the one I was working on a couple days ago, she uses miniguns. Mack slams the ground with these 2 snowplow-esque things on his arms. For some reason the two of them are coded differently than how Bit and Gizmo work, which means that for just a split second, 1 or 2 frames at most, their attacks are deleted when changing levels. But that’s all it takes to throw a NullReference, and the code automatically shuts itself off after one is triggered to try and avoid overloading your computer.

And I have no idea how to fix it. That’s the job for tomorrow! As seems to be becoming a trend for me. Fix a thing, break another thing, fix it the next day, repeat. But theoretically, there will come a day when I fix the last thing and we have a fully working game ready to release off of early access! Until then, you’ll have to make do with this blog.

If you’ve made it this far, congratulations! I hope you’re enjoying your Rodeo Break and aren’t getting thrown off of large bucking animals for the entertainment of onlookers. I never understood the rodeo.

Advertisements

One thought on “Day 13- Almost…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s