Friday, 6 April 2012

Engaging Players through Endogenous Value Considerations

Lens #9 in Jesse Schell’s awesome book – The Art of Game Design is all about endogenous value.  If you consider this in your game design you will have a simple but powerful tool which helps  to write engaging games that have longevity.

In this post I will look at what endogenous value is, examples of games which employ strong endogenous value and not so strong.  I will also look at past console gaming, modern console gaming and mobile gaming.  There is also a discussion about how well themed objects/tasks without high endogenous value contribute little to a game but objects/tasks with high endogenous values but not themed particularly well can still add to your game.  I will also look at whether this is a fundamental necessity of a game or if we can do without it.

What is Endogenous Value?
It’s a mouthful for a start.  Schell draws this from a quote from Greg Costikyan:
“[A game is] an interactive structure of endogenous meaning that requires players to struggle toward a goal.”


Endogenous is a biological term which means growing or developing from within.  Schell breaks it down like this – there are items, objects and tasks within a game that have inherent value within that game but not outside of it.  So for example a ‘1-up’ has good endogenous value within the game because it gives you a safety net.  A power-up for a weapon in a side-scrolling shooter also has endogenous value within the game.  It lets you kill enemies easier and quicker.  But outside of the game it is worthless.  You cannot trade it for anything else or eat it or even give it your mum on her birthday which you’ve forgotten :S (sorry Mum)  A few examples will make this clearer.

Bubsy – Accolade 1992, SNES & MegaDrive
If Schell hadn’t pointed this example out I would never have heard of this game.  It is a platformer fairly typical of the era.  Pretty good graphics and soundtrack, high production value and utterly forgettable.  Bubsy is an example of not considering the value of objects and tasks within the game world.
Bubsy is a cat that has to do the typical platformer thing – get from one end of the level to the other.  Along the way he can collect balls of yarn which increase his point score.  Thematically this is spot on.  Cats and balls of yarn go together like sex and regret – great fun at the time but not so great when you’re coughing up a fur ball.  But what tends to happen is that the player learns quite quickly that there is no real value in picking up the balls of yarn because the score is meaningless.  The players main motivation is to complete the level – it solves the problem of how am I going to get to the other side of the level without dying and marks progress through the game.
The balls of yarn were an unnecessary distraction that most people ignored because they had low endogenous value.  This cannot be said of the next example.

Sonic 2 – Sega 1992, MegaDrive
Let’s face it this is one of the all-time greats.  Simple game play, good graphics, exciting and another example of a sequel that was better than the original.  I spent hours playing this game with my friends – going through the levels, finding the extra lives and doing the bonus levels.  Not to mention the time we discovered you could use the second controller to move Tails, a moment of sublime excitement (this probably counts towards lens #2 The Lens of Surprise).
If we are to compare Sonic 2 to Bubsy then thematically a fast hedgehog collecting rings is nowhere near as consistent as a cat collecting balls of yarn.  However the collection of rings did provide a ramp up of endogenous value.  At the basic level a ring offered protection.  If you got hit in the face by a coconut lobbed at you by a monkey in a tree you wouldn’t die.  You would lose your ring and have the opportunity to exact your revenge.  If you collected 100 rings you got an extra life which feels like a bloody good thing when you consider console games had no persistence.  Turn it off or lose all your lives and that’s it chuck.  You’re starting again.  But more than that, collecting 50 rings gave you the opportunity to play the bonus level to get a chaos emerald.
Already we can see that the player is going to be more motivated by rings than balls of yarn.  And actually the endogenous value of the rings was so high that eventually they became more important than completing the levels and defeating Dr. Robotnik.  It was actually the Chaos Emeralds that Dr. Robotnik wanted and if you got all of those you could complete the game fully.  

Bubsy v Sonic 2
Maybe Sonic 2 was just the better game.  It was the standard bearer for the console and thus needed to be top notch.  Besides we are talking about a time in game development where Japanese game companies were more successful than their western counterparts.  Maybe it’s just coincidence that Bubsy got the balls of yarn thing so wrong.  There could be an element of truth to this.  Is there any more evidence that the internal value of objects has a bearing on gameplay experience?
Who remembers the time bonus in Sonic 2?  There it was at the end of every level, a complete waste of pixels.  Thematically it’s much more consistent than rings – a fast hedgehog would take pride in completing a level quickly you would assume.  But what’s the point of spending months and years on a game that people are going to try to whizz through without stopping to find the secret boxes?  The fact that this bonus would not affect the experience of the game if it was removed suggests to me that internal value is more important than thematic consistency.  But I bet there is a counter example out there.  

Resident Evil IV – Nintendo 2005, Gamecube & Wii & PS2 & Windows
Time for a confession.  I am one of the unnervingly high numbers of fans of this game.  But there was always one aspect of it I found jarring and it went like this:
“Welcome.”  In a husky voice.  “What are you buying.”
The collection of jewels in this game and the selling for ptas to buy upgrades annoyed me.  It felt like a chore.  I had to find these jewels so I could sell them and then decide what upgrades I wanted as I could only fit so many into my invisible briefcase.  Realistically the game would be unnecessarily difficult if you didn’t upgrade.  So you’ve got to do it and therefore it has high internal value but thematically it sucks.  The village is overrun by mindless hosts of some horrifying parasite yet this guy stands around, clearly marked by blue flames with a mobile shop selling small arms and health packs.  I wasted a lot of ammo on this sucker the first time I saw him and I wanted to report him to the UN for profiteering because his prices were so high.
Luckily everything else was awesome.  But I did feel at the time that exploration would have been a better way of upgrading weapons.  Maybe the jewels could unlock rooms that contained the upgrades with a mini-boss guarding it.
I think the problem with this is that the internal value wasn’t high enough.  You could find weapons out in the map.  Normally you did find one before it became available in the weapon mini-market so it was kind of pointless.  If the shop was the only means of upgrading then it may have been more of a place of refuge and safety much like the box rooms in the earlier resident evil games and a valuable opportunity to re-group.
But we are dealing with a more evolved medium now.  The story behind Sonic 2 was lightweight compared to Resident Evil IV.  Perhaps the considerations I am talking about aren’t so important for modern console games and that’s why one of the biggest games of recent history was happy to ride rough shod over this consideration.  But there are modern games that have good theming and tasks and objects with good internal value.

Bioshock – 2k Boston 2007, Xbox 360 & Windows & PS3
Another great game.  Followed up by a great sequel.  In this the task of collecting Adam from the sisters is thematically excellent and does have a high endogenous value.  It allows you to upgrade and the manner in which you extract also contributes to the story.  But still you can move through the game without collecting it and avoiding fights with the Big Daddy’s.  It will get progressively harder but you can find Adam dotted around the levels.  In this sense Bioshock is a better game than Resident Evil IV.  There are other issues with the game, not very serious ones, but in this sense it is a fine example of well integrated sub tasks that have value.  So it is still something you should consider to be of prime importance?  Maybe.

Mobile Gaming
Just when you think you’ve got a handle on something Angry Birds comes along.  We hit a real issue here.  A lot of the games on mobile phones are targeted at the casual gamer.  The guy/girl/ogre that has a few minutes to burn, not much of a track record with games and doesn’t mind dropping a quid or two on a game.  As a result of this the structure of a lot of mobile games is such that they could be considered a collection of individual games with the same theme.  So once you’ve done level 10 you can forget that and pick up on level 11 next time you start playing.  No concept of energy, lives, money, normally only a nod towards a point system, each level is a puzzle to be solved then you move on.  Great.
Well not so great actually.  What if you want to put objects into your game which have an inherent value? For starters the endogenous value is limited to the game world.  So immediately there are questions about how you give something value when each level is treated like its own game.  Should you be able to carry an advantage into the next level?  Won’t this ruin the game by making it too easy? 
Let’s imagine a scenario where if you destroy all the pigs with one bird you unlock a new bird type – the Nukabird.  It has much greater damage potential, can control its direction in mid-flight and really hates those pigs.  You unlock this bird on level 1, the rest of the game is a breeze and your player stops playing after level 8 because it is too easy.  On top of which they fail to see the value of the Nukabird because they haven’t experienced levels 2 through 8 without it.  Disappointment  ensues.  They tell their friends and those guys at Rovio aren’t doing so well.  Were Rovio right to not consider adding objects with an internal value?  Absolutely.
It’s not all that way on the mobile front though.  Consider if you will Doodle Jump.  It’s simple, fun and challenging and what’s this.  A pair of springy shoes!  Wow I can jump further with these, score points quicker and reach higher platforms.  Now I’ve got a rocket pack, I’m invincible, for a while anyway and I’ve basically had a bonus of a few thousand points.  Excellent.
Obviously these items have value to the player whilst they are playing the game.  Of course the structure is different to Angry Birds.  It is essentially an arcade game, score as many points as you can without dying.  This structure provides an opportunity to provide an array of objects with varying endogenous values.  And it adds to the game and is thematically fairly well integrated.  So what does this mean?  There are some games where we should be spending time thinking about this sort of stuff and games where we shouldn’t?

Conclusions
I’ve discussed how various games address the issue of endogenous value in game design.  I have mostly stuck with games that most people would consider successful and looked at how they’ve dealt with it.  If it was fundamental to any game that it has objects/tasks within it that had high endogenous value then all these games would have it other than Bubsy.  But we can see that they don’t.  But we can also see is that where there are tasks/objects within the game that can have a high or low internal value then it is imperative that they have a high value or even a ramp-up.  Some games it is not suitable to have these types of objects and it should not be a matter of crow barring them in.  For example Braid – would that be any better if it you had collectable items that altered the time warping effects of the different levels?  More likely it would be case of managing this so that it didn’t ruin the overall game.  So when should we think about this?
Always.  If it’s not a suitable consideration you need to think about it and determine what effect to the player experience would this have that makes it not suitable?  If you don’t you could end up putting balls of yarn into your game which wastes your time, the developers time, the artists time etc.   However, if you don’t put something in there that would augment the experience then you would end up not producing as good a game as you could have.  Nobody in game development wants to do that.  Besides players pick up on this sort of thing.  A good game does the details well, and these are the details the player interacts with so they will know if something is not well themed, or if it could be done better.  If you’re lucky they will ignore it, if not it could be a 3 star rating instead of a 4 or 5.

Sunday, 18 March 2012

Error passing 'const...' discards qualifiers C++

Okay so I'm making steady progress on a simple game engine which I'm going to call the Assassin Engine 'cos it sounds ace.  As I'm getting deeper into C++ programming I am finding all the lovely quirks of the language.  Quirk number 1 - Scott Meyers is a god when it comes to C++.  This puts me in a tricky position because I'm an atheist.  So I can either deny that Effective C++ - 55 Ways... is a book of almost divine scripture or I can be pragmatic and say there is useful stuff in there.

Tbh I haven't finished reading it yet.  Each item makes so much sense that to absorb it fully takes time.  If you were to run a concordance on my code you would now find that the 'const' keyword outnumbers everything else by about 5 to 1.  This is from the first few pages in the book.

Quirk number 2 - Turns out that pointers never really were pointers in C++ which comes as an enormous surprise to me.  I have now accepted the fact that I was a dirty C with Objects hack and that my obsession with the asterisk was naive.  Now we work with unique pointers and shared pointers.

All this constness and these clever pointers does get me into a little bit of a tizz every now and again as I'm adjusting to new paradigms of programming.  Here is a prime example:

I am creating a TextureManager that basically holds a list (map) of textures that you can call into with an id.  The idea being that you just add the texture id to an object and that gives you access to render the texture etc. from that object or something like that anyway.  I am storing the textures in a map of <int, TexturePtr> the int being the id and the TexturePtr being a shared_ptr to the texture.  Apparently unique_ptr should now be compatible with maps but I don't think gcc have got round to implementing it yet.


So I overloaded the [] operator with - 

const ASTexturePtr operator[](const int position) const { return TextureMap[position]); }

and got into a heap of trouble.  Basically I was getting a very extensive error with lots of chevrons and maps which basically said you have an error which discards qualifiers in C++.

It took me a little bit of research to figure out what it actually meant but the short end of it is that I was using a non-const function in a const-function.  So in theory dropping the constness of the function should make it compile?


const ASTexturePtr operator[](const int position) { return TextureMap[position]); } 


It did!  But I did want this to be a const function, it shouldn't update the internal state of the object so satisfies the scenario for bitwise constness so why shouldn't it be const?  I can only surmise that when you use the [] operator on a map, because you can update that entry with that operator it is not a const function.  So for example you can do -

MyMap["Apple"] = "Orange";

Thus changing the internal state of the object and failing all tests (bitwise and logical) for constness. So the way around this is to provide a function which will access the map by an id and is a const function.  Something like

ASTexturePtr getTextureAtId(const int p_Id) const
{
  TextureMgrMapEntry::const_iterator it = TextureList.find(p_Id);

        if(it != TextureList.end())
        {
            return it->second;
        }
        return ASTexturePtr();
};


and then use that in your overloaded operator:


const ASTexturePtr operator[](const int position) const { return getTextureAtId(position); }

then you get compilation.  Excellent!

The great thing about C++ is that coding normally means a thousand of these little problems and that normally they are created thorough a lack of understanding of the language.  It is these types of things that are headed off at the pass by good design and robust coding style.  I'm not there yet but I'm getting there :)



Saturday, 25 February 2012

Game Deconstruction - Angry Birds

Just why is Angry Birds so popular?  It is one of those games which has really put the focus on indie developers.  You can make a game like Angry Birds quite easily but what was the winning formula?  Why hadn't anybody stumbled upon it before?

The Theme?  Lobbing Birds at Pigs who have their eggs.  Not sure that this was the appeal really.  If someone said to me in a bar "have you heard about that new game where you chuck frowning birds at oinking green pigs?" I'm not sure I would have been motivated to keep tabs on it.

The fact is Angry Birds was immensely successful on devices with touchscreen input.  As far as this goes the game is excellent, you can control the trajectory and power of the bird with relative ease and quite quickly it feels like a game of skill.  Everyone thinks they are ace at lobbing things through the air onto/into something else.  I literally spend many hours of my working week throwing balls of paper into the waste bin.  It would be a serious waste of time if I weren't so good at it.  This is what Rovio have managed to capture, the artistry of chucking things in the bin.  On top of that you can play it for thirteen seconds and turn it off and not lose anything which is the essence of mobile gaming - occupying micro-moments.  A reworking of a Zelda game would be a complete waste of time on a phone.  If you have to play any longer than two seconds without a save point then you are looking at a recipe for complete failure.  I haven't completed Angry Birds and feel no motivation to do so.  In fact if I had completed it what would I do whilst I'm on the bog thinking about what to think about while I'm on the bog?

That's it really, you can call it the mechanic but really I think its that the touchscreen is the perfect input device for that mechanic.  After that it is well executed.  Well done Rovio.

My Motivation for Game Development


There are plenty of developers out there that are really passionate about what they do.  They write these games that are loving homages to a genre/sub-genre.  Their audience are all those people who remember how good Chaos was on the spectrum, or Dizzy, or the original Wolfenstein or are 8-bit fanatics.  There are people out there who can pick the geneology of any game out of thin air, they've been playing and studying through play video games their entire lives.  I'm kind of one of them.  But my history of gaming is a little bit more potted.

I reckon I was about 7 so we're talking 1985 - 26 years ago (there's a sobering thought) and my parents bought home a computer.  I had no idea we were getting it and was absolutely ecstatic when it arrived.  A small black box with rubber keys and a tape recorder.  The Spectrum 48k was my introduction to the world of computing.  I spent hours programming it - it had a dodgy power connection and after a few hours of programming it would go off and I would lose all those lines of code.  But it was ok, I didn't really understand what I was doing and the not knowing what was going to happen when I ran the program was kind of like a game in itself.

The games I can remember playing were things like Tranzam, Atic Atac (best game ever), Chaos, Centipede, Digger Dan and that's about it!  The truth is I played hundreds of games but my memory for them has failed.  All I have left are remnants of experiences, most of which were delightful.  A couple not so great.  I distinctly remember the original Donkey Kong crashing on me a lot.  This is the kind of experience I want to replicate.  The feeling of 'Wowwwwww!'

My history continues in similar fashion - from Spectrum to Commodore 64, to Amstrad CPC6128, to Amiga 1200 - then the CD32 (great move that was) through to PC with a couple of stops off at the megadrive and a Nintendo 64.  I have spent some serious hours playing, beating and getting bored of hundreds of video games.  What always sticks out are the ones that you obsess about.  Where you go to bed after a 14 hour stint and still think about it.  It doesn't happen so often any more, I'm too old and too tired and games are far more cinematic these days.  The wow factor comes from the amazing graphics and not the gameplay.  But that's what I would like to bring back into the world - fun, all engrossing video games.

How do you do this?  Well I think it's quite simple, you offer people something that they've always wanted to play but don't realise it.  How you come up with that something that satisfies that formula is a matter of introspection and empathy, two assets that are generally under-developed in modern society.  Thinking critically about what you like and why you like it goes against the 'want now' mentality that has been encouraged in modern times.

And maybe there is the theme for a game - "What happens if you get everything you want?"  A player with an infinite inventory that stores everything you pick up making it very difficult to find and access the things that you actually need.  Or maybe the more you carry the slower you can run/walk and once you've picked something up you can't put it down.  Talk about a frustrating game mechanic :D

I'm not saying that I will ever achieve what is essentially nostalgia on my part but I think it is a slightly different motivation to a lot of other indie developers.

Wednesday, 22 February 2012

Some great gaming podcasts

Apparently podcasting is dead but just in case you are into necrophilia you can check out these podcasts.  I particularly enjoy the brainy gamer and would recommend it.

The great thing about all these podcasts is that they are hosted and produced by people who really know and love what they are doing.  After all what's the point of spending days, weeks, months tinkering with code and artwork if you don't love what you do.

They are all awesome geeks of course.

http://www.brainygamer.com/ - some interesting interviews with some interesting people.  A host with a good knowledge of the area.

http://www.gamedevradio.net/ - fairly interesting, easy going, again good interviews.

http://www.gameenginepodcast.com/ - those crazy Aussies, good discussion, light hearted.

http://www.experiencepoints.net/