Chapter 4. Advanced World Design – Ramblin' Rover, Part 2
That was a lot of work in the last chapter, wasn't it? This chapter is going to take all of that up a notch. We're going to complete our Mars world, and even knock out two more worlds! If you're unsure of anything we covered previously, please take a moment to review it before we move forward. Ready? Ok, let's do this!
As we've mentioned before, we're making a hybrid game. That is, it's a combination of a motocross game, a platformer, and a side-scrolling shooter game. Our initial rover will not be able to shoot at anything (we'll save that feature for the next upgraded rover that anyone can buy with in-game currency). But this rover will need to jump in order to make the game more fun.
As we know, NASA has never made a rover for Mars that jumps. But if they did do that, how would they do it? The surface of Mars is a combination of dust and rocks, so the surface conditions vary greatly in both traction and softness. One viable way is to make the rover move in the same way a spacecraft maneuvers (using little gas jets). And since the gravity on Mars is lower than that on Earth, this seems legit enough to include it in our game.
While in our Mars Training Ground world, open the character properties for our Training Rover. Drag the animated PNG sequence located in our Projects/RamblinRover...
One really cool thing about platformer games are their physics-based obstacles. This would mean items such as teeter-totters, items that crumble, items that swing, and so on. Let's start with a basic pile of rocks with a ramp on it. Start by creating a new scene and copying our beginning ground block into it, as done before. Also, let's name this scene Rock Jump; duplicate an additional eight ground-blocks (so there's nine in total), and extend our scene bracket to match the length of the eight ground-blocks. You should have something like the following screenshot:
Now, remove the fifth and sixth block from the left to create a two-block gap just right of center. We duplicate the blocks all the way across the scene to make sure we have a level layer (rather than dragging and dropping across a gap). It's just a quicker way of doing things, but if you like, the same could be accomplished by dragging the fifth block over, and then continuing the duplication. Your exact process...
Ah, my favorite thing about motocross-type games...the loop. I don't know about you, but I've been looking forward to this section from the moment the book started. Before we start, let's explain the principle to you.
To complete a loop, the rover must be moving at high velocity so that its centrifugal force lets it defy gravity and keeps it on the ground even though the ground is upturned. So, we're going to need to build a long incline, and a steep downward ramp leading into the loop so that it can make it all the way around the loop without crashing down on its roof. But it still needs to be challenging, so it can't work just blindly. Firstly, what we're going to have to do is build the ramp so that in order to take it properly, the player will have to lean the vehicle so that after it comes off the top of the hump, it's airborne and needs to touch down in a way to help the velocity be high enough to carry it through the loop.
Secondly, as Buildbox is 2-dimensional, we'll...
Before we get to the level itself, we'll have to create a way to get there! We'll need a scene that pops up every so often in our game, but isn't readily-identifiable as the portal to our secret level. Let's start by duplicating an existing scene. If you select the Rock Jump scene, and use the D key on your keyboard, you'll create an exact copy of the whole scene. Finally, rename it Rock Jump Portal. Then, move the scene down (in the scene selection window) to the end of the list. It should look like the following screenshot:
Great! So upon entering the scene, the player will believe they are just entering another rock jump scene. But let's do something more interesting here. Make the scene look like the following screenshot (using the same techniques as before):
So, here's what this obstacle is all about: it's supposed to look like a simple platform held up by narrow sticks for the player drive across the top of. But if a player hits it just right, and reverses their...
Back in the Start scene for our Mars Secret Level
, let's drag in all of the images (because it's an image sequence) from the Projects/RamblinRover/Pickups/Coins/Normal/Comp 1
folder, as an Action.
Actions (compared to Objects) are how we create unique pickups and...well, actions. These might include temporary invincibility, killing all enemies, rewards, and healing damage.
Select your new coin pickup from the Actions section of the Asset Library, and we'll work with the properties a bit. Let's take a quick look at these properties one by one (starting with Action Type because you should have a firm handle on Collision Shape and Default Animation by now):
- Action Type: This is kind of a preset option. Here, you can set it for the various types of pickup that Buildbox has to offer. Let's set this to
Coin
. - Action Animation: This is mostly useful if we're going to do
Invincibility
, or Kill All Enemies
for our Action Type. With this, we could project a wave across the whole screen...
Different worlds = different physics?
That's right, we can set up different rules of physics for each world. But it goes further than that; each world is almost like its own version of the game. We'll have to replace backgrounds, re-scale the parts of our character, fit them together, and so on. It's essentially like going back to square one of our Mars Training Ground.
Our next two worlds will be Gliese 581D and Kepler 186F. These are real exoplanets found by astrophysicists, so we can guess at what the physics and scenery should be (with some embellishments courtesy of imagination).
Gliese 581D was discovered in 2007 and is the fourth planet from the star Gliese 581. It's also on the edge of what's known as the habitable zone. It's theorized that it's a primeval environment with active volcanos. It is also nearly seven times the size of Earth, and only about 20 light-years away from Earth. So, it's going to have some very strong gravity. We'll also make the surface have more traction (as...
If we said WOW at the end of the last chapter, we'll give a HOLY COW to this one. All of the playable levels of our game are now complete. Take a break. Let it all sink in. This was an enormous deluge of information. Believe it or not, we've only just begun! In the next chapter, we'll cover some advanced features to polish our playable levels, create our next two rovers, complete our UIs and menus, and get on the road to making money with a monetization structure!
Brace yourself, take a deep breath, and let's do this!