One of the best games I've played recently. The space the game gives you to reflect is something rarely achieved in triple-A. I think this gap is immensely important in games. Prompting introspection is a huge and underutilised strength of our medium.
Something I've found immensely useful for prototyping recently are simple rating systems. After using them for everything from targeting to AI I realised I hadn't written about them here.
Two simple examples - say you're writing something that targets an NPC in front of the player, and you want to find the most central target - not too far forward or back, left or right. You simply assign a rating to each NPC based on say, screenspace (or a point projected in front of the camera or player) - 1 being dead centre and 0 being the edge of the boundary that you deem acceptable. Do this for X and Y and then multiply them together and pick the highest one. (Or add them if your ratings aren't in the range 0 - 1)
This starts getting really useful when you want to add in other variable, giving npc's a higher score if they are.. facing away, stumbling, running at you, a bigger enemy etc etc.
Another example would be prototyping AI - To prototype behaviours for new, distinct npc classes, It's quite a nice trick to scatter points around the map and have them rate their own eligibility for an NPC to move to based on... LOS to the player, height, nearby enemies etc. Then again the NPC simply moves to the highest rated point.
An incredibly simple but, massively useful pattern.
Just to explain the recent media silence - I've been focussing all my efforts on making my way to LA to start work for Naughty Dog. I am currently rethinking what content I am going to create in the future and how to deliver it. If you're looking for my latest, the best place is probably my Youtube channel.
There’s a common mantra in games design, in fact, it’s something shared in the design of most things - ‘Keep it simple'. This however directly conflicts with the urge most young designers feel to cram every good idea they have into a game.
As we become more experienced, we learn to pick and choose between our ideas. There is a shared understanding in the industry that often, less is more when it comes to mechanic design, however this often rears its head as some vaguely agreed upon notion that a design should not be overly crowded with features.
In addition to this, complexity can be the very thing that makes the core of a game interesting, and we often want to try to create systems that will give us depth through the possibilities of their combinatorial elements. So where do we draw the line?
The real key, is that it all comes down to pressure. Pressure is an interesting topic in game design, and it’s one that I’ll cover in more depth in the future, but for now I’ll simply summarise it for our purposes as - the time the player perceives they have to make a decision. In a turn based game, the pressure is low. In a third person action game, the pressure is higher - and if the enemy AI is advancing, threatening to flank you, then the pressure is higher still.
So we return of the question of ‘how much is too much?’, surely there is a better metric than merely relying on gut feeling, or blindly throwing builds at playtesters until they seem happy.
So with this in mind, consider the following rule: That when we ask something of the player, it should be the only thing they are being asked to actively think about and deal with. This is essentially about a person’s ability to calculate, to deal with problems in real time, to pay attention.
Now it’s important to note that this rule is a starting point. There may be times when you want this pressure to increase, or decrease to nothing, and I will explain why that’s important a little later, but first, to try and explain why this idea is important I want to present an example we will all be familiar with: Learning to drive.
When we got in a car for the first time, if we were asked to pay attention to everything - signalling, steering, observing, changing gears - we would be overwhelmed, we would probably neglect something and we would most likely crash. This might sound simple, but it’s a basic illustration of how the brain can deal with new information, and how people deal with new actions they are being asked to perform.
In this example, we also don’t actually need to remove any of the ‘mechanics’, instead we are introduced to them one by one in a safe environment until they become second nature. When they have become automatic, we can introduce more and more until we are able to essentially perform all at once.
So you can begin to see not only the importance of the rule of ‘actively thinking about one thing at a time’, but also one way in which we are able to include many more mechanics without overwhelming the player.
The key point here is that if the player is consistently being required to actively (and by actively I mean consciously pay attention to and calculate) more than one thing, then you know you have too many mechanics at that moment.
When and how the rule can be bent or broken
We can also see that conversely, as our players become more comfortable with gameplay, it can be important to increase the pressure of those mechanics, or add more to avoid the player becoming bored (enemies becoming more aggressive or adding more enemy types being the most basic example).
And of course in sections of the game where we actually want to increase the pressure to make the player feel stressed or overwhelmed, we can actually require them to deal with more things than they are used to at one time (think, having to unlock a door while you fend off enemies at the same time), perhaps more even than they are able to deal with (fighting a battle you eventually lose for story purposes). Be aware though that if you increase this too high, players may fall back on simple solutions, foregoing the interesting possibilities of your systems because they’re so stressed they don’t have time to think properly. Because of this, these moments should be the exception.
Techniques for adding in mechanics
This rule is restrictive by its very nature, so let’s look at some ways of circumventing these restrictions while not compromising player experience. Some of these are obvious, others less so.
Learnt things becoming second nature allowing us to add more
This we’ve already discussed - mechanics that become second nature freeing up the player's mind to do something else. So, aiming then gives way to tactical positioning. Cover based combat gives way to enemy prioritisation and so on. This is done in almost every action game made to date.
The simple practice of requiring different skills at different times
This too is done often in games. In boss design for example - we often have to use one skill and then the pattern of the enemy will change requiring us to use something different.
Layers in level design
This is the simple idea that there are different places for different activities. A game that illustrates this very well is the recent Metal Gear Solid: V. They deal with the issue of complexity by placing different requirements at different distances from each objective.
At the very lowest pressure, there's nothing to consider, but you get breathing space to organise yourself. Further in, you can observe things and tag enemies, possibly use a long-range rifle. After that you get the different stages and ranges of combat. Of course you can do all of these things at once by charging in, but this is much more difficult and stressful. It also allows the player to set their own difficulty by choosing how slowly to approach.
An interesting solution to the problem of complexity: The pressures in MGSV
The phrase comes from the inspiration behind the structure of Super Mario 3D world, and how that popularised this type of game structure, though it was by no means the first to do it.
The idea is very simple - instead of increasing the elements that a player uses as the game goes on, you simply change them. A mechanic is explored for a while and then thrown away, and a new one introduced (Though this is of course a simplification of these game designs)
Some examples of other games that use this format - Braid, Portal 2 to varying degrees, Brothers, Retsnom, Advanced Warfare (each level gives you a new toy you then never get again) and I’m sure many more.
So as you can see there are actually many ways to include different mechanics in a game without it becoming overburdened. We have a rule that allows us to maintain a default level of pressure in a game, and can show us when just one more mechanic is one too many, and when it may just need a new place.
This is the basis of how we sort, structure and cut mechanics in our games.
When we talk about players setting their own difficulty, we’re not talking about choosing from ‘easy’, ‘medium’ or ‘hard’ in the main menu, but a vast range of techniques that allows the player to dynamically set their own level of challenge as they progress through the game.
Why allow the player to do this?
These designs mean players can fine tune the challenges that you’ve set out for them, in some cases even skipping them altogether. This reduces the emphasis that must be placed on a dynamically scaling system - though not something it should replace, but stand beside.
Unlike dynamic difficulty, these designs embody the ranges of challenge in missions, scenarios and systems - and so are visible to the player. This often this means greater replayability as beginners can see ways of interacting with your game they can aspire to. There are in-fact many more benefits to these systems which we’ll explore with some examples.
More difficult, optional game components
This is commonplace in many games - harder challenges of all kinds that can be attempted or bypassed depending on whether the player feels they have the skill required.
Green stars in Mario 3D World - These more challenging divergences in the level design offer greater risk, but completing them will award the player with a green star, which are used to unlock later levels.
Optional routes in Burnout Paradise - this game has many branching sub-routes that are more difficult, but offer rewards, even if they are as subtle as having lots of trick-jumps you can use to rack up a bigger score.
Very difficult but optional bosses in From Software’s games (Dark Souls, Bloodborne) - in their latest game, the Abhorrent Beast and the Bloodstarved Beast are rated among the hardest, but are entirely optional.
Different ways to play
These are games that cater for multiple playstyles, give the player the chance to master an alternate way of completing the game, or mix and match the two. It’s a nice design element that supports player choice, but it also allows us alternatives when a section may become too challenging.
The multiple specialisations of Deus Ex - The player is able to choose between combat, which pushes on reflexes and tactical evaluation. Stealth, which relies on observation and timing, and hacking, which provides a puzzle-solving approach to each scenario.
The ‘Heavy Weapons’ of Disney Infinity - We had big carriable weapons that were much more powerful than your character. We decided to let the players take them wherever they wanted - they make you much slower and were usually left behind, but if you were struggling with the combat, you could use them to make the game easier at the cost of movement speed.
Setting your own goals
Unlike games which offer you many ways to complete them, these games embody the idea that the goal is set by the player - many goals varying in the level of challenge that they provide.
The world structure of Minecraft - The player can choose to simply build and explore, mine into the more dangerous parts of the game or try and break into the final, hard to reach ‘boss stage’.
This is my personal favourite, mostly because clever systems design can deliver this player-set difficulty on a micro or macro level. These are systems that range from allowing you to elegantly but purposefully raise and lower the difficulty, to systems that when pushed, push back harder.
The dynamic AI of Halo - As you become more bold, more enemies are allowed to engage you at once - proximity is the heuristic here. This means if you’re timid and keep your distance, the challenge is less than if you go in guns blazing. The AI also eases off if you retreat, again allowing you to back out of your decision to ramp up your own difficulty. This allows the player to vary the challenge on the micro level - every encounter can be approached differently.
The ‘Insight’ resource in Bloodborne - Insight is a currency earned by defeating bosses, and the more you have, the harder the game gets - enemies are visibly upgraded and more of them appear. The game allows you to spend this currency on helpful items and cooperative help from other players, and in doing so you get the added benefit that the game becomes a little easier. This system allows the player to vary their challenge on a macro level - their decision to make the game easier affects the whole game world.
The colour-based scoring mechanic of Ikaruga - In Ikaruga you are immune to projectiles of the same colour, however to get the really high scores you must defeat them with the opposite colour, making the game more difficult. The gameplay gets more complex and more difficult as you try and become better at the game. This is micro-level system as it affects individual enemies.
The common component of all these systems is that they keep the game challenging for more skilled players. Often, they reward those players but they rarely punish the weaker ones.
The hardest part of your game should be an optional part. This does not mean reducing the difficulty of your game’s final moment, but about adding in additional challenges that most hardcore players.
Often we create a drawback to taking the easy option so as to incentivise the player become better. This is often necessary so that players don’t simply choose the path of least resistance. It’s always worth considering however if it’s really necessary to punish players for not being good enough. Ask yourselves, why shouldn’t we let the player cheat? Why can’t the player sneak past our bosses if they’re too hard? Deus Ex certainly takes this ideology to heart. Sometimes it’s about choice, sometime’s it’s about rewarding better players, but in my opinion it should never be about punishing bad ones.
There is another fantastic side-effect to many of these systems - it allows players to control pacing and pressure. Regardless of difficulty, many of these systems allows the player to ramp down intense gameplay and just breeze through a section when they feel like taking a break.
Drawing attention to all of these mechanics might very well be something you want to do. In Bloodborne you can decide to counter enemies attacks rather than dodging them. This puts you in the way of danger, but allows you to take them out faster. Compare this to Ikaruga’s system where putting yourself in danger by switching to the opposite colour can result in greater rewards - The real difference here is only that Ikaruga’s system draws attention to itself with a score, while Bloodborne’s doesn’t. You’re not particularly incentivised to always use the counter mechanic, if you were (for example, perhaps enemies could only drop items if killed this way) it would become obvious to the player that there was a ‘best’ way of playing the game - thus incentivising people to become more skilled.
The gameplay hasn’t changed, but we’ve motivated the player by enhancing their perception of the system. Of course players sometimes do this of their own volition anyway - this is one of those fuzzy design decision that will depend on your game.
The importance of readability in these systems cannot be understated - Increasing the number of enemies shooting at you in Halo, is far better than upping their damage, because the player can’t see that happening. In all of these examples, the workings of the systems are exposed - without this, the player may never notice them, and won’t then be able to make a conscious decision about their play-style.
Finally, let’s call this by its true name - this is actually dynamic difficulty ramping of the current situation. Something I warned away from in this article. The thing that makes it work is that the player can back away from it. Vary it consciously. These systems are presented as a natural aspect of the game’s world, and not a developer lurking behind the scenes, reducing the difficulty. It is the difference between choosing a worthy opponent, and being faced against a skilled one who is very obviously going easy on you.
This is the third in a four-part series on difficulty in games. Part 1 is about dynamic difficulty Part 2 is all about the relationship between difficulty and readability
Something that has always struck me as odd is that playable male characters in games, for the most part, are pretty ordinary looking, while the women are quite often very unique. This rattled around at the back of my head for a while until I realised the obvious truth of this - they are still made for men.
The male characters are a fantasy that you're supposed to identify with - they have fairly generic looks and personalities, and it’s not too much of a stretch to put ourselves in their shoes. Female characters on the other hand aren’t like this - they are not made for you to identify with, but admire instead.
Now there are many exceptions to this - as an industry we are getting better at designing good female characters, but there are some common, more subtle flaws in our depiction of women than their commonplace objectification in games. I think it’s important to recognise these flaws and avoid giving ourselves a pat on the back just for making a protagonist female, and there are several reason for this.
A subtler fantasy
So first our female protagonists: Unlike their male counterparts, they are often very stylised, quirky and ‘badass’. Sure, these designs have become more subtle since the original Tomb Raider, but the underlying direction is still the same - they are adolescent male fantasy women - 'cool' and alternative. The kind of women the designers imagine will appeal to their audience. I think this is backed up by a few things.
First, take a look at the designs in these games - almost all of the men wear ordinary clothes, jeans, t-shirts, shirts. Almost all the women wear very designed gear, they look impossibly made-up compared to the rough-and ready, stubbled male designs. They are always clean, while the men are covered in sweat and dirt. Male design tends to focus on realism, while the women err towards fantasy - a sweaty man is fine, we can relate to that - a hard-working, tough-looking character. The women however are not meant to be identified with in the same way, and so they’re almost always impossibly stylish and clean.
Of course these designs are not a problem themselves, it's perfectly fine for a character to be as mundane or over-the-top as the developer wants, but the abundance of this trend sheds light on these issues.
The other supporting piece of evidence, is that unlike games with male leads, games with female leads rarely include a love interest of any kind. Very story-based games with a male lead rarely go without, no matter how well-written they may be, or how superfluous it is to the storyline.
As an industry and especially as these topics become more and more contentious, I think we too often point to female protagonists as if they’re the solution to a problem, without realising that many characters who are NOT highly sexualised are still designed for men. It’s an easy trap to fall into as a developer - just because we don’t treat the character in an actively negative way doesn’t mean they aren’t still targeted at a largely male audience.
Not enough female voices
As we create more female-friendly characters and stories, we help to generate a virtuous cycle where more women are drawn to the industry and can add their voices to the process. Of course the main issue is the audience that these characters are targeted at and not the gender and sexuality of the creators, but as a developer it has always struck as mildly absurd when a group of men hold a meeting to make sure the female characters they are writing are portrayed well, stopping short of actually talking to a woman. It's not impossible for a man to write a strong female character, but it is certainly something we don't seem to excel at in general. Until our industry is more diverse, a little focus-testing certainly couldn't hurt.
Polls have shown a growing majority of gamers are women, and last year that figure climbed to 52%, yet the vast majority of the industry is still male and still creating characters for men. Simply as a business, we are supposed to be designing for our audience, and this for the most part is no longer the case. We need to begin to think how we can really make characters that women can identify with, and don’t just tick the boxes on a shallow level.
Take a good example: Jade from Beyond Good and Evil. Now her design does not steer completely clear of what we've talked about so far by any means - she's quite unique looking though not out of place among the other characters, her clothes are fairly normal - a jacket and trousers. She's been designed to appeal to a wide demographic. However I've chosen her as an example not for these reasons, but because she's been designed not to be sexualised, and while sexuality is in no way a bad thing, in games where you are expected to take control of a character, if handled badly it can stop you from identifying with them as someone who you are supposed to inhabit, and turn them into something you are distanced from because the developer wants you to see them as an object of attraction. For me this is an extremely important point, it’s a subtle shift but it makes such a huge difference to your experience of a game, as a man or a woman.
Jade from Beyond Good and Evil
Abigail 'Fetch’ Walker from Infamous is another good example - she fits into the game as a whole, she's pretty much a female version looks-wise of the male lead. She has sexuality, there is a minor romance subplot between the two, but it serves a greater purpose in her character. In fact it’s not something that’s skirted around by the writers, there is one particularly lecherous character that constantly hits on her - on you, but her sexuality works in this game because it’s not for us, it’s for her and because of this it doesn't distance the player from her character.
Fetch and Delsin from Infamous: Second Son
The difference between sexual expression and fetishization, and the distance it can create
Sexualising the character for the viewers pleasure can cause this perspective shift where you are no longer empathising, but are now outside looking in. This happens when they cross the fuzzy boundary between relatable and sexual object, so let’s look at the specifics of why that happens.
Firstly, the issue is not about a character's sexuality, but who that sexuality is for. A woman expressing her sexuality is an expression of power and emancipation, but if the way a character has been designed is a fetishisation, then it isn’t her sexuality at all - it’s not for her, it’s for the audience.
So let’s look at an example of this - Bayonetta. In no way does she represent the majority of character design, but she's an extreme example of a commonplace problem: The problem with her portrayal is that her sexuality is not her own, it is an expression of how her creators want us to see her. Unlike Fetch in Infamous, her sexuality is not part of the story, it’s not directed at anyone in the game, it’s directed at the camera - at the audience.
She performs for the audience, for the camera. It's also evident in the way the camera obsesses over her - moving round her in voyeuristic ways, up her crotch, through her breasts. Her special move sees her strip naked through a ridiculous conceit (her clothes are made of her own hair, and so in order to use her 'hair magic' she must get completely naked. obviously). As the player we are not her, we are the camera. It’s the fact that she has been created for voyerism.
Again to reiterate - this is not about female characters not being allowed a sexuality. If the character has sexuality because it is part of the story the developer wants to tell, then like any other part of the game's design - it has a place. If it’s there just for viewer pleasure then it's not her sexuality at all, but something imposed upon her by the designer.
Of course, doing this isn’t necessarily ‘wrong’. If a developer wants to make a game to appeal to a specific demographic in this way, then they’re free to do so. The point here is not to point fingers, but to explain why this is an alienating design practice. Personally I find it embarrassing to play something that so blatantly thinks I want it to show me a naked computer generated woman. Maybe the game is not meant for me - but I can't help but feel that if they just didn’t fetishise her, I and many others, would be able to enjoy it as well.
If we do want to make a woman more can identify with, then along with many many other things, we at least need to make sure that her sexuality actually plays a role in her portrayal, and that the camera is showing the player and the character what we need to see to play the game, and not just doting on her form.
In the less extreme cases, we need to be more aware of who exactly we’re appealing to. The point I'm trying to make here is that in many cases, I don't actually think the developers are intentionally trying to appeal solely to men, but fall into these pitfalls nonetheless. Whether you like it or not, you run the risk of cutting off an enormous portion of your sales if you portray these characters clumsily.
As an aside - I'm not sure why I've become so obsessed with difficulty in games recently, I have about four more articles coming up on the subject. It's actually not one of thiose things that fascinates me, it's just something that's reared it's head for some reason.
Creating a more complicated damage model is something you should always implement in the beginning of a game's development. You may not plan to need it, but when your design changes it's a good thing to have in place.
Why would we want this?
It may be that you want certain characters to respond to only particular damage types like fire, or high-velocity munitions. Or perhaps you want equipment to shield against a certain super-set of these types, like a flak vest that stops explosive damage.
The idea of this is relatively simple - you set up a system that enables a receiver to only take damage from the types that it is allowing. Whenever you create a character, you can specify what it is vulnerable or invulnerable to. When damage is sent, it carries with it the relevant information that allows this filtering.
The fundamental idea behind its implementation is that the designer is able to create damage types, such as explosive, blunt, fire, and sub-types such as grenade, bullet and so on. These are then processed by the engine and assigned to unique bitmasks for fast processing. You can then create weapons that deal this damage, triggers that watch for them (for example a destructible wall only vulnerable to explosive damage), and characters who can listen for these types and process them how you choose.
In an upcoming post I will outline the basic implementation of this system. Stay tuned!
In my experience the most important thing when coding this system in various forms is that your memory markers, in code and their references in script, must be nullable.
This provides us with a very quick and easy way of wiping these markers when they are no longer needed, or querying the null state to see if the agent has no memory of something - and therefore if we need to create it.
The first pass implementation of these markers simply has two rules:
You update the marker for a character to that character's location when it's been seen by an enemy.
You make the AI's logic - search routines and so on, act on this marker instead of the character
It's worth mentioning that each AI will need one of these markers for every character on an opposing team, and every object they must keep track of.
Because of this, it is useful to populate some kind of array with these markers.
Think too, about how you can sort this list by priority. When the AI loses track of a target they can grab the next marker in the list which may be an objective, or a pickup they passed.
When the list is empty, they fall back to their patrol state.
Memory is something that is often overlooked in combat games, more often than not when a character becomes aware of you in a combatative action game, they remain aware until dead. Sometimes they may run a countdown when they lose sight of the player and lapse back into their patrol state if that ends before they find them.
Neither of these techniques looks particularly intelligent. The AI either looks unreasonably aware of you, or unrealistically gullible, in that they go about their business after they've lost track of you for a few seconds.
The AI use this marker for searches and targeting instead of the character
The marker only updates to the players position when the player is in view of the AI
this gives you a number of behaviours for free- For example, the AI will look as if you have eluded them when you duck behind cover and they come to look for you there. Just from this minor change you now have a cat-and-mouse behaviour that can lead to some very interesting results.
It is also very extensible - in more complicated implementations (covered in future video tutorials) a list of these markers is maintained and acted upon. This lets us do things like have the AI notice a pickup when running after the player, and return to get it if they ever lose their target.
I’m not usually a fan of short, snappy phrases that sum up design concepts because more often than not they end up being reductive and misleading. A Razor however, while not being entirely guilt-free in this regard, is a simple concept that I’ve seen used consistently enough for it to be worth covering.
The name comes because it helps you identify and cut unnecessary features. It is however a slight misnomer because it also helps you design them, and generally keep the creative team on track.
In short, it’s a phrase that serves as a small reminder about the core of your game.
Using this Razor for your game design
Often in design you find yourself paused, not by creative block or because you’re unable to see a solution to a problem, but because you have a variety of seemingly equal and interesting solutions in front of you that you have to choose between.
The idea is simple - you think of a way to define the core of your game, a summary of the experience, and then you encapsulate that in an easy to remember phrase. For example “You are a swashbuckling pirate”. From that point onwars you then make sure every part of your design validates this phrase. If you think of a feature you like, but it really doesn’t help achieve this feeling, then you cut it.
Of course, it works both ways - the realisation of your game’s true core helps you to think of gameplay that will further help you evoke this feeling in the player.
It’s a tool designed to keep your game lean, focussed and consistent. It’s meant to produce something where everything works together to push towards one overall feeling. Game mechanics, music, art, story - all should be working towards one goal.
To use a more relatable example, let’s imagine that the Razor for Uncharted 1 was “you are Indiana Jones”, not only can the design team use this as a reminder for their mechanic design, but the level designers too can use this to remember the heart of the game, and how they should be thinking about movement through their spaces. Animators too can refer to this, and remember that in combat Drake is not supposed to be a master of the martial arts, but rather someone who comes off as a scrappy street fighter - untrained but experienced.
Now it’s important also to point out that it’s not some magical phrase - really it’s an understanding the whole team has to come to. A true understanding of what the game is about at its core. The phrase is merely there to remind you of it, so don’t be too beholden to the words you’ve chosen - it’s the idea behind them that’s important.
Things to watch out for
It’s important that this phrase encapsulate the feeling the player should have when playing the game. It should not describe something the game should do - this is a common mistake. You may be tempted to use a phrase such as ‘everything is a weapon’ because this might remind you of one of the core tenants of your game, and in some ways can help other aspects of the game’s creation, but it doesn’t help you make decisions, and more importantly, it certainly won’t help an animator decide what style to choose when blocking out a new animation.
It’s the overall feeling that you’re trying to convey - “You’re a ragtag group of mercenaries.” “You are inside a Grimm's fairytale.” “You are a scared civilian in a war with absolutely no training.”
A small, simple thing that should not be overstated, but a useful trick nonetheless.
Dependence between different game elements is an often-overlooked but fundamental component in any great design.
This article will deal specifically with the link between level-design and core gameplay.
This is important for three reasons:
It stops your mechanics from becoming boring as every new environment offers new ways or new opportunities for how you use them. It creates variety.
This variety allows you to create a narrative of pressure throughout your encounters.
It makes the player feel excited to look at a new area and wonder how they can take advantage of it to have fun.
The first point is fundamental. We've all played a game that eventually got boring, even though we at first enjoyed it. Often this is due to the game mechanics becoming repetitive. As designers it is our job to give players many interesting, challenging and varied situations to use them in.
Linking level design heavily to core mechanics is one way of doing this. You want space and verticality to play a part in how it feels to play your game. To give a more specific example, in a combat heavy game you want it to be a completely different experience to fight in a corridor, as it is to fight in an open space.
This allows you to create variety without having to teach the player anything new, without having to complicate your core mechanics.
Gears of War is a good example of this. Enemies attempt to flank you, and so the combat experience changes drastically depending on how restricted the space is, and what the distribution of cover is. It is a good example too, because while space may vary the combat in other games subtly, Gears of War really pushes this into the forefront of the player's mind. It’s clear and readable. This aspect of the design is made as noticeable as possible so that players can make meaningful decisions based on where they are - should they run, flank, look for a different weapon or push on.
When you have successfully created core mechanics that heavily rely on the surrounding environment, you can then use this knowledge to design your encounter flow.
Perhaps you want the player to enter the level in a calm moment, then have the pressure build to a crescendo before rewarding them with something fun and easy at the end.
Taking a simple combat example you might want to...
(Calm moment) Start with some nice open environments
(Build the pressure) Slowly have them close in
(Crescendo) Then at the hardest part of the encounter have the player flanked by enemies positioned in high positions, giving them the height advantage.
(Reward) You emerge onto a balcony, this time with the height advantage in your favour - where the low cover offers the enemies no protection against your potshots.
This allows you to build your levels from specific narrative requirements - what is the player supposed to be going through at this point in the story? This will help level designers work towards a goal, rather than scratching their heads over the dreaded blank piece of paper.
The other very important effect this has may sound trivial, but personally I think it's very important. It is the excitement the player gets when they truly understand how different levels can mean whole new types of fun, and it’s the feeling you have when you walk into a new area of the game and start thinking about how you might use it to your advantage.
I often liken this to a child walking up to a playground they’ve never been to before. They know what a slide is, what a climbing frame is, and on seeing this new play-area their minds start working - they get excited simply by the prospect of what they will be able to do there.
So with this in mind it becomes more important to think about how you present each new area of the game. Think about the reveal, and about the readability of your interactive level components.
Also take this particular point with a pinch of salt - this readability is something I like personally as a designer. I think it adds a great deal, but it is definitely a preference and not a hard-and-fast rule.
So to wrap up, some simple questions to ask yourself:
Do my game’s core mechanics change significantly based on level layout?
Are we calling attention to how the environment affects core mechanics?
Are we presenting this to the player in a way that makes them feel excited about a new environment?
In the next few articles I will continue to talk about the dependance between game elements and how this can be used to create variety with your core-mechanics, before wrapping up with a working model of design aimed at story-driven character-action games.
In one of the recent MGS5 gameplay videos, there is a moment where the protagonist throws a grenade, only to have their companion AI shoot it into a helicopter that was otherwise almost impossible to take down. It's the kind of over-the-top action we've come to expect from Hideo Kojima, but how would we implement something like this into one of our own games?
There are of course always an enormous amount of ways this can be done. Here, we'll look at just two:
As a script attached to the helicopter
As a more generic action available to the companion AI
The key here is to really start thinking about how we would structure the underlying code to give us the building blocks we would need to not only script this event, but many like it. Let's think about the steps involved.
As a script attached to the helicopter
We might want to attach this script to the helicopter if it's a non-generic action that can only occur when the helicopter is present.
First we would want a generic way of testing for certain objects based on proximity to other objects, in our case, the helicopter
We would then want a system that let us query by object type, so again for us, this would be the grendade
We would probably want to extend this to check to see who threw the grenade, and check for the player as the owner
Next we would want to check that the grenade was on the same side of the helicopter as our companion AI
The companion AI would then be sent a signal to shoot the grenade
Finally we would add the approprioate velocity to the grenade and destroy the Helicopter
With this piece of logic we could write an event that would happen naturally if the player ever ended up in this particular situation. More importantly though in writing generic functions to let us query for objects, owners, positions and so on, we give ourselves the ability to script more events like this, that are equally as unique, very quickly.
Maybe we could make it even more generic though. Let's take another approach.
As a more generic action available to the companion AI
In all honesty it might be a better idea to code this as a generic action that the companion AI possesses, so that they can use this on multiple types of enemies. This is now not then a scripting task, but it's still good to think about the steps involved.
Here we would probably want the AI to be constantly positioning in a way that is helpful for the player, again this will be something core to the way the AI is coded so is not really a scripting task. You can see in the demo that the AI jumps next to the player before jumping away, signposting her position so that they can better choose to use the action. Then, when a grenade is thrown, the AI will perform a cone check to see if the grenade is going to move in between her and an enemy, and if it does, shoot it towards them. This will give the AI the ability to shoot multiple objects at multiple enemies given the right positioning, and in doing so may result in some interesting opportunities for emergent gameplay.
In actual fact there is an extra step in the video - the player actually asks her to perform this action, but it's not really relevant to the core of the explanation.
Imagine you have a situation we often encounter in a game - a character approaches a ladder and begins to climb it.
What is really happening behind the scenes to make this happen? First we would position the character under the ladder, where a trigger-box may alert the code that we can now press a button to enter a ladder climbing state.
When we press this button, the character places their hands and legs on the ladder - an authored animation that takes a few seconds to play out. Now we need to switch to a different movement scheme so the character can move up and down the ladder. But how do we make sure we're switching to this state at the right time so that we don't try and start moving the character before they've finished playing this animation?
The answer is to catch a message sent from the animation state machine. This is a feature almost all commercial engines now offer. You can set up specific transitions or states to send a message when they have been entered or left, and you can then use these messages to trigger code at exactly the right time. You can also often set up specific markers in an animation to send out a custom message at a specified time.
This two-way communication is a key tool that we use in scripting complex gameplay, as we will see in upcoming blog posts.
Root motion is simply the ability to animate a character from its origin. This means we are not animating a mesh away from the point that the programmer has placed it, but actually influencing where the character moves directly from animation.
This becomes especially useful when an animation contains quite complicated movement. Imagine a character has to climb up a wall, at first jumping, then grabbing on and holding before finally heaving themselves over. This is not a linear movement for the character. If we simply had this animation with no root-motion, the programmer would have to try and code the movement to match up with this, it would be a very hard task. Instead, we position the character in the starting position with code, and then hand over control to the animation that executes the move, before returning control to the code on completion.
In most modern game engines you are able to have a mix of root motion and non-root motion animations. For example, you may want your characters movement to be driven by code for the sake of consistency, but 'leaning-out-of-cover' animations might be better off using root motion, so that the movement can be less linear.
A blend space is a concept used in animation scripting where several animations are asssigned a position on a graph, and one or more input parameters calculate what mix of which animations should be playing at the current moment.
Here we see an example of a One Dimensional blend space. Speed is controlling where the blend is calculated to be on the graph. The bottom node represents the idle animation, where speed is equal to zero. Above that are the Run, Walk and current blend position (in orange).
A 2D blend space is exactly what it sounds like - many animations can be mapped onto a graph with two dimenstions rather than just one. A common example of this would be a characters base movement. Below we can see many different animations have been plotted on a graph representing direction along one axis, and speed along another. Using this the scripter is able to create a state for an animation state machine that takes into account these two inputs to play a blend that will see the character turning and running in the correct way.
This is one of several small posts that aim to give an overview of animation technology in current games, as part of an ongoing scripting tutorial series.
Animation state machines are a core concept used in modern computer games, and are a necessary component for us to understand and work with characters and scripted moments.
There are three main components that compose animation state machines
These contain an animation. When a state is active, the character is playing this animation. You may be able to alter the way the animation plays, but nothing more.
The only caveat is that states can also contain blend-spaces, which we will cover in an upcoming blog post.
These are the links between states. They define which animations are allowed to blend between each other. For example, you may add transitions to allow a character to blend from Idle to Walking, but not straight from Idle to Running.
These are the set of conditions that you write, that when met allow one state to travel through a transition to another state.
They are heavily parameter driven - as an example, speed increasing may transition from the idle to a walking state.
There are some more advanced elements to animations state machines, such as the way they handle additive animations, encapsulate other state machines and send messages based on their state. These will all be covered in the next blog posts.
I talked briefly already about the importance of not trying to optimise when prototyping, but as it turns out, ‘not prototyping’ is generally something I would recommend you do almost all of the time.
This seems like a very odd thing to be recommending, but here are some reasons why.
You may not need to. If your game is running at 60fps, there is simply no need to waste time optimising. Remember that your time is a precious resource, you only have so much time to make a game. Wait until you actually need to optimise before you spend time doing it.
Always profile first. When your game does begin to run slower, don’t second guess your code and spend weeks or months trying to make everything faster. it will amaze you what ends up being the problem. Use a profiler to actually show you what is taking the most time each frame, and focus in on that.
You probably aren’t helping anyway. Optimisation is a very in-depth subject, something that you might think needs optimising may actually be optimised by the compiler anyway, and your efforts could even make it worse.
If in doubt, ALWAYS write readable code over optimised code. Even in AAA, code that someone else can come and jump into is almost always preferred over fast code (unless we’re talking about very low-level systems), because when people leave, someone else will have to try and understand it.