Testing and adjusting physics

Let's go ahead and test the game for the first time. We haven't set up all the physics yet, but let's just see where we're at. Once you click on the Preview button (at the top-right of Buildbox), you'll see this screen:

Testing and adjusting physics

Remember how we have the Game Mind Map laid out? This is the current state of our Main Menu UI. Click on Start, and you'll be taken to the screen below and left (the Worlds UI), and finally, when you click on 1 (for world number 1), you'll be taken to Mars and can play (the screen to the lower-right). Play with it, and then we'll move on.

Testing and adjusting physics

Making the game easier to test

Until we get to making our UI screens look better, we don't want to have to go through all of these menus every time we make a tiny adjustment. So, let's adjust our Game Mind Map so that when we hit our Preview button, it takes us straight to the area we're testing. Go ahead and open the Game Mind Map.

What we need is to literally skip-over our Menu UI and Worlds UI and go straight to World 1. So, grab the handle on the Load output of our Start node, and drag it straight to the Load input of the World 1 node. The results are depicted in the following screenshot:

Making the game easier to test

Now if we test our game, we'll go straight to the game (instead of the menus). Go ahead and try it out!

Adjusting the physics

Ok, so our current game is slow and boring. But we don't want it to be too hard. As Mars is only the first world, it must be attainable, yet moderately challenging. Single-click on the World 1 node, and let's edit its properties. Rename this world Mars Training Ground, and set all of the properties to match the following image. Let's go through these settings...

Adjusting the physics

Mars is a little less than half the size of the Earth, so the rover needs to seem to float through the air a bit. So let's reduce the vertical gravity by changing it to -20. We do want to make sure the rover can go somewhat fast, so bringing up the Time Warp to 90 will help with this. Also, Mars is a very dusty environment, so we want the rover to peel out as it accelerates. So, we'll reduce our friction to 30. Finally, because of the reduced gravity, we'll also want the rover to bounce a bit when it hits the ground, but not so much that it's uncontrollable. Ergo, we'll raise the Bounce parameter to 0.2.

We're not done yet with adjusting our physics settings, but go ahead and test it out now just to see what our new settings for the world have done.

Ok! So now that we've set up the physics for our world, let's set them up for the rover. Go ahead and open the World 1 node, which is now the Mars Training Ground node. Once we're in our world, let's open the Training Rover character's properties from the asset library. You'll need to scroll down to the Character Gameplay Settings in the property window, and adjust them so that they resemble the following image. Again, let's go through these one at a time.

Adjusting the physics

First off, even with the Time Warp setting we did on the world, the rover is just not fast enough to feel very fun. So we can increase the horizontal max speed to 90. We're going to leave the rest of the settings alone for now, and just change both the Left Lean Force and Right Lean Force to 60. We'll revisit this area when we set up jumping later. But for now, we don't need the character itself to bounce (as we don't need the body to bounce...it just blows up when it hits the ground). What do the lean force settings do?

Note

The following features or stunts are performed by professionals or under professional guidance, please do not re-enact the stunts performed in this game in real life instances...

Remember how we set the Rotate CW and Rotate CCW controls? This lean setting set indicates how much the control affects the character. Set it too high, and the character will spin like a top. Set it too low, and the player won't be able to accomplish tricks. The setting of 60 for the lean forces will allow for a complete backflip in the game off our jump. Try it out and see! When going up the ramp, lean back (using the left arrow), and hold it until you do a flip, release that arrow as you begin to come around to slow your flip and land on your wheels. If you land in a wheelie, release the throttle (the D key), and you'll bring down the front end. Play with it! You'll notice that using the throttle keys (A and D) will affect your aerial rotational speed too (due to the physics of torque). Now, this is a bit more fun, and with practice, the player will develop their skills! Much better... right? Please, feel free to go back and play with any and all of these physics settings to really get a feel for them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.4.179