Friendship & French Fries

A podcast & blog about life and the creative pursuit of happiness

Jake <3s Lady Rainicorn

Jake

For this week’s assignment, we need to basically recreate a static screen, platformer game similar to what we created in class.
Because we had already done this, and it had gone so smoothly I thought it was going to be a piece of cake… boy was I wrong.
I didn’t realize how complicated (and different) unity scripts are to regular JS until you have to write the yourself. I was trying to create a simple rotation – like a wheel – and it took me upwards of an hour just trying to figure it out. I jumped from transforms, to Quaternions, to AngleAxis, to god knows what else. More on that later, but just not it’s not as easy as it may look.

First, I needed to figure out my game. After a bit of back and forth, I decided to make an Adventure Time themed game in which Jake the Dog needs to catch Lady Rainicorns love in order to win the game. If he catches a falling Ice King though, points get deducted from his damsel’s love!

The beginning was easy. I gathered all my assets, created my folders and inputted everything in. After a bit of a refresher from the class’ jigglypuff game, I created the empty game object for the floor and made both the heart and the Ice King prefabs.
Here is where things got complicated. Getting to writing the scripts was a b*tch! I couldn’t remember them for the life of me and spent a good while figuring out the third script belonged in the empty game object(floor). I’d love to spend more time just on script organization and writing to feel more comfortable with this; hopefully it’ll happen.

Screen Shot 2016-02-09 at 11.06.21 PM

From there I started investigating into the rotation of Jake. I spent way too long on this and wasn’t able to figure it out. After a while I decided to put it aside and come back to it if time allowed, I still needed to create a score board first.
Next where the hearts and Ice Kings…. and everything broke. I tried for a full day to fix it. I moved stuff around, poked around the internet and Unity forums and by the end of it, I had moved to many things around that I decided to scrap the game and start over.

So I did just that. The beginning went by much faster and I got all the way through the players movement without a problem. Now it was on to the collision. Between me, Craig and Xiwei we spent a good amount of time trying to figure this out. We poked around, added colliders, rigidbodies, declared global variables, assigned gameObjects and finally something worked! I still don’t know what though — but at that point, who cares.

I added the king, copied the same script as the hearts, and it was still working! on to creating spawns. I wanted them to fall at different times, so I tried a couple of things with the timers until I settled into creating individual ones for each function. In the process though, I almost broke my code.

Screen Shot 2016-02-11 at 1.36.28 PM

Now my problem was that when I fixed the collision on the objects, I had to add a collision Object to them, and they now won’t go through the floor, but collect on it instead (like in the picture above) ::sigh:: I took at peak at Michelle’s code, that she was nice enough to send. And noticed she had a collision for the GameObjects on the floor. Problem solved! Now for some reason though, my king had broken when I added the code.

I’m having a hard time figuring this out. I think I’m just going to put a pin on this until class, and sit down with Mark and figure this out. I’ve lost a battle, but I haven’t lost the war!

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top