Apex Legends Online Quiz

I started playing the Apex Legends online game a few months ago and really liked it. Then, around the same time, a friend of mine showed me the Pottermore Quiz, which asks you questions and tells you which Hogwarts House you would fit into best. I thought that game was a bit of fun and wondered if there was something like it for Apex Legends. I had a look on the Internet and there weren’t really any quizzes or games so I decided to try making my own one.

Using Scratch

I had a look around at some ways to create games and then remembered the Guitar Trainer game that I created at CoderDojo a few years earlier, which was written in Scratch (a popular tool that is used to introduce kids to coding). I liked working with Scratch before because it was very easy to use and understand so I decided to use it again for my Apex Legends game.

Game Setup

The basic idea of my game was to ask people 10 questions about their experiences, skills and achievements while playing the Apex Legends game and, based on their answers, give them a performance rating (in a similar way to  how the Pottermore game assigned you to a house).

I asked my Dad for some tips on how to set up the game and he suggested that I store all of the questions in a List and set all of the basic game controls in Variables so I could easily change the game behaviour later on, just by changing these variables.

This worked out really well later on as I had to do quite a bit of testing and debugging, while getting some of the other features to work, and I think it’s a good idea to do this all the time.

Scoring Mechanism

At first, I set up the game so people could type in their answers to each question. However, when I tried to figure out how to calculate their score, it was too hard to do based on the number of different ways people could answer the questions.

I chatted with my Dad again and he suggested that I look more closely at other games and see if I could spot a pattern in how the scoring worked. I eventually noticed that most other games were using a multiple choice method for answering the questions and were probably assigning a score to each question choice, which could probably be used to base the final rating on.

I therefore decided to rephrase all my questions so that the answers would be a Yes or No, and I gave the person a score of 10 if they picked Yes and a score of 0 if they picked No. As they answered each question, I kept track of the score they were getting and I then wrote a part of the program that would give them a rating based on their final score.

Random Questions

When I was testing the game, I adjusted one of the variables I mentioned earlier (which controls how many questions are asked) so it only asked 3 questions (instead of 10). This made testing a little easier. However, I noticed that it was always asking me the same questions in the same order and I wondered whether people might try to share their answers and cheat.

A little more reading on the Scratch Wiki showed me that there’s a Random feature so I decided to use that to get the game to ask the questions in a random order. This was fairly hard to figure out but I got there in the end and was glad I got it working because it’s kind of cool now.

Adding Music

I had seen a few other Scratch games that had background music in them so I decided to try adding this too. This is done using the Sound feature in Scratch. All you need to get it working is an MP3 file so I went to one of the Apex Legends videos on YouTube and used an online video converter to get the music from the video into MP3 format, and then used that in Scratch.

Restart Feature

While trying to test the game, using various different answers to make sure it gave me the correct legend rating (for the score I’d gotten), I found it a little annoying to have to stop and reload the Scratch game every time. I decided to try adding a way to restart the game at the end to see how that might work out. It was actually really hard to do because I had to reset a bunch of variables (including the final score and the list of questions) but, looking back, it was definitely easier to do in the end because I was storing all of the game setup in variables.

The Finished Product

All in all, it took me a couple of weeks to write the game that’s now available to play here on the Scratch website. Here is what it looks like and I hope you enjoy playing as much as I enjoyed creating it.

I think Scratch is really good for these kinds of games and much more powerful than I thought. It’s very easy to use for most levels of coding and really easy to debug when something goes wrong. I’d definitely recommend that you give it a try and there are lots and lots of sample games online that you can use for inspiration and help. I especially like the fact that you can choose a game you like and then look inside it to see how it works. I learned a lot by doing that, and think you will too!