Board game analysis: KILL DOCTOR LUCKY™

Introduction

KILL DOCTOR LUCKY™ is a family board game for three to seven players. The goal is to murder a non-player character (NPC) by the name of Doctor Lucky. However you can only murder someone once so the player that gets to Doctor Lucky first is the winner. You cannot just walk up to the doctor and stab him though. There are severe restrictions in place that prevent you from even attempting a murder, and even then the other players have a chance to foil it.

doctorluckycomponentsNEW

The game

The components of KILL DOCTOR LUCKY™ can be divided into the following categories:

-Individual rooms, that together makes up the game board

-Player avatars, represented by game pieces

-NPCs, also represented by game pieces

-Game cards

-Spite tokens

Game board / rooms:

The game takes place in the Lucky Mansion, which is represented on the game board (see picture below).

Kill-Doctor-Lucky-Game-2

The board is made up of a set of rooms, corridors and stairs. Note that places like the winter garden are also counted as rooms as are the corridors and stairs.

The rooms are divided into two categories, named rooms and unnamed rooms. The named rooms are, as the name implies, named on the game board. The named rooms are, in turn, divided into rooms with a number and rooms without a number.

Each room also has a number of doorways. These doorways enable players and NPCs to travel from one room to another. They also provide line of sight through any number of rooms as long as a straight line can be drawn through them from the player avatar. The Gallery wall also provides line of sight but player avatars and NPCs cannot travel through it. 

Player avatars:

The game is played with a number of avatars corresponding to the number of players. Each player has ownership of one player avatar. Each avatar has its own image depicting one of the people out to kill Doctor Lucky. All seven different avatars are depicted below (as well as the doctor’s dog, an optional NPC).

drluckyhouseguests

The player avatars are all placed in the same room at the start of the game, the Drawing Room. Obviously this means that each room can contain any number of players (and NPCs as well for that matter).

The player avatars have one free move to make every turn. This can be used in the movement phase to move the avatar one step in any direction to the next room, provided the two rooms are connected by a doorway. This free move can be used before, after and in between any move cards and/or room cards played during the movement phase. Cards will be explained in detail later.

If a player avatar is alone in the same room as Doctor Lucky and no other player or NPC can see them, the player may make an attempt to murder Doctor Lucky.

In some variants of the game there is also a dog NPC present. Depending on the rule set used, a player whose avatar is the same room as the dog can either kill it as well. To attempt murder on the dog the two of them must be unseen by other players, but other NPCs can be ignored. The murder attempt is played out in the same manner as it is against the doctor.

NPCs:

In the standard variant of KILL DOCTOR LUCKY™ there is only one NPC to speak of, the doctor himself. In some variants however there is an additional NPC in play, the doctor’s trusty dog.

20140430_190845

Just as the player avatars, the NPCs are represented by their respective game pieces. These pieces also have images to identify which one is the doctor and which one is the dog. The dog’s avatar also has a somewhat smaller game piece.

The NPCs move between rooms at every player’s turn and can both be present in the same room. There is no limit on how many player avatars can be present in the same room as the doctor and/or his dog at the same time. The doctor and his dog don’t move the same way the player avatars do, nor do they move the same as each other.

The Doctor

The Doctor starts in a room randomly determined at the start of the game. After this he makes a move when any player has finished their turn. The doctor always starts in a named room with a number.

When he moves he goes to the room that’s next in numerical order. For example, if he stands in the room numbered nine he moves to the room numbered ten, skipping any unnumbered rooms between the two. Once the doctor has reached the room with the highest number, he moves back to the room with the lowest number. Rinse and repeat.

If the doctor is placed in an unnamed room or a named room without a number due to the influence of played cards he moves to the closest room with the highest number once it is his turn to move again.

If the doctor is in the same room as the dog and the dog has any number of tokens collected, the doctor removes all of the dog’s collected tokens. This happens before any player action.

The Dog

The doctor’s trusty dog has line of sight just as any player avatar and can prevent murder attempts if he is within sight if the Old Dog or Old Dog, New Tricks subset of rules are used, but not if the New Tricks subset is. If none of these are used the dog is not present in the game at all.

The dog starts in the same room as the doctor. The dog makes its move each time the doctor has moved on his own accord, i.e. if the doctor is moved because of a played card the dog remains in position until after the doctor has made his own move.

The dog will move towards the doctor taking the shortest route to him, however unlike the doctor the dog does not ignore unnumbered or unnamed rooms and must move through them. The dog moves one step (one room) at a time.

Game cards:

The game features four types of cards that the players can collect and play as input to the game and its systems. Cards are either present in a player’s hand, in a stack that players draw new cards from or in a discard pile where used cards are collected. Whenever the stack is depleted, cards placed in the discard pile gets reshuffled and made into a new stack.

The different types of cards are: Room cards, Murder cards, Move cards and Failure cards (shown below in that order from left to right).

20140430_191032

Move cards

These can be played during the movement phase of a player’s turn. There is no limit on how many move cards can be used in the same turn. They can be used both after and before the free move or any room cards played during that turn.

Each move card played allows the player to move their player avatar or the doctor up to a certain number of steps. The number is indicated on the card.

Room cards

Just like the move cards, these can be played in combination with move cards and the free move during the movement phase of a players turn. There is also no limit on how many of these may be played in the same turn.

These cards can be used by a player to immediately move their avatar or the doctor to the room displayed on the card.

Murder cards

These cards can be used by a player who is making a murder attempt. Only one murder card may be played during the each murder attempt.

The murder cards affect the murder attempt by replacing the standard value on an attempted murder, which is one, with the number indicated on the card. Some of the murder cards have a second attribute however. They become even more powerful if the player using them is located in a certain room.

For example, a player using the “Crepe Pan” will have a murder value of three instead of one when making the attempt on the doctors life, however if the player avatar happens to be in the room named “kitchen” then the murder value is further increased to four.

Another example is the “Monkey’s Hand” which has a murder value of two normally, but eight if used in the Foyer.

Failure cards

Whenever a murder attempt comes into play all other players (the players not trying to kill the doctor at this very moment) can use the failure cards in order to foil the murder attempt. Each player can in turn play any number of failure cards. Each failure card has a value that, when played, is stacked against the murder value. If all the failure cards played have a total value equal to or exceeding the murder value, the murder attempt is foiled.

Unlike the other cards, used failure cards are not placed in the discard pile but are instead removed from the game.

Spite tokens:

These are tokens that a player can collect one of each time one of his/her murder attempt has been foiled. They can also be used by a player as input to the game and its systems.

Each player holds onto their spite token until they decide to use them in a murder attempt. If they choose to do so each spite token used in the murder attempt increases the murder value by one.

For example if the player attempting the murder uses the “Crepe Pan” for a murder value of three as well as two spite tokens, the total murder value becomes five.

spitetokens2

If New Tricks or Old Dog, New Tricks are used the dog NPC may also collect spite tokens under certain conditions and these token may in turn be collected by a player.

Relationships

The different rooms have one relation to each other. If they are adjacent and there is a doorway connecting the two, it enables line of sight as well as movement between the two.

The rooms’ relation to the player avatars is that any player avatar that ends their turn in a named room may draw a card if no card was played or murder attempted that turn.

The numbered rooms’ relation to the Doctor Lucky NPC is that they determine the pattern of its movement behavior.

The named rooms have a relation to the room cards as it is the rooms’ name that determines the destination of the game piece affected by the room card.

The named rooms also have a relation to Murder cards. Some murder cards will be stronger when used in certain rooms, meaning a room’s name, if it has one, may affect the attributes of the cards effect.

The player avatars’ relation to each other is that they prevent murder attempts any time they are within line of sight of each other.

The player avatars’ relation to the Doctor Lucky NPC is that if one avatar is in the same room as the doctor, a murder attempt may possible.

The player avatars’ relation to the Dog NPC is the same as the doctors when using the Old Dog and Old Dog, New Tricks subset of rules. In addition, if New Tricks or Old Dog, New Tricks is in use, any failed murder attempt made by the player avatars makes the dog collect one spite token.

The Doctor Lucky NPC’s relation to the player avatars is that if the NPC finishes its own move in the same room as a player avatar, it immediately becomes that avatar’s player’s turn to play.

The Dog NPC’s relation to the player avatars’ is that if the New Tricks or Old Dog, New Tricks subset of rules is used, any avatar in the same room as the Dog NPC once it has finished its move, enable their player to trade cards for any spite tokens the dog might have. The dog can also prevent murder attempts if the Old Dog or Old Dog, New Tricks subset of rules is in use.

The move cards’ relation to the player avatars is that, when played, they enable extra movement for player avatar owned by the player that used said card.

The move cards’ relation to the Doctor Lucky NPC is that when played they enable the player to move the Doctor Lucky NPC a certain number of steps as they please.

The room cards’ relation to the player avatars is that, when played, they affect the location of the player avatar owned by the player that used said card.

The room cards’ relation to the Doctor Lucky NPC is that when played they enable the player to change the Doctor Lucky NPC’s location.

The Core System

In KILL DOCTOR LUCKY™ the core system can be summed up by movement and murder attempts. The goal is to kill the (or one of the) NPC and this is achieved by making a murder attempt, without that the game won’t end.

But in order to even be able to make the attempt a player avatar must be in the same room as the NPC. This is achieved by movement. The NPC and player avatar attempting the murder must also be out of sight of everyone else. This is also achieved by moving.

Moving then also becomes a way for player to prevent each other from even attempting the murder by making sure they have line of sight into any room where a murder attempt may occur. This makes the gameplay more dynamic and challenging.

Most interesting Game System: Line of sight (LOS)

The most interesting system in KILL DOCTOR LUCKY™ is the line of sight system. A summary of how line of sight is determined can be seen in the picture below.

DSC_0064 - edit

What’s interesting with this system is that it gives players a reason to maneuver throughout the mansion as opposed to just racing for the doctor.

The layout of the mansion is also designed so that it is very hard to establish a line of sight into some of the rooms. These rooms are also a bit harder to get to meaning there is a tradeoff between waiting a few more turns to make the murder attempt and make sure that the other players won’t be able to prevent it.

Best

The best side of KILL DOCTOR LUCKY™ is the role of Murder cards, Failure cards and Spite tokens in the attempted murder system.

The fact that the murder attempt can fail means that the game won’t be over once someone manages to reach the doctor and be out of line of sight. However, the fact that Failure cards are removed from the game instead of placed in the discard pile, means that the game won’t go on forever.

That you can boost your murder attempt with Murder cards and Spite tokens means that you won’t necessarily have to wait until all failure cards are gone to win.

It also allows players to approach the killing of Doctor Lucky differently. One might make numerous attempts on the doctor’s life in order to build up spite tokens while someone else might be utilizing room cards and move cards in order to get themselves and the doctor of sight and into a room where a murder card is extra powerful. Maybe a player will try a combination of these.

Worst

The worst part of the game is the fact that the doctor gives extra turns to whomever happens to be in the room that he moves to. On several places on the board it is possible to move on to the next room and get an extra turn once again because that is the next room in the doctors path as well. Repeating this enabled some players to collect more cards then the rest.

In some occasions this could also mean that a certain player was skipped several times, not being able to act at all.

Target group

The target group is said to be 10+ according to the game rules and the manual. This is probably a proper age rating as younger players might have a hard time following the LOS system. The game also contains several fairly small pieces, like the tokens, that a younger child might swallow and choke on.

The art style of the is also somewhat comical and light hearted, despite the game being about murder, so I think the 10+ rating fits the game pretty well.

Summary

The murder attempt system and the LOS system work together with the game components and their relationships to create a game that is fairly easy to get into.

The restrictions placed on the murder attempt as well as the players’ ability to potentially foil any attempted murder means this game won’t be over all too fast.

However the buildup of Spite tokens as well as the eventual depletion of failure cards means that the game won’t go on forever either.

This makes the game achieve a balance between depth and time consumption.

 

 

 

Game Development and Coding 13 Feb 2014 – Collider class

The Collider Class.

Last week I worked on the collider class. Mostly I worked on the class’ overlap methods. Each object in the game that’s capable of colliding with something has its own collider as a member.

It is the Collider that determines the actual position of the object it is a member of.

The Collider has a position in the form of a pair of coordinates on the x-axis and the y-axis. The Collider also has a pair of values that determines how far from the position coordinates it extends along both axes.

Example, if the Collider is a box and has the coordinates (x: 100, y: 100), then that position is the upper left corner of the box.

If it extends 50 units on both axis, in other words have the extension (x: 50, y: 50), then:

The upper right corner of the box is (x: 150, y: 100).

The lower right corner of the box is (x: 150, y: 150).

The lower left corner of the box is (x: 100, y: 150).

Box with coordinates

The extension is increased on both axes because in SFML the coordinate system is:

Right = +X, Left = -X, Up = -Y, Down = +Y.

SFML coordinate system

However if the Collider is a circle things look a bit different. Then you first need to determine the center of the Collider circle. This is done by adding half of the values of the extensions to the position.

You will then get the central point of a Collider that has the form of a circle. The circle will be just big enough to fit into a box that is defined from the Colliders’ position and extension.

Circle in Box

Then you will need to determine a radius for the circle to determine how big it is. This can either be done by just assigning a value to a member variable for the Collider. Alternatively, it can be defined by taking the extension on one axis and divide it by 2.

Circle in Box radius and extension

Which type of Collider shape you choose should depend on the object it is bound to. For example, in out game the view if top down, so people should have circle Colliders. People may not be shaped as circles when viewed from above, but a circle is certainly closer than a box.

The Collider class does not only have a position and a shape though, it also has methods for checking if it overlaps with other Colliders.

I choose to divide this into three different methods to make it easier to work with.

One for Box vs Box overlap.

One of Circle vs Circle overlap.

One for Circle vs Box overlap.

I also added a member value to the Collider class call “ColliderCircle”, which is a Boolean, meaning it can only have the values “true” or “false”.

This value is set depending on what object the Collider is a member of.  For example, if the Collider belongs to the player then I want it to have the shape of a circle, so the “ColliderCircle” is set to “true”. If I want the Collider to be a box, I set the “ColliderCircle” to false;

When the game then checks for collisions it will call on the Colliders “ColliderCircle”.

If two Colliders give “false” when calling the “ColliderCircle” then the Box vs Box overlap method is used to check if the two objects overlap.

If they both return “true” however, the Circle vs Circle overlap method is used and if they return different values (one true and one false) then then Circle vs Box overlap method is used.

I started with the Box vs Box overlap and the Circle vs Circle overlap because I had done methods for that before while I only had a conceptual idea on how to make the box vs circle collision. The box vs circle overlap was therefore postponed.

The following image is the code for the circle vs circle overlap:

Code example

The overlap methods I made did not just check for overlap however, but also returned an offset. The offset is a set of values (x and y) that show how much and in which direction a collided objects position needs to be adjusted on collision.

I will illustrate the reason why this is needed with an example:

Offset example

Say two box-shaped Colliders are positioned so that one of them is only two pixels to the right of the other.

The first box is then moved to the left by 5 pixels in the next game loop while the second box stays still.

The first box is now overlapping 3 pixels into the second box; therefore its position needs to be adjusted by three pixels (5-2) to the right, because the objects are not supposed to go into each other. The offset in this situation is (3, 0).

In order to get the right offset on overlap I needed the program to first check if the overlap was largest on the x-axis or the y-axis.

If the overlap is larger on the x-axis the correction of position will happen on the y-axis and vice versa.

Once that is established I will need to check if the offset is going to be positive or negative.

Offset positive x

In this situation the red square has a higher value on its x-position and therefore its offset will have a positive x-value.

Offset negative x

In this situation the opposite holds true.

Offset Negative Y

In this situation the offset for the red square will have a negative y-value because it needs to be moved up to correct its position.

The point of doing all this to return an offset value is that once it is done you only need to add the offset value to the position to get a proper correction.

I did, however, run into some problems with this method. As it turns out though, the problem was that instead of comparing position to position when the offset was determined I accidentally made the overlap method compare the objects position with the other objects extension, which meant that the offset always had the same value. This meant that no matter which side an object collided from it was offset downwards.

Like this:

offset error

Once I had finally sorted this out the circle vs circle overlap method worked properly but not the box vs box. I then decided to scrap box vs box and box vs circle overlap because we really only needed those for one object in the game and that object was non-essential, so all our Colliders will be circles.

The offset on the circle vs circle overlap works fine except for edge cases (when edge collide with edge, see below) where the objects vibrate somewhat against one another.

This is probably due to the computers calculation of float values (values with a decimal) being somewhat uncertain so the offset might be calculated inaccurately by a pixel or so every loop.