Creating a Parkour Race Quest in The Sandbox Game Maker


Toggle full transcript

Welcome to the sandbox. My name's Chris, and in this video we will be using some guidelines from our talented level design teams to set up a quest for a Parkour race using the Game Maker. And I'll be linking the full video by John Baptiste at the end of


this video for more tips and tricks. Races are a great way to bring your community together, have some fun and potentially


offer some prizes. Whether you design your race for solo competitors or for a group, there are some key steps you can follow to get your race up and running. For our race, we're going to set up a quest using an Asker Behavior to trigger the


quest and then a Speaker Component to detect when the player has reached the finish line. Finally, another Asker Behavior for the competitor to return to


and celebrate with the quest giver. So first off, I'm going to block out a really simple single track with a clear start and finish. Keep in mind, if you're designing a course for more than one person to compete


on, it'll be useful to create multiple paths for them to take as they move through the course. With the rough course finished, Let's set up the logic for our


race so we have a trigger to start and finish the race. First we'll open the rules tab and add in the different stages of the quest. We'll name the Quest the Great Race and give it a description.


We'll leave Unlock Quest to Auto unlock, which means it'll be ready to launch as soon as the experience is loaded. We'll then set launch. The Quest two requires message.


The plan here is that the competitor will need to interact with a non-player character before the quest can start. Will set this message to Race.Quest.Start.


A quick tip here is that it helps to keep your naming conventions consistent. Next up will set the quest type, which defines the objective of the quest will choose wait for the message, which means a message needs to be received to complete


the quest. We'll follow the same naming convention we use before and set this message to Race.Quest.Finish and finally we'll make Quest completion requires


message which we'll set to Race.Quest.End. This way a competitor will need to return to the quest giver to declare their victory


for action after completion. We'll use do nothing. But you can use a victory message here if you want the end of the race to end the entire experience.


With our race course and our main objectives set, we now need to add the elements in the experience that actually contained the logic to trigger the race. In this experience, the out trigger is going to be a conversation with a non-player


character referred to as an NPC. First, let's add the NPC. We use this character Jet Jet won't have any behaviors or logic directly applied, but will act as a reference point for the


competitor. To organize and contain our dialog. We'll add a few more objects to the scene which will be invisible to the competitor, but


they'll actually be what the player interacts with. For our first object, we use this clay bowl, but note that you can use whatever object you like. We don't need to see it in the scene and we don't want players running into it.


So we'll turn off both visibility and collision. Now we need to add the logic and create our first trigger. Click the object and navigate to components in the properties panel will then add the


speaker component and because we're just using it as a trigger, will leave text to display empty. We then set display condition to wait for message and choose interact,


which is the default message sent when a player presses the key. Lastly, we'll open edit logic and set the message after spoken to two race


NPC interact, which is going to be the message we use to trigger a separate Oscar behavior and start the conversation with Git to make sure clicking


is obvious to the player. We'll click add component and select the indicator component, which is useful for adding markers, distances and names to an object.


We'll delete the default display name and then set display interaction input to true so that a pop up will show the player what button to press when they approach and change the text to speak so the player knows what the action will do.


We'll also turn on the request cursor to true and link the button that says Give to the quest we've already created, which was the great race.


This way the player can clearly see this is where the quest starts. We'll also set the receiver option to the same quest so the competitor knows where to


return. Once they've completed, the race will turn displayed distance off and set visibility distance to 200. So the competitor will be able to see the quest cursor from anywhere on the map.


Finally, we can turn the display arrow off and leave, interact VFX off with a quick test. We can see a quest cursor over our NPCs head and when we approach, we get prompted to click 'E' in order to speak to the NPC when


clicked. This will send the message we just created, but at the moment nothing happens because we don't have anything triggered by that message.


So our next step is to add a few more objects with the Asker Behavior so we can create a dialog sequence. For this example, we're going to add a couple of pole objects to our scene, each one


signifying a different response in our chain of dialog. Again, these objects can be whatever you like, as long as it makes sense to you in organizing your scene. Like the clay bowl, the pole will contain our logic so we


can set it to invisible and remove collision. To add the dialog, we're going to select our pole and then in the properties panel, click on the behavior tab and then the Oscar behavior will click Edit Logic so we can


see all the options for the first response. We want the message required to be set to race dot NPCs interact so


that it's triggered by the message we've already set up with the speaker component on the clay ball on this occasion. We only want this conversation to be triggered once,


so we'll toggle only once to on. Well then change the speaker name to Git so that it looks as though our NPC is speaking and then add in the first piece of dialog to give the competitor some context for what


the quest is about. We now need to add a response for the player, so we'll add in some text to Answer 1 (A1) so the player can accept the challenge.


The last thing we need to do here is set up the message to be sent when the player chooses Answer 1 in this case will add Race.Dialog.D1.


We'll be using this message to trigger our second Asker Behavior which will be on our second pole to quickly add the next step In this dialog chain. We can select the existing pole and hit Control+D to duplicate it along with


its properties and behaviors will change the ask a behavior message required in this pole to the message that was sent by answer one in


the previous pole, which was Race.Dialog.D1. Now when the answer in the first pole A1 is chosen, the new


dialog will pop up to replace it. Our next step is to change the dialog, to progress the discussion. This time we're setting up the Quest Activation, so we'll set a challenge spoken by the


NPC and then add in a response to answer one, as well as the message to be sent when that entry is chosen. Because we want this response to trigger the quest and start the race.


We'll use the message we set up earlier when building the quest, which was rice request Don't start, which we already have in our dropdown list.


Great. Now we can see that the competitor can talk to the NPC. And on that second answer, the quest will start.


The last two dialog steps will set up is for during the rice and after the rice. The dialog for during the race is a helpful way to give clarity and direction


in case people get confused about what to do next to do. This will duplicate the pole again open edit logic and change the message required to Race.NPC.Interact because we want this Asker to trigger


with the same message we have set up on the clay bowl which is used to talk to Jet. This Asker can be used multiple times, so we'll change only once to false


and then update the dialog to encourage the competitor to keep going. We also need to make sure that we update the response for Answer 1. In this instance, we don't need Answer 1 to send a message because it's just giving


guidance. However, we do need to add the toggle component. This is going to allow us to initially have this third Asker Behavior turned off


on this object, but then switch it on once the quest has started. We need to do this because the message we just set, which is Race.NPC.Interact,


is shared by our first Asker Behavior on our first poll. So if we didn't initially have this behavior turned off, then the message sent


by the speaker on the clay bowl could potentially trigger competing behaviors and you couldn't guarantee the desired outcome. So to make sure there aren't any conflicts, we'll set turn on message to


Race.Quest.Start. So this Asker Behavior is only active once the quest has actually started.


But because we only want this dialog to be available during the race, we also need to have this dialog turned off once the player has crossed the finish line. To do this will use the message we already set up in the Quest tab, Rice.Quest.Finish


and make sure the initial behavior state is set to off. Now, when we jump back in for a test, we can speak to Jet and our first asker


triggers the second asker and the second asker starts the quest and triggers the toggle for asker three.


When we speak to Jet again, the third asker encourages us to reach the objective and we can open and close this asker multiple times.


To set up the final dialog, we'll duplicate the poll one last time and turn on edit logic will leave the message required as Rice.NPC.Interact and toggle


only once on will then update the dialog to celebrate the win and add a final answer for the competitor and change the final message sent for A1 to Race.Quest.End, which is the last


message we created in our Quest tab. Like the previous Oscar behavior, we also want to have this dialog turned off until


we need it. So we'll open the toggle component and change the toggle on message to Race.Quest.Finish. So it only works once the competitor has completed the race and will leave the toggle


off message to none as this Asker will only occur once. With all the dialog set up and ready to go. We have one final object to add to the scene which we'll need to trigger when the player


has made it to the end of the race course. To do this will head to the finish line and place another clay bowl in the scene, turning off visibility and collision.


We'll click Add component and select the speaker component. Remove the text to display and then with edit logic open, we'll set display condition to detect entity, change the detect range to suit your needs,


and make sure target type is set to Avatar. This means the component will be looking for anything that comes into range with


a specific tag. And in this case we want to trigger a message. When the player's avatar, which has the avatar tag by default, moves into range


of the object. So the bottom will set message when spoken to, which is also the message when a tag is detected in range to the message we created in the Quest tab under Quest type wait for message, which was Race.Quest.Finish.


This should toggle on our final dialog back with Jet. The last thing we need to add here is an indicator component to help the player identify


where the finish line is. We can remove the display name and we don't need the player to interact with the finish line so we can leave display interaction off.


We do, however, want this indicator to show the location of the finish line, so we'll turn Quest cursor on and add the Great Race to the objective option.


We'll change display distance to off and visibility distance to 200. And on this occasion, we'll turn off the display arrow and interact VFX. So let's test it out. As we load in, you can see the quest marker above our


NPC. When we click 'E', we're sending the interact message to the speaker component on our clay bowl, which then sends a message that


triggers our first Asker Behavior on our first pole. When we click on our first answer, a message triggers the second


Asker on our second poll. When we click that answer, the message Race.Quest.Start is sent, which starts the quest and triggers the indicator at the finish line.


That same message has also turned on the toggle component for our third Asker Behavior, which is on our third pole.


So if we speak to Jet again, the dialog has now changed, prompting us to reach the finish line. When we get to the end of the race, our speaker component identifies the avatar tag and sends the message: Race.Quest.Finish.


This updates the quest, triggering both the indicator for us to return to Jet as well as toggling on our final Asker Behavior on our fourth and


final pole so that when we return to declare our victory, the answer on the last Asker sends the final message Race.Quest.End,


which completes the challenge. And that's it. Now, you know the steps to set up your very own race using quests.


But if you do want some more in-depth tips and tricks from our level design team, you can watch the full length workshop using the link (below). So all that's left to do now is download the Game Maker, start building, and if


you do decide to create a race for your community, why not set up a time trial competition and get your athletes to post their best times, maybe even offer them some


prizes. Whatever it is you decide to build, we wish you happy racing and until next time, we'll see you in the metaverse.