Categories
Basic Tutorials

Obstacle Game Miniseries #4: Flying Cars Jump Puzzle

Continuing the Obstacle Game Miniseries, we now look at adding a jump puzzle involving flying cars!

If you have arrived here without visitng the previous tutorials then you might want to start from the first one, or you can just jump right in.

In this tutorial you will:

  1. Add Flying Cars and make them move
  2. Create a timed jump puzzle across moving cars and cranes
  3. Introduce a parkour style jump puzzle up the side of a skyscraper for the Player to complete the game!

Adding A Flying Cars Jump Puzzle

Obstacle 4 should start to really challenge the Player. It’s time to give them a bit of a thrillride.

Open the Library and add the Flying Car Prop to your Hotbar.

Add a Flying Car Entity to your level.

Use the Entity Editor to move the Flying Car Entity’s position so that it runs parallel to the end of the Checkpoint3.

Your Player is going to have to jump onto this car as it passes, just like the logs in everyone’s favourite frog-based jumping game, so make sure that the car is positioned at a distance that is jumpable from the checkpoint.

With the Entity Editor still open, press “Add to Entity” and add the rotateAndMoveScript.

Make a note of the X-Axis value of the start position (this one is 1850.00).

Now move the car backwards on only the X-Axis until it is around -8000.00 away from the start position.

In the rotateAndMove Script Properties, change the movementEnd to be 16000. This means that the Flying Car Entity will pass Checkpoint3 exactly in the middle.

Check the “simulate” checkbox and make sure that it is heading in the right direction, and that it still passes Checkpoint3 within jumping distance.

At the moment the car is travelling far too fast for the Player to successfully jump on board as it passes – there would be too much luck rather than skill which can be very frustrating. 

To tip the odds in the players favour, slow the speed of the car down by changing the rotateAndMove Script time Property to 20s.

Uncheck simulate when you are happy with the values of rotateAndMove.

Test this section of the game thoroughly before continuing. Try to board the car as it passes. You may need to tweak the time of the rotateAndMove Script to make sure that the jump is possible, and you might also choose to move the car closer or further away from the Checkpoint3 depending on what you deem to be a reasonable jump gap (I moved it around 50.00 further away from the Checkpoint edge).

To continue the jump puzzle, your Player needs somewhere to jump off before the Flying Car Entity respawns back at its origin. To keep this puzzle still within the realm of possibility you should add a stationary platform to jump onto. A crane will do nicely.

Open the Entity Editor for the Flying Car Entity once more. Make a note of its current position and move it in front of Checkpoint3 – refer back to the note you made of its original position to save time.

Open the Library and add the Crane Cabin Prop to your Hotbar. Also add the Crane Frame, the Crane Cable and the Crane Hook Props.

Add a Crane Cabin Entity to the game, and position it within jumping distance of the Flying Car Entity.

If you are unsure you can test the jump with Non-Drone Mode (Humanoid Mode) without having to Preview the game and run the gauntlet.

Now you know that the jump is doable, return the Flying Car Entity to its starting position. Move the Crane Cabin Entity in the opposite direction from the Flying Car Entity. Make sure you don’t go past the cars movementEnd position.

Once your Crane Cabin Entity is in the correct position, continue to build a reasonably equipped crane using the other Crane Props.

Test that you can make the jump from Checkpoint3, to Flying Car Entity, to Crane and exit the Preview.

The player will then jump from this crane to another crane. Repeat the steps to build another crane next to this one, facing the other direction.

Once you have built it, rotate it so that it points away from the greenhouse.

To be able to run all the way along this you may need to turn off collisions on the top middle section. To do this, open the Entity Editor for the top middle section.

Uncheck collisionEnabled.

This first jump is tricky enough to warrant adding Checkpoint4 to this second crane. Locate Checkpoint4 and move it to the middle of the crane so that the Player can save their progress, and respawn here if they fail the next jump.

Now to create the other Flying Car Entity

Add a Flying Car Entity the end of the crane so that you know that the jump is possible. Make sure the car is facing in the opposite direction.

Flying Car 2 needs to start from Flying Car 1’s final X-Axis position. Time for some maths! 

Take the original X-Axis position of the first Flying Car Entity (which you noted down earlier) and add the movementEnd value (16000), like so:

  • Flying Car 1 X-Axis position: -5850
  • Flying Car 1 movementEnd value: 16000
  • -5850 + 16000 = 10150 
  • Flying Car 1 final X-Axis position after movement: 10150
  • Flying Car 2 starting X-Axis position is therefore 10150

Move Flying Car 2 so that the starting X-Axis position is 10150.

Change Flying Car 2 movementEnd to -16000. This will make sure it moves in the opposite direction.

Test your timed-jump puzzle all the way through thoroughly.

Obstacle 5: Parkour Jump Puzzle

The final section of the level will take part on a separate Voxel Mesh skyscraper which you will need to build.

Open the Library and navigate to the Voxel Meshes tab.

Select “Create New Asset” and name it Skyscraper.

Press OK and add it to your Hotbar. Close the Library.

Add the Skyscraper Voxel Mesh to the world. The Voxel Mesh should be close enough that you can jump on it from the Flying Car.

Open the Entity Editor for this Voxel Mesh and move the Voxel Mesh using the X-Axis position only so that it is near Flying Car 2’s end position.

Close the Entity Editor for the Skyscraper Voxel Mesh and move the Drone so that the Skyscraper Voxel Mesh is visible in your view. 

Open the Library and add the Skyscraper Voxel to your Hotbar.

Switch to the Voxel tool and build a platform to jump to using the Skyscraper Voxel.

Now continue to build a skyscraper around this platform. Try to copy the same design as this one in order to be able to follow along on the next section.

A final part of this section will be a parkour jump puzzle around the side of the skyscraper. This section is supposed to be very hard, but still not impossible.

Use a Billboard Prop to create a walkway from the platform to the side of the skyscraper.

Use the Entity Editor to fine-tune it’s position. It must be possible for the Player to run along the top of it from the platform to the side of the skyscraper. 

Make sure to position it past the right hand corner so that the Player can run around the side of the skyscraper.

Use Metal (Steel) Voxels to create a walkway along the top of the Billboard.

Use Air Vent Curve and Air Vent Straight Props to create “vent” style steps up the side of the skyscraper. You may need to test this repeatedly to make sure its difficult by manageable.

Finally move Checkpoint5 to the top of this skyscraper.

From here your player will be able to look back on their entire journey with satisfaction. Test your level through several times to make sure it is possible (and hopefully fun) making adjustments as you see fit.

Success! You have now completed building the basic structure of this monumental obstacle course. 

Next Steps: Polish And Tidy

The next step part of building a level is tidying up the level, improving optimisations and “dressing” the level to really give players a wow moment, and start to layer on your own unique flair.