Time Trial: Pizza Pursuit is a single-player game, where the goal is to pick up pizzas and deliver them to the designated delivery zone before the time runs out. Each successful delivery adds time to the countdown.
After each pizza pickup, a difficulty meter, called the pickup level in this example, increases. Pickup zones are tagged with their pickup level, and each new pickup zone is selected from the available pickup zones for the current pickup level.
Higher-level pickups should be harder to reach, but give more points to the player.
After a delivery, the pickup level resets.
This tutorial is a step-by-step guide on how to create this game using Verse.
Verse Language Features Used
loop: This example uses the
loopexpression to repeat the selection of pickup and delivery zones, and loop the core gameplay.race: The
raceexpression runs the pickup / delivery loop and stops the loop when the time runs out. Araceexpression executes multiple expressions at the same time and cancels any expression that doesn’t finish first.spawn: A
spawnexpression starts an asynchronous expression in any context.option: The
optiontype can contain one value or can be empty.defer: The
deferexpression delays the execution of code until the current scope exits.block: This example uses the
blockexpression to execute code sequentially in an asynchronous context, theraceexpression.if: The
ifexpression tests conditions and accesses values that might fail.class: This example creates a Verse class for managing and displaying the player’s score.
constructor: A constructor is a special function that creates an instance of the class that it’s associated with.
Access specifiers: You can use access specifiers to set the access level of your code.
Verse APIs Used
Gameplay Tags: With gameplay tags, you can find actors marked with a specific tag while the game is running.
Events: You can create your own events in Verse and add custom functionality when they occur.
Verse UI: Create custom in-game UI to display information about the player and game.
Overview
Here's an overview of the steps you'll take to recreate this island in their ideal sequence.
This project builds on top of the following tutorials, so complete these before continuing:
Create an objective marker by following the steps in Moving Objective Marker.
Create a countdown timer by following the steps in Custom Countdown Timer.
After building the objective marker and countdown timer, complete these steps to make the full game:
1. Setting up the Pizza Pursuit Level
Create a game with Verse where players must pick up and deliver pizzas before the time runs out!
2. Defining the Pickup and Delivery Zones
Create a game with Verse where players must pick up and deliver pizzas before the time runs out!
3. Creating the Game Loop
Create a game with Verse where players must pick up and deliver pizzas before the time runs out!
4. Managing and Displaying the Score
Create a game with Verse where players must pick up and deliver pizzas before the time runs out!
5. Improving Feedback and Player Experience
Create a game with Verse where players must pick up and deliver pizzas before the time runs out!
6. Pizza Pursuit Final Result
Create a game with Verse where players must pick up and deliver pizzas before the time runs out!