Game Construction: Assassin’s Creed

Happy Saturday dear reader,

Today I will be going over the wall climbing technique used in the first Assassin’s Creed.

Overview

Assassin’s Creed is an open world stealth adventure game that takes place during the Third Crusade (1189-1192) with the main player character being Altaïr Ibn-La’Ahad or Atlair.  I wont go into to much detail about what the game is and other gritty details because it is a fairy popular game (over 5 million units sold) and part of a popular franchise.

One of the core gameplay elements of the Assassin’s Creed franchise, is the ability to parkour across any in-game surface and climb any building.

Goal

My goal is to figure out how they created the wall climbing system for Altair, both his locomotion and animation.

Breakdown

Starting of with the gamplay trailer breakdown:

  • From 0:15-0:20 – Here we can see that Altair is in fact floating above the ground showing us that they are not using Inverse Kinematics to bind the feet to the floor.  This is also known as foot skating.
  • 0:34-0:37 and 0:43-0:51 – Altair does not seem to be walking up the stairs like a normal person would rather it seems like he is diagonally interpolating  to give the illusion that he is actually climbing the staircase. Altair is not walking up every step, he seems to be playing an animation and another force is slowly increasing Altair’s elevation making it seem that he is walking up a staircase.
  • 0:53-3:00 – Wall climbing

Locomotion

First let’s begin with user input.  Assuming the player is playing on the Xbox 360, he will be holding the ‘RT’ and ‘A’ button in order to run up a wall and begin to climb it.  After this point they use the analog stick to pick a direction to climb in.

Now the only way to climb a wall is to look for different ledges to point to and then Altair will climb to that direction.  Most the most part he is limited to horizontal (X axis) and vertical (Y axis) movement.  For the most part there is no diagonal movement (X and Y axis) unless there are special landmark buildings where they have certain designs that can be climbed differently.  For the most part there is just X and Y movement on a building.

For the normal movement locomotion, they are not doing anything special other then basic physics across the world.  Altair’s movements are segregated into 2 categories

  • Low Profile – Basic walking movement, the ability to blend and steal
  • High Profile – The player must hold down the Right Trigger and the low profile buttons change.  Atlair can now run, jump and start a wall climb as well as assassinate others and pull out his weapon.  Altair can also tackle and shove people while he is running.
This makes the locomotion for the wall climbing a lot easier.  In the normal default stage (low profile) Altair is grounded on the floor and cannot scale buildings.  However as soon as he begins his wall traversal (0:50 – 1:00) Altair is in another “mode”.  In this mode all his other actions are unavailable.  All Altair can do is traverse the building, drop and let go of the building or jump away.  Essentially Altair is bound to that face of the building.  He switches one axis of freedom.  While on the ground Altair can move on the X and Z direction, as soon as the wall climb starts, he looses either the X or Z axis and gains a Y axis to move upwards in.

In this first image, we can see Altair hanging down on a ledge.  To prove that they used a similar system for almost all the buildings you can see his right arm is going inside the mesh.  This means that the ledges are essentially small bump mapped graphics separate from the locomotion system.  If the locomotion system was parented to the mesh of the building that Altair was climbing, then he would not be going through that ledge in the picture.

The hardest part to figuring out how Ubisoft managed to code the wall climbing system is the “ledges” system.  Did they use nodes that were hand placed on the buildings that indicated the ledge type? Did they physically make ledges in the mesh and had Altiar read in the the triangles to determine if it was a ledge? Was each ledge manually stuck on and treated as another object?

It took me a while to decide on one, but with a little helpful discussion with Kevin a.k.a. @Iceninja77 we were able to agree it was a mixture of nodes and separate objects. We believe that the basic buildings are plain rectangular texture mapped objects and the landmarks are just several polygons in one mesh. The level designer might have manually placed nodes on the building using their game engine to indicate where he wanted ledges.  Those nodes would have different type depending on what type of ledge they wanted and what animation Altair would play to reach it.

Figure 2: Ledge Types

Here we can see some of the basic types of ledges there are.  There are the Purple ledges that are just pieces of geometry that pop outwards and are not connected to other ledges.  The purple edges are only used as stepping stones.  Then we have the Blue type of ledges that wrap around the whole building that Altair can shimmy toward the left or right on.

Figure 3: Ledge Highlights

Each colour seen in Figure 3 is a ledge that Altair can climb on.  The window pane (Blue, Green, Pink, Red) would be a special node that has sub-nodes (Sub-Ledges) in it so that it can be traversed. The normal ledge (Purple) would be another example of a ledge Altair can shimmy around.

So far we have learned:

  • The only inputs are a direction given as a degree from the X-inputfrom the Xbox 360 controller. For example:
    • Left = -X axis
    • Right = +X axis
    • Up = +Y axis
    • Down = -Y axis
  • Once Altair enters a wall climb he is only limited to three options and the other walking actions are locked from use
    1. Move in a direction – Analog Stick
    2. Drop – ‘B’ button
    3. Jump in a direction (upwards or away from the building) – ‘A’ button
  • There are several basic ledge types:
    • Stepping stones – Used for Altair to from to other ledges
    • Shimmy Ledges – Altair can move left or right on these ledges until he finds a stepping stone to climb up, or another Shimmy Ledge.  Shimmy ledges can also wrap around the whole building
    • Sub-Ledge Objects – Special objects like window panes and steel grates that are a mix of Shimmy Ledges and Stepping stones.

Animation

We have a choice to pick between a key-frame animation system or a skeletal animation system.  Assuming that Ubisoft has lots of motion capture data for Altair climbing from and to different ledges, a Skeletal animation system would be the better pick.  Using a keyframe animation system would involve a lot more coding and a much larger animation blend tree.

Lets say that the wall climb is done in a doubly linked list, tree data structure.  The root would be the the top of the tower and the children would be the start of the building.  The way to traverse the tree is to give a direction from the analog stick.  For example, if you initiate a wall climb by walking up to the building and grabbing the closest ledge you would start of at one of the youngest children in that tree.  If you initiate a wall climb by running up the wall you would pass one child node and go to its parent.

Figure 4: Ledge Climbing Tree
  • White is the Root node for the top of the building.  This can be either a point or another flat surface like a roof where Altair is no longer locked in wall climbing mode and is free to roam in the X and Z axis
  • Red/Pink are the Stepping stone ledge types
  • Blue are the Shimmy ledge types
The colours of the line are the types of movements Altair can make.  Altair can go from Stepping stone to Stepping stone provided they are on the same level.  If Altair would want to move up a level he would have to use either a single Stepping Stone or a Shimmy ledge to move upwards.

Now the basic idea here is that you would start at the bottom and work your way up.  This is NOT a BST (Binary Standard Tree) so some rules of tree’s do not apply to us.  So if you start at the bottom on a Stepping Stone ledge type you can traverse the tree by going upward and increasing your level to a Shimmy ledge type and Altair would play the animation from Stepping Stone to Shimmy.  If Altair does not move then he would play the animation for idle on Stepping.

So the best idea is to store the animation to be played in the nodes themselves.  A boolean would be changed and then that animation would play while also moving Altair to that new position.

The reason I would use a tree like this for the wall climbing is that it makes it easier for combining user input and traversing the tree.  If the user inputs a negative X value and if Altair was on a Shimmy ledge he would move left until he reaches the end of that ledge or forever if the ledge wraps around the building.  If the Shimmy edge has a Stepping Stone to the left of it and the user is still inputting a negative X value then Altair would climb to the stepping stone.  If the user wants to climb upwards, the just input a positive Y on the analog stick and Altair will keep climbing upwards until he reaches a dead end and has to move left to right to find another ledge to climb upwards with.

Closing Statements

This was a fairly quick overview of how the climbing system would be done.  I didn’t go into detail about the linked list aspect of it because that would be more complicated.  We would have to factor in several items to choose which animation to be played.  Since sometimes Altair is grabbing the ledge and hanging freely, and other times where Altair is grabbing a Stepping Stone and two level’s under him there is a Shimmy ledge and his feet are held up on that ledge.

I think that having a logic tree for each building would be easier to program rather then giving the player unlimited freedom thinking that each ledge is special and there are unlimited ways of climbing each building.  In reality they are just picking a random point in the matrix and depending on their inputs they are just following a predetermined path.

Thank you for reading 😀

You have just been Moose’d

– Moose

Template Description

Welcome to the template description:

This will be the template description for my Game Autopsy Series in the Game Design category.  The goal of this series is to analyse games and learn what they did right and what they did wrong.  Also to look at their mistakes and think of ways to fix them.

  • Overview – A bit about the company and the game
  • The Hook – What compelled me to buy, try out this game as well as how I found out about it
  • Game Mechanics – This section will vary for different game types but it will essentially be a high level overview of what the game is made of.  You can think of it as a bit of a wikia summary
  • Summary – In case you are not interested in reading the long Game Mechanics section, you can skip to the summary where I summarize the main point of the game
  • Likes and Praises – An analysis of what I liked about the game and what it does well
  • Dislikes and Criticism – The mean part where I talk about what I disliked and what I would change
  • Closing Remarks – Some last items to state to summarize what I learned from this game’s design

Hope you like my structure, it’s a  bit like a Game Review but it works.

This will be the template description for the Game Construction Series in the Computer Graphics category.  The goal of this series is to look at video games in the industry and somewhat reverse engineer them.  Rather then  doing the whole game, I will pick a gameplay video, or a part of the gameplay that intrigues me and try to see how I would go about coding and executing it.

  • Overview – Some information on the game and company that I will be constructing
  • Goal – This is where I play a video or discuss the gameplay element that I will try to reverse engineer
  • Breakdown – I take the goal and break it down into bits and pieces
  • Closing Remarks – I address how I would implement this system in one of my own games
There is not really much of a template to be built for this one, rather each construction post would have a personalised template.
This will be the template description for the Game Opinion Series.  The goal of this series is to look at the industry and analyse what is going on and how as game developers we can learn from the mistakes others have made and something more or less along those lines.
  • Overview – Overview of the topic I will be discussing
  • Rant – A few paragraphs on what the topic is
  • Summary – Analysis on the rant
  • Closing Remarks

– Moose