Pizza Pursuit: Setting the Stage for Your First Verse Game
Pizza Pursuit: Setting the Stage for Your First Verse Game
You’ve got the map. You’ve got the vision. But right now, it’s just a bunch of props sitting in the editor like they’re waiting for a bus that never shows up. In this tutorial, we’re going to turn that static scene into a living, breathing Time Trial: Pizza Pursuit island. We won’t be writing complex logic yet; instead, we’re building the "stage" where the magic happens. Think of this as setting up the bowling alley before the pins are knocked over. If the pins aren’t there, the strike doesn’t count.
What You'll Learn
- The Scene Graph Basics: How Verse "sees" the world (Entities and Components) using Fortnite building blocks.
- Device Placement: Positioning the Spawners, Capture Areas, and End Game devices that drive gameplay.
- Tagging & Hierarchy: Organizing your props so your code can find them later (the difference between a loose brick and a load-bearing wall).
How It Works
Before you can write a single line of Verse code, you need to understand how the game engine perceives your island. In Fortnite Creative, you’re used to dragging and dropping devices. In Verse, those devices are Entities.
Think of an Entity as a specific object in the game world—like a specific Pizza Slice prop or a specific Spawner device. It’s a unique instance. If you place three Pizza Spawners, you have three separate Entities, even if they look identical.
Each Entity is made of Components. Components are the "stats" or "behaviors" attached to that Entity.
- The Prop: The visual mesh (the pizza).
- The Spawner Device: The logic that tells the prop to appear.
- The Capture Area: The invisible trigger zone that detects when a player touches it.
In Verse, we don’t just "place" things; we reference them. To make your pizza-chasing game work, you need to set up a specific cast of characters (devices) and give them names (tags) so your code can shout, "Hey, you! The one tagged 'PizzaSpawner1'—get to work!"
The Cast of Characters
For a Time Trial Pizza game, you need a specific setup. We aren’t building a battle royale; we’re building a delivery service from hell. Here is what you need to drag into your level:
- End Game Device: This is your "Game Over" screen. When the timer hits zero, this device triggers the loss state.
- ATK Spawner Device: This is the "boss" spawner. We’ll use this to spawn the player’s vehicle (like a Quadcrasher or a Boat) so they can speed off.
- Item Spawner Devices (x8): These are your pizza factories. You need eight of them scattered around the map. Each one holds a pizza item.
- Capture Area Devices (x9): One for each pizza zone, plus one for the delivery zone. These are invisible boxes. When a player walks into them, the game knows something happened.
- Map Indicator Device: This is the little arrow on the mini-map that points the player to the next objective. Without this, players will just run in circles wondering where the pizza is.
- Item Remover Device: This is the "trash can." When a player picks up a new pizza, we don’t want them carrying two. This device deletes the old pizza from their inventory.
Let's Build It
Open your UEFN (Unreal Editor for Fortnite) and start fresh. We are going to place these devices and, crucially, tag them. Tagging is like putting a nametag on a villager in Minecraft. If you don’t tag them, your Verse code won’t know which Spawner is which.
Step 1: The Foundation (End Game & Spawner)
Place your End Game Device somewhere safe, maybe hidden under a rock or behind a wall. It doesn’t need to be visible to the player, but it needs to be in the level.
- Tag Name:
EndGameDevice
Place your ATK Spawner Device near the starting point where the player will begin.
- Tag Name:
VehicleSpawner
Step 2: The Pizza Grid
This is the meat of the tutorial. We need 8 Pizza Spawners and 9 Capture Areas.
-
Place the Capture Areas: Drag 9 Capture Area devices onto the map. Spread them out. One will be the "Start/Delivery" zone. The other eight will be your pickup zones.
- Tag the Delivery Zone:
DeliveryZone - Tag the Pickup Zones:
PickupZone1,PickupZone2, ... up toPickupZone8. - Pro Tip: Make the Capture Areas big enough that players don’t have to be pixel-perfect to trigger them. Think of it like a hitbox in a shooter—make it forgiving.
- Tag the Delivery Zone:
-
Place the Item Spawners: Drag 8 Item Spawner devices. Place each one exactly on top of (or very close to) one of the
PickupZoneCapture Areas.- Configure each Item Spawner to hold a Pizza Slice (or whatever pizza prop you prefer).
- Tag each Item Spawner:
PizzaSpawner1,PizzaSpawner2, etc., matching the zones.
-
Place the Map Indicator: Drag a Map Indicator device. This will dynamically update to point to the next pizza.
- Tag it:
MapIndicator
- Tag it:
Step 3: The Cleanup Crew
Place an Item Remover device. This doesn’t need a specific location, as it will be triggered by code, but it needs to exist.
- Tag it:
ItemRemover
The Scene Graph Hierarchy
In UEFN, you can see the Scene Graph in the World Outliner. This is a tree structure.
- Root: The Level.
- Children: Your Devices.
- Grandchildren: The Props spawned by the devices.
When you write Verse, you are essentially climbing this tree. You’ll say, "Find the Entity with the tag PizzaSpawner1." The engine looks at the Root, finds the Child with that tag, and says, "Found you."
If you haven’t tagged them, the engine will look and say, "I have no idea what you’re talking about." That’s why tagging is non-negotiable.
Let's Build It: The Verse Skeleton
Now, let’s look at what the Verse code will look for. We aren’t writing the full game logic yet (that’s too much for one tutorial), but we need to write the "Hello World" of setup: verifying that our devices exist.
Create a new Verse file called game_coordinator.verse.
# We are defining a "Script" which is like the brain of our game.
# It runs when the game starts.
script PizzaPursuitGame() extends GameScript() {
# This is a "Function". Think of it as a specific action
# the game can perform, like "Heal Player" or "Spawn Pizza".
Initialize := function() {
# Here we are telling the engine: "Find the device tagged 'EndGameDevice'."
# If it doesn't exist, the game crashes. This is our safety check.
end_game_device := GetDevice("EndGameDevice")
# We do the same for our spawners.
# In the future, we'll put these in a list (an array),
# but for now, let's just grab one to prove it works.
pizza_spawner_1 := GetDevice("PizzaSpawner1")
# This is a "Print" statement. It sends text to the debug console.
# It’s like shouting into a walkie-talkie to make sure everyone hears you.
Print("Pizza Pursuit is ready! The pizza is waiting.")
}
# This event triggers when the game starts.
OnBegin<override>()<suspends> := function() {
Initialize()
}
}
Walkthrough
script ... extends GameScript(): This tells Verse, "I am writing a script that controls the game rules." It’s like assigning a player to the "Team Manager" role.GetDevice("Tag"): This is the most important line. It searches the Scene Graph for an Entity with that exact tag. If your tag isPizzaSpawner1in the editor, it must be"PizzaSpawner1"in the code. Case-sensitive. Don’t mess it up.Print(...): This is your best friend. If you get an error, check the debug console. If you see your message, your code is running. If you don’t, your script isn’t loading.
Try It Yourself
You’ve placed the devices. You’ve written the basic script. Now, let’s test the "Delivery" mechanic.
Challenge:
Modify your game_coordinator.verse file. Instead of just printing a message, try to make the Map Indicator point to PizzaSpawner1 when the game starts.
Hint: You’ll need to find the MapIndicator device using GetDevice, and then use a function to set its target. Look up how to "Set Target" on a Map Indicator in the UEFN documentation. You don’t need to write complex logic—just hardcode it to point to the first pizza.
Stuck?
Remember, the Map Indicator needs a reference to the Capture Area or Spawner it should point to. Use GetDevice("PizzaSpawner1") to get the reference, then pass it to the Map Indicator’s "Set Target" function.
Recap
Setting up your level is like setting up a trap. If the tripwire isn’t connected to the explosive, nothing happens. By placing your Devices, tagging them correctly, and understanding that Verse looks for them via the Scene Graph, you’ve built the foundation for a playable game. You’ve got your End Game, your Spawners, and your Capture Areas. Now, you’re ready to write the code that makes them dance.
References
- https://dev.epicgames.com/documentation/en-us/uefn/pizza-pursuit-1-setting-up-the-level-in-verse
- https://dev.epicgames.com/documentation/en-us/fortnite/pizza-pursuit-1-setting-up-the-level-for-time-trial-in-verse
- https://dev.epicgames.com/documentation/en-us/uefn/time-trial-pizza-pursuit-in-verse
- https://dev.epicgames.com/documentation/en-us/fortnite/time-trial-pizza-pursuit-in-verse
- https://dev.epicgames.com/documentation/en-us/fortnite/pizza-pursuit-5-improving-feedback-and-player-experience-for-time-trial-in-verse
Verse source files
- 01-fragment.verse · fragment
Turn this into a guided course
Add pizza-pursuit-1-setting-up-the-level-in-verse to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.
References
Original tutorial generated by Verse Island from the Verse/UEFN knowledge base, with references to the Epic Games sources above. Code is validated against the knowledge base.