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
loop
expression to repeat the selection of pickup and delivery zones, and loop the core gameplay. - race: The
race
expression runs the pickup / delivery loop and stops the loop when the time runs out. Arace
expression executes multiple expressions at the same time and cancels any expression that doesn’t finish first. - spawn: A
spawn
expression starts an asynchronous expression in any context. - option: The
option
type can contain one value or can be empty. - defer: The
defer
expression delays the execution of code until the current scope exits. - block: This example uses the
block
expression to execute code sequentially in an asynchronous context, therace
expression. - if: The
if
expression 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: