Physics

So hey, this is the inaugural post on this game in my blog, w’hoo :).

I spent some time this morning working on adjusting the physics of the game while waiting to video chat with my grandma across the country to wish her a happy birthday. Among the things I wanted to fix were the max tilt of the board (I had set it to 45 degrees as a test yesterday), and the speed and mass of the marble.

The board tilt was easy enough. After working out how to cap the board’s rotation last night, I just set the maximum as a variable instead of a hard-coded value and can now adjust it as a parameter of the board itself. I dropped it from 45 degrees to 15, but I may twiddle with it a bit more later on.

The marble movement was a bit harder to fix. I spent about 40 minutes playing with mass and drag parameters trying to get the thing to accelerate constantly as it rolled across the board, rather than just getting going and then rolling at a fixed rate of speed. I finally came across a parameter in the physics settings entitled “Max Angular Velocity”. This was set to 7; far too low for this application. I upped it to 20 and the marble started behaving more realistically, but it was almost impossible to stop it before it rolled off the edge of the board. So, I dropped the mass from 1 to 0.1 and now the ball moves realistically, and is fairly easy to control. Huzzah!

My next step is to make a basic board in MAX with a few holes in it, a marble to match (settings will need to be migrated over from the current test board setup), and see if I can get the game to behave as expected. I’ll probably get a start on the board mesh during lunch tomorrow (as today was largely spent playing Tomb Raider: Anniversary… time not at all wasted, if you ask me… that game has some serious production value, and being perhaps the only person to get through the ’90s without staring at Lara Croft’s bum, it’s been quite fun to play the game, story, and locations for the first time), and wrap on a test board and marble combination by the end of the day, hopefully with some testing and a new demo to go along with it. I’d also like to try getting some UI elements (like a timer and the point scorer) on their way to implementation as well.

By the end of the week I aim to have the demo board working, have the UI implemented, and hopefully have a jump start on getting the power-ups and game modifiers into development. It’s more a question of how much time I have to put into it than how much Unity will enable me to do… so far development has been pretty quick… three days from concept to working tech demo isn’t bad, I must say.


Leave a Reply