Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
September 21, 2017
arrowPress Releases






If you enjoy reading this site, you might also want to check out these UBM Tech sites:


 

Gamification in Game Education

by Paul Roberts on 03/13/17 10:17:00 am   Featured Blogs

6 comments Share on Twitter    RSS

The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.

 

What do you get when you cross gamification with a university course on game artificial intelligence? The best course ever, that's what!

 

This article will detail how I developed a brand new Game AI module using gamification techniques, the issues encountered and the overall effect of taking such a different approach to most other courses. Before that though, let’s just quickly cover what gamification is. Simply put, it’s the idea of taking proven game mechanics and applying them to non-game scenarios. We’re talking about things like achievements, in-game currency, leaderboards, elements of competition and collaboration and the like. A famous example of this is the company FourSquare that introduced a badge system and check ins, which result in rewards. In that setting it helped to increase customer engagement and retention, and the same principles apply here - student engagement, retention and achievement week after week.

 

 

Within the AI module I developed, the main gamification mechanic used was in-game currency. Complimenting this was the use of leaderboards, a competitive element and a collaborative component. The whole point of taking this approach was to encourage more students to attend classes. As daft as it may sound, it can be really difficult to get students to attend classes, especially in the later stages of a course. Also I wanted to add some competition to the class. I find that people tend to push themselves further if they have an element of competition. If I could pit student against student, then hopefully the end result is more learning, understanding and better implementations of the complex AI topics covered. A final element that I was keen to incorporate was collaboration. I’ve worked in the games industry and know that all studios rely on team members working together to develop a better product. This is something that should be encouraged more in the classroom.

 

At the beginning of the course, students are supplied with a framework as seen in the above image. Everything is implemented apart from the intelligence of the tank. The tank seen in the image is what is called a Controlled Tank, which is a tank that takes user input to move around the environment. It can fire bullets and missiles and drop mines. Over the coming weeks student’s remove the code for this input and implement their own intelligence functionality. At the end of the course all tanks are placed together within an arena where they do battle - Robot Wars style. Each week a different AI topic is delivered, which builds a solid base of knowledge required to code the intelligence into the tank. In the first half of the course I cover the foundations of this with lectures on steering behaviours, finite state machines, data structures and pathfinding algorithms.

All of this sounds good, but where does the gamification come into it you ask. Well this is introduced through the use of GameAI points - our in-game currency, and there are multiple ways to earn this currency throughout the year.

 

Earning Points


Attending a class: 5 points

Not difficult at all. Show up for the class and you earn some points. It’s a fact that the better your attendance the better the grade. So rewarding students for showing up is no bad thing.

 

Asking a valid question: 1 point

Giving a valid answer to a question: 1 point

Students can be intimidated in a room filled with their peers, which stops them from asking questions. No one likes asking what's seen as a stupid question. This approach rewards them for putting themselves out there. It only takes a couple of classes and then the fear of asking a question is gone because everyone is asking. The meaning of the term valid is my call. You need this to stop people asking questions completely irrelevant and then expecting points. Keep it AI focused.

 

Receiving a Collaboration Award: 10 points

Each student starts the year with 3 collaboration awards. These can be issued to another student who has helped them with a particular problem. It encourages students to work together as would happen in a real studio, and rewards those students that take the time to help others.

 

Demo: 20 points

At three points throughout the year there are demos. These demos not only earn GameAI points, but also make up part of the final marks. The three demos cover simple steering behaviours, followed by pathfinding and finally decision making. All the elements required to make an intelligent tank. This is also a great way to monitor the progress of the class.

 

Knowledge Tests: 20 points

Knowledge tests are simple multiple choice tests that can earn a maximum of 20 points. There are 4 different tests over the year, and they each focus on elements that have been covered in the lectures. Each test is active for a week. When a student completes a test it only tells them what they have scored, but not what the answers are. They have within the week to resit the test as many times as they like in an attempt to score higher. If they get a lower score on their second try, then that is their current score. Only the last submitted score will be used to award points. Students are encouraged to search the internet for answers. It’s not a memory test, it is a way to encourage them to look further at the topics covered.

 

Each week all the points are added up and posted on a global leaderboard for all to see. This adds a constant competitive element throughout the course. The first time I did this I used people’s names. This didn’t work very well as those not doing great were embarrassed at their leaderboard standing being so public, so in subsequent years I have used student ID numbers. It adds an element of anonymity, but each student can see where they are in the overall standings.

 

 

Spending Points


Achieving points in this way will only impact upon the attitude of the students on the course if there is some way to spend the points, which is exactly what they can do. At the end of the course students take their accumulated points and spend them on a variety of things. They can upgrade their tank to be larger, equip it with more fuel, strap on additional cannons or just arm it to the teeth with ammunition.

 

Item

Quantity

Max Allowed

Price

Tanks

Small Tank

-

1

Free

Medium Tank

-

1

75

Large Tank

-

1

150

Ammunition

Rockets

2

-

10

Mines

1

-

25

Bullets

10

-

5

Armoury

Cannon

1

2

50

Armour

+25 health

3

50

Fuel

Small Tank

30 seconds

-

25

Medium Tank

25 seconds

-

25

Large Tank

20 seconds

-

25

 

As you can see from the price list there are three different sized tanks. Each comes with different starting values, meaning they make different amounts of noise when they move, the speed with which they move is different, their armour differs and unsurprisingly the actual size is different. Weapons on the other hand have the same attributes regardless of the firing tank’s size. Bullets do little damage, but move fast. They are fired from a turret on the top of a tank, which can be turned to face any direction independently the tank's movement. Rockets do more damage, but move slowly. The cannons that fire rockets are restricted to facing forwards, so they can only be fired in the direction the tank is facing. Mines are static objects that are dropped by tanks. They do a lot of damage, and cannot be detonated by the tank that dropped it.

 

Fuel consumption created an interesting scenario last year where only two tanks remained in the battle and they both ran out of fuel on different sides of a building. Neither tank could then move, they couldn’t see each other and the battle ended in a stalemate. To cater for this, when a tank runs out of fuel it now self detonates. This may seem harsh, but more thought now has to go into fuel consumption, and those tanks that run away a lot are putting themselves at risk.

 

The following table shows the starting values that I have found to work, but as with any game tweaking is required to get it right and not have one tank overpowering the rest. The choice of tank rarely comes down to the amount of points available, it is usually a choice based on the strategy developed by the individual student themselves. For example, one year a student came up with a really clever idea, where their tank moved into a corner and surrounded itself with mines. Any other tank attempting to get at it would need to pass over the mines, which results in damage for the attacking tack and points for the tank that dropped the mines. Once a gap had been made in the minefield, the tank would retreat to another corner and repeat the process. He went with a small tank and armed it with plenty of mines and fuel.

 

Tanks

Small

Medium

Large

Rockets

20

25

30

Mines

5

10

15

Bullets

50

100

150

Health

100

150

200

Fuel [in seconds]

60 seconds

45 seconds

30 seconds

Max speed

90

75

60

Hearing radius

Large

Medium

Small

Noise radius

Small

Medium

Large

 

Pickup crates are generated in the environment every now and then, which consist of mines, fuel, bullets or rockets. So tanks can re-equip during a battle. This obviously depends on the intelligence of the tank being able to look for a pickup and then plan a path to its location.

Each tanks has a field of view, and can only see other tanks that are within this cone. This is the same for all tank sizes. They also have the ability to hear audio emanating from other tanks, which is implemented using a simple radius check. This is really useful when there is a tank pursuing from behind. Each tank creates a radius of noise when it moves. As there are 3 sizes of tanks, it enables more variation than just the standard move speed and armour values. Larger tanks make a larger radius of noise, and hearing is restricted to a smaller radius.

 

Some Points to Consider


Students are made aware of everything discussed at the very start of the course. It is fundamental to the success of the course that each and every student understands all elements. There are occasional complaints that some students don’t like the points system, but when looking at the attendance records, it is those students that have low attendance across all modules that are the ones to complain. I doubt I could make these students happy if I dropped the gamification approach and went back to the traditional teaching approach most of the other courses take, so you have to accept that you can’t please all the people all the time.

 

One tricky issue to deal with was collision detection and avoidance. As each student needed to implement their own steering behaviour for collision avoidance, there was no way for the framework to ensure tanks did not just drive through buildings. The solution to this was to include indestructible mine objects, which I hide behind the buildings. Any tank that does not cater for collision avoidance will drive through the building and get destroyed instantly.

 

 

Incorporating debug output into the base classes is a real help when students are debugging their tanks. As can be seen from the above images, there is a huge amount of information drawn to the screen. Without this it is extremely difficult to determine where issues are. This is all turned on / off by a simple switch.

 

As an AI programmer writing a tank game I would never have to worry about two of my tanks trying to saboutage each other from within the code base. For example, allowing a tank to get a hold of another tank and having the ability to set its health to zero. This is something you must consider when you have 40+ opposing tanks developed by different people. You need to be really careful how you code the environment and what access is allowed.

 

Another issue is when you bring all the student code together into a single solution. You need to ensure they have all named their classes, structs, enums etc with unique values, otherwise you get a multitude of redefinition errors. If this happens the offending tank is disqualified. Believe me this is something that must be adhered to. The first time I did this I had to spend hours changing duplicated names.

 

Conclusion


It takes a great deal of work to run a course this way. Not only the implementation of the initial framework, which is constantly being updated, but the weekly point gathering and leaderboard generation all takes time. It is worth it though. When you have high attendance with everyone engaged, it is great. Classes are lively because questions are being asked all the time, and to walk through the labs and see students working on their tanks outside of their allocated classes is amazing. The final arena battle is also great. We even get students that are not on the course coming in to watch.

 

 

Email: paul.roberts@staffs.ac.uk

Twitter: @retroroberts

Website: playingwithgiants.com


Related Jobs

2K
2K — Novato, California, United States
[09.20.17]

SENIOR SERVER ENGINEER
Sony PlayStation
Sony PlayStation — Bend, Oregon, United States
[09.20.17]

Senior Animation Programmer
Sony PlayStation
Sony PlayStation — Bend, Oregon, United States
[09.20.17]

Senior Staff Gameplay Programmer
Remedy Entertainment
Remedy Entertainment — Capital Area (Espoo), Finland
[09.20.17]

Tools Programmer





Loading Comments

loader image