Improving Feedback And Player Experience
Now that you have the core gameplay, it's important to give the player visual feedback when they perform actions, such as:
- An objective marker that shows the player where to go.
- Adding more time to the countdown when the player scores.
- Only starting the game when the player enters the vehicle.
- Removing extra pizzas from the player when they pick up a new item so the player doesn't drop pizzas on the map.
By completing this step in the Time Trial: Pizza Pursuit tutorial, you’ll learn how to polish a game.
Showing the Player the Next Selected Pickup Zone
Follow these steps to add an objective marker that shows the player where to go. Update the game_coordinator_device.verse file:
- Add an editable
objective_markernamedPickupMarkerthat has thepublicspecifier to thegame_coordinator_deviceclass.@editable PickupMarker<public> : objective_marker = objective_marker{} - At the beginning of the
PickupDeliveryLoop()function, enable the Map Indicator device associated with thePickupMarkerobject and set up adeferto deactivate and disable the device when the function exits.PickupDeliveryLoop<private>()<suspends> : void = PickupZonesTags : []pickup_zone_tag = array{pickup_zone_level_1_tag{}, pickup_zone_level_2_tag{}, pickup_zone_level_3_tag{}} MaxPickupLevel := PickupZonesTags.Length - 1 FirstPickupZoneCompletedEvent := event(){} <# Defer disabling the MapIndicator so that terminating the PickupDeliveryLoop always ends up disabling the marker. Defer also executes if the PickupDeliveryLoop is canceled. #> defer: if (ValidPlayer := MaybePlayer?): PickupMarker.MapIndicator.DeactivateObjectivePulse(ValidPlayer) PickupMarker.MapIndicator.Disable() PickupMarker.MapIndicator.Enable() - When the next pickup zone is selected, move the pickup marker to the selected pickup zone and call
PickupMarker.MapIndicator.ActivateObjectivePulse()to guide the player toward it.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.