Showing posts with label Rhino ball. Show all posts
Showing posts with label Rhino ball. Show all posts

Sunday, July 26, 2015

Rhino face-off, bouncy version

In my previous blog I thought to add a rhino to the game as a baddie.
So to recap, I had two versions, one as Rhino/Spacehopper hybrid the other as a proper animated version of a rhino.
This blog will follow my research into how to make the Rhino/Spacehopper hybrid.

Rhino face-off

So looking around in the Unity physics 2D I thought I'd start with the ball. In Shuffa ball I have a script for the ball, a RigidBody2D and a circle collider 2D so I added the same.

Unity editor after adding Rhino script, RigidBody2D and Circle Collider 2D

Then in the script I add code to apply force to the rigidBody2D. This little snipit says if the velocity is less than 5 add I to the force, by putting it in the fixedUpdate as opposed to every frame it does it at a fixed time. If every frame, different machines have different frame rates.

Rhino script in VS2013 Community edition

Here I use VS2013 Community edition, I tried MonoDevelop that comes with Unity, but found the Intellisense a bit flaky. Using Visual Studio at work everyday, I am too used to the Intellisense working and all of the keyboard shortcuts, so I changed to the VS2013 community edition.

Running the scene, everything worked as normal, then I wanted to add the Rhino head, this is where I went looking through various Physics 2D components.

The thing that seemed most obvious to me was the Wheel Join 2D, this seemed what I wanted. I connected my wheel joint 2D from the wheel to the head of my rhino, which seemed the obvious way but it really didn't work as I expected. 
Then I found on the internet that you connect from the head to the the wheel, that was better but again didn't look right. So I added a small wheel at the front of the head. Then for movement you have a motor not the FixedUpdate function above.

It was OK but not the vision I had for my Rhino ball, it was more like a Rhino bike than a Rhino ball.

Click here to see a video of the Rhino motor bike in action.

Rhino bike

Next I tried the Spring Join 2D, this is like car suspension. Added two to the head and then I stopped the head from rotating on the Z axis. This gave more of the effect I was after.

Rhino with 2 Sprint joint 2D



Thursday, July 23, 2015

Why not a Rhino?

I was talking about my game with my wife, when I had the idea of a baddie, something with a sharp point who's sole purpose is to burst the Shuffa ball. I thought of a bird with a beak, but my wife said.
"Why not a Rhino?"
So here are a couple of mock ups.

The first is my drawing of a rhino, it reminds me of a film I saw many years ago called "The Gods must be crazy" about a cola bottle being thrown from a plane.
The thing that has stuck with me are the scenes with a Rhino, where it would run towards and stamp out bush fires. I've googled this to see if it is a real thing, but can't find evidence. Anyway here is my Rhino running to stamp out a Shuffa ball.


The second is a Rhino ball, more of a stylised version of a rhino living in the Shuffa ball universe. If you could cross a space hopper with a rhino this is what you'd get.

The rhino too would react to the obstacles so you can ping him out of the way. If you ping him hard enough he'll get stuck to the ceiling.


The rhino ball has the advantage of being easy to animate with less moving parts, but the 4 legged fire marshall could be more dramatic.