Creating a Parkour Race Quest in The Sandbox Game Maker

Transcript

Toggle full transcript
00:00

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

00:10

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

00:20

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

00:30

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

00:40

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

00:50

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

01:00

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.

01:10

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.

01:20

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.

01:30

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

01:40

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

01:50

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

02:00

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.

02:10

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

02:20

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

02:30

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

02:40

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.

02:50

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

03:00

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,

03:10

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

03:20

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

03:30

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.

03:40

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.

03:50

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.

04:00

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

04:10

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.

04:20

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

04:30

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.

04:40

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

04:50

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

05:00

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

05:10

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

05:20

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,

05:30

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

05:40

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.

05:50

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.

06:00

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

06:10

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

06:20

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

06:30

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

06:40

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.

06:50

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.

07:00

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

07:10

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

07:20

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

07:30

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

07:40

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

07:50

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

08:00

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,

08:10

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

08:20

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

08:30

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

08:40

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

08:50

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

09:00

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

09:10

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.

09:20

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

09:30

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

09:40

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

09:50

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

10:00

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

10:10

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.

10:20

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,

10:30

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

10:40

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

10:50

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.

11:00

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

11:10

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.

11:20

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.

11:30

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

11:40

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

11:50

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

12:00

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.

12:10

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

12:20

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.

12:30

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

12:40

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

12:50

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

13:00

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

13:10

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

13:20

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