Day 11-Can He Fix it? Well, sort of…

Day 11-Can He Fix it? Well, sort of…

Quote of the Day: (Context: it was dead silent before this) “Shut the F#*& up! (turns around) Sorry, I hate ads.”- Jeremy

Music of the Day: Massive variety. To provide an example: musictoday

Bugfixes galore. Or rather, a couple bugfixes, some streamlining, and a lot of google searching. Like i said yesterday, today my focus was on fixing small problems with the game before Emerald City ComicCon this weekend (I forgot to mention yesterday, it’s in Seattle. And no I’m not going. I wish). I started off by working on mouse aiming.

Like I said yesterday, MiniBotz has two different control schemes: keyboard/mouse and controller. The bot you are controlling always aims and fires in either the direction of your mouse or the direction of the right joy stick, but the code for mouse aiming is finicky, especially when you get your mouse too close to the bot. I think what a lot of people (and I’m plenty guilty of this myself) fail to realize about games is just how much code goes into even the littlest things. Having the bot constantly track the mouse required first finding the position of the mouse, then rotating to bot to point towards that without rotating it along any other axes. Thankfully Unity handles a lot of this on its own, but you still have to to a lot of work to make sure it’s working as you want.

The way it was originally, when the position of the mouse was found it was found in relation to the screen, which is good and bad. it’s good because it’s adaptable, so it functions the same no matter what size of screen you are using, which is nice. On the other hand, when the player isn’t centered on screen it can cause issues. And as I’m sure you can guess, the player isn’t always centered on screen. So I instead changed it to calculate off of  the player’s position. This is where most of the googling took place, because I had to start dealing with quaternions  (rotationy stuff), and all of the variables you can imagine. I eventually got it though, and the player tracks the mouse much smoother now.

Next I moved on to forces. Or to be more specific, to forces from guns. Or to be more more specific, Clip (one of the bots) uses mini guns as her main weapon, and when you shoot them too close to a wall or other barrier, they push her back. So I started messing with forces, counter-forces, velocities, quantum physics, string theory, prayed to the Flying Spaghetti Monster (praise his noodly appendages) a few times, and exorcised my computer. I couldn’t get it to work. Ever. Either Clip would go careening around the level when you shot or the bullets wouldn’t move at all. It was another case of “I know exactly how to fix this and I can’t figure out how to put it in code.”

I usually write these when I’m eating lunch or on a break (often a cool off from frustration break), so you’ll never know if I fixed it till tomorrow. Muahahahahahahahaha! I would be a good evil dictator. Don’t tell anyone I said that.

If you’ve made it this far you get this picture of me in my new glasses (Feat. teenage acne and the realization that I need to shave). I think they make me look like an English professor:



Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s