Categories
computer games design games design games industry network programming programming

All Game Developers should read Pat Wyatt’s blog…

I noticed a few months back that Pat Wyatt has been blogging rgularly and in a lot of detail last year. This (IMHO) is big news: Pat is an awesome developer who held key positions in the teams behind many of the bestselling computer games (e.g.: Diablo 1 + 2, Starcraft, Warcraft) and went on to co-found Arena.Net (creators of Guild Wars).

I worked with him briefly in the past, and he’s friendly and full of advice and knowledge – but while he was happy to share, IIRC it was rarely in published form.

I’ve had a tough few months, but I’ve been dipping into his blog a few times, and it delivers in spades. Here’s a few hilights:

Assertions: enable them in live builds

(I’ve always felt this was the “right” way to do it for servers – where you don’t have to worry so much about frame-time, and assertions are more valuable at runtime because they help with the hardest-to-trace bugs … but it’s hard to get broad data on what the performance cost is)
http://www.codeofhonor.com/blog/whose-bug-is-this-anyway:

“The bug was easily fixed by upgrading the build server, but in the end we decided to leave assertions enabled even for live builds. The anticipated cost-savings in CPU utilization (or more correctly, the anticipated savings from being able to purchase fewer computers in the future) were lost due to the programming effort required to identify the bug, so we felt it better to avoid similar issues in future.”

…and a great rule of thumb for any Programmer:

“After my experience reporting a non-bug to the folks at Microsoft, I was notably more shy about suggesting that bugs might be caused by anything other than the code I or one of my teammates wrote.”

Some bugs are due to … user’s broken hardware

http://www.codeofhonor.com/blog/whose-bug-is-this-anyway:

“Mike O’Brien, one of the co-founders and a crack programmer, eventually came up with the idea that they were related to computer hardware failures rather than programming failures. More importantly he had the bright idea for how to test that hypothesis, which is the mark of an excellent scientist.

He wrote a module (“OsStress”) which would allocate a block of memory, perform calculations in that memory block, and then compare the results of the calculation to a table of known answers. He encoded this stress-test into the main game loop so that the computer would perform this verification step about 30-50 times per second.

On a properly functioning computer this stress test should never fail, but surprisingly we discovered that on about 1% of the computers being used to play Guild Wars it did fail! One percent might not sound like a big deal, but when one million gamers play the game on any given day that means 10,000 would have at least one crash bug. Our programming team could spend weeks researching the bugs for just one day at that rate!”

AI cheats to improve game balance in RTS’s, starting with Warcraft/Starcraft

http://www.codeofhonor.com/blog/the-making-of-warcraft-part-3:

In most Warcraft missions the enemy computer players are given entire cities and armies to start with when battling human players. Moreover, Warcraft contains several asymmetric rules which make it easier for the AI player to compete, though these rules would perhaps be called outright cheating by most players.

One rule we created to help the computer AI was to reduce the amount of gold removed from gold mines to prevent them from being mined-out. When a human player’s workers emerge from a gold mine those workers remove 100 units of ore from the mine and deliver it back to the player’s town hall on each trip, and eventually the gold mine is exhausted by these mining efforts. However, when an AI-controlled worker makes the same trip, the worker only remove 8 units of ore from the mine, while still delivering 100 units into the AI treasury.

This asymmetric rule actually makes the game more fun in two respects: it prevents humans from “turtling”, which is to say building an unassailable defense and using their superior strategic skills to overcome the computer AI. Turtling is a doomed strategy against computer AIs because the human player’s gold-mines will run dry long before those of the computer.

Secondarily, when the human player eventually does destroy the computer encampment there will still be gold left for the player to harvest, which makes the game run faster and is more fun than grinding out a victory with limited resources.”

Categories
computer games dev-process games design iphone

Made an iPhone game in 2hrs 15mins (native code)

How slow is making iPhone apps using native code?

You have to write HTML5, right, if you want FAST app development on iPhone? Or Unity? Or cocos2d?

Right?

Or … write it in Objective-C … a beginner-friendly “native” language: 2 hrs and 15 mins to create the artwork, design the game, code it in native Objective-C, debug it, and push to iPhone devices

NB: first half shows: “Collect the fish, avoid the dynamite, grow bigger!”
Second half shows: “if you hit dynamite, you shrink; when you’re tiny, if you hit dynamite, you’re fishfood :(”

For the love of … WHY?

Because I entered a voluntary “48-hour game jam” (you have one weekend to make a game), and last time I went to the Apple shop for a repair, they dislodged my network card. It fell out, internally, and it’s not user-fixable (believe me, I tried – even specialist screwdrivers aren’t enough :( ).

So I did something else with my weekend. But a few hours before the competition deadline, I figured “what the heck; what could I do in a couple of hours?” … with some encouragement from The Mighty Git.

The code?

222 lines of code, including comments, blank lines – and code that I commented out because I replaced it with other code.

That’s all it takes for a working, playable, iPhone game.

…and the art?

You can’t see it from the video, but the art is resolution-independent – as your whale gets bigger, it re-renders, so that all the curves ALWAYS have razor-sharp edges. No effort required on my part.

I did all the artwork in Inkscape (free image editor for vector images), and saved as SVG (web-standard for vector images).

Then, courtesy of the open-source SVGKit project (renders vector images on iOS, because Apple doesn’t add support to their libaries – shame), and the following few lines of code:

	self.sivWhale = [[SVGKImageView alloc] initWithSVGKImage:[SVGKImage imageNamed:@"whale-1.svg"]];
	sivWhale.frame = CGRectMake( 0, 0, sivWhale.frame.size.width * sivWhale.scaleMultiplier.width, sivWhale.frame.size.height * sivWhale.scaleMultiplier.height );
	sivWhale.center = CGPointMake( self.view.frame.size.width/2.0f, 0.75f * self.view.frame.size.height );
	[self.view addSubview:sivWhale];

If that looks rather like using a built-in UIImage and UIImageView … it’s because it’s intended to. SVGKit adds a new type of image – SVGKImage – that’s almost the same as an Apple UIImage, except it’s better (it’s resolution independent). And the SVGKImageView does for SVGKImage what UIImageView does for UIImage…

Want the code?

Sadly, the version of SVGKit I used here has some bugs in it – it’s live at: https://github.com/adamgit/SVGKit/tree/transforms – but until it’s been tested and fixed by the SVGKit maintainers, it won’t appear on the main SVGKit project page.

So, feel free to use that link and play with it – but be warned: it’s NOT as stable as the main SVGKit. Yet.

Categories
computer games games design

Idiot-proof, physics-based, Martial arts arcade game

Toribash is, simply, awesome. You need no knowledge, you work in bullet-time, deciding which limbs to bend or stiffen, and see a second-by-second preview of what each change would do. String them together, build jaw-dropping martial arts attacks.

The build quality’s poor (no docs, no installer, poor handling for savefiles, etc) – but it’s great fun, and easy enough to understand with just a little clicking around. Play it now!

Categories
games design startup advice

MakieWorld raises $1.4m funding for digital-to-physical toys

http://gigaom.com/europe/makie-future-doll-toy-funding/

“We’re making toys using game data and 3D printing,” explains Alice Taylor, Makielab co-founder and CEO. “We call ourselves a smart toy company, and for us that means there’s a digital side to it by default.”

The company slogan is “the action doll you design”, and here’s the concept in a nutshell: you hit the Makie website and create your own avatar, choosing from a range of shapes, sizes, features and outfits — the kind of thing that’s recognizable from all kinds of MMOs, virtual worlds and kids’ games. But then comes the magic: press a button and you get your digital figure turned into the real thing, produced as a one-off in bone-white plastic using cutting edge manufacturing techniques.

Congrats!

Categories
games design

Realm of the Mad God: Design Ideas, #1

(back to playing RotMG again)

1. the Oryx assault: make it more inclusive, more multi-player

Background: sooner or later, players learn that it is impossible to gain anything from the (compulsory) assault except level-ups. The assult is grouped into 3 separate squads of players, each of which have their own route into the center. There is an advantage to being first to the center – you get a chance to do damage to Oryx sooner, and get access to the portal in to his inner sanctum before the other squads.

Problem: 99% of players are guaranteed unable to enter the inner sanctum. They might as well quit before they start. 1% of players are almost certain to get into the sanctum – but need the help of their squad.

Change: Record which “squad” each player arrives in, and award a “squad bonus” to the squad whose player enters Oryx’s sanctum first.

Details:

  • hilight the players in the squad who have the necessary items to enter sanctum (e.g. with a glow)
  • use different shades of yellow on the map for the different squads, making it clear which squad is ahead
  • each time a player enters the sanctum, announce it in global chat, along with the squad ID (1, 2, 3 etc)
  • every player in the squad is credited with a temporary or consumable boost, e.g. one of:
    • +10% def bonus, temporary, lasting 5 minutes real time (rounded up – e.g. 8 def = +1 def; 13 def = +2 def)
    • +300hp pot, soulbound

Summary: Oryx assult becomes more competitive, more meaningful – and actually worthwhile for the lower-level players. Most importantly, the massive risk (very easy to die during the asssault) has a (potential) reward. The reward is temporary/consumable, so has no long-term effect on power inflation.

Categories
games design games industry games publishing

Lvl 50 on Kongregate; how many games industry people say the same?

I’ve played many hundreds – probably over a thousand – games on Kongregate alone, now.

On top of all the thousands I’ve played on console, PC, flash, handheld, mobile, etc.

I feel pretty confident in analysing game mechanics, and success/fail reasons for given game-designs, based off my extensive experience.

I frequently use my knowledge to influence design decisions and programming decisions in the games I work on.

But how many people in the games industry can say the same?

Hmm.

(PS: many people claim to “have no time to play games – too busy working”; my view has always been: if you really care about the art and the craft of this industry, you’ll make the time. No question about it)

Categories
games design

NASA cloud satellite data animation – hourly bitmaps?

I can’t find this. NASA’s web presence (in their defence, they have a **** tonne of data) is damn hard to navigate for simple queries (i.e. anything that’s not highly-specific, PhD material). I’ve found the “12 months of the year blue marble” dataset that gives you: Earth, without clouds.

And that includes a single momentary snapshot of: Earth, with clouds.

But – surely – somewhere there is “24 hours of clouds moving around earth”? Can’t find it! Help?

Categories
amusing games design

WTF is an Archveult?

One of the peculiar distinctions of Jack Vance’s writing is that he vomits obscure words onto the page as if he’d just eaten a dictionary that severely disagreed with him. Sometimes he seems to be parodying his characters – but other times he happily does it for himself.

To be clear: I’ve never seen him mis-use or abuse a word. When you know what all the words mean, it’s a joy to read (although he uses very few words – preferring to use the exact correct – single – word … than to use 10 more commonly-known words to describe the same thing)

Many of them I know – although I know that most people don’t. But at least as many I *don’t* know – although I do recognise them as genuine English words.

And then, occasionally, you meet an Archveult. And then it gets interesting.

JustF***ingGoogleIt: Google: Archveult

The only dictionary hit I could find was an evil bit of SEO that claimed – in the lies it told Google – that it held a definition for the word, but actually just provided a page that said: “I think you mistyped XXXX instead”.

Next step: commercial, offline, paper dictionaries. Real ones, Shakespearean ones, etc.

In the meantime, my best guess – and this is rather funny if true – is that it’s a deliberate portmanteau of “Archmagician” and “La Reyne le Veult” (the Royal Assent). Because the only story I’ve found it in so far (where the word is used repeatedly) is about an (almost) all-powerful woman attempting to conquer the universe by turning all men into women.

(and read the story before you get too excited by that)

Filed in “game design” because … well.

Categories
entity systems games design network programming networking programming

Concepts of “object identity” in game programming…

Hume just posted his Lessons Learned from the warmup for Ludum Dare 23 (48 hours to write a game from scratch – starts this weekend!) – and his positive experience using an Entity System.

In his epic comment (sparked by a different Adam – not me, honest), is this gem:

“Using the entity system for the first time was unreal to me. It’s like polymorphic code. I did really weird things on the fly. For example:

– In the health processor, if the enemy was just destroyed, set a flag in the lifecycle component.
– In the lifecycle processor, if the fresh kill flag is set, extract its loot component and put that into a new entity with a small randomized velocity component and a gravity component so that the loot drops; then, remove most of the other components from the entity and add an explosion component.

The “enemy” still has the same entity ID — any other components that are looking for that entity will still find it (e.g. missiles homing in on the wreckage, or score processors looking for slain entities) — but by swapping one set of data with another, its implementation has changed from an enemy to some kind of non-interactive effect object.”

(emphasis mine)

Identity. It’s important.

(Quick sidenote: for all the people asking questions like “but … which variables do I put in Component A as opposed to Component B? How do I manage Events in an Entity System? … etc” – Hume’s approach above is a good concrete example of the first-draft, easy-to-write way of doing things. Copy it.)

Identity in games

This is one of those things that newbie game programmers seem to underestimate, frequently.

And when I say “newbie” I include “experienced, skilled programmers with 10+ years of coding experience – but who haven’t yet shipped a game of their *own*”.

(e.g. I’ve seen a couple of studios that started as Digital Agencies, or as Animation Studios, etc – that then transitioned to writing their own games. This is the kind of thing that they often struggle with. Not for lack of skill or general programming experience, but for lack of the domain-specific experience of game coding)

Examples of Identity in games, off the top of my head – all of these are independent, and interact in complex ways with each other :

  1. Game-role: e.g. … “enemy”, “powerup”, “start location”
  2. Code ‘object’ (in OOP terms): e.g. … “the sprite you are drawing at position (4,5) is part of Object X. X is coloured THIS colour”
  3. Gameplay ‘object’: e.g. … “the sprite at (4,5) represents a Tank. If a Tank sprite ever touches a Glass sprite, we need to play the Broken Glass noise”
  4. Physics element: e.g. … “5 milliseconds ago, our Physics Engine thought this thing was THERE. Now it’s over HERE. Don’t confuse the Physics Engine! Make sure it ‘knows’ they are the same object – not two separate objects”
  5. Network “master/clone”: e.g. … in multiplayer, there are N copies of my avatar: one per computer in the game. One of those N is the original – and changes to the original are constantly used to overwrite the clones; changes to clones are LOCAL ONLY and are discarded. Which is original? What do we do with incoming “changes” – which local Code Object do we apply them to? (your Code Object will be different from my Code Object – but they’ll both be the same identical Network Object, save mine is flagged “clone”)
  6. Proper Noun object: e.g. … “The Player’s Tank” is a very specific tank out of all the Tanks in the game. Many lines of game code don’t care about anything except finding and operating on that specific tank.
  7. Game-Over representation: e.g. … after the player has killed all the enemies, and they see a Game Over (won/lost/etc) screen, and you want to list all the enemies they killed … how do you do that? The enemies – by definition – no longer exist. They got killed, removed from the screen, removed from memory. You could store just the absolute numbers – but what if you want to draw them, or replay the death animations?
  8. …etc

Identity in Entity Systems

ES’s traditionally give you a SINGLE concept of Identity: the Entity (usually implemented as a single Integer). Hmm. That sounds worryingly bad, given what I wrote above. One identity cannot – by definition – encompass multiple, independent, interrelated identities.

But we’re being a bit too literal here. ES’s give you one PRIMARY identity, but they also give you a bunch of SECONDARY identities. So, in practice…

Secondary Identities in an ES

In OOP, the Object is atomic, and the Class is atomic. You cannot “split” an Object, nor a Class, without re-defining it (usually: re-compile).

In ES, the Entity is atomic, and the Component is atomic. But the equivalent of an OOP Object – i.e. “an Entity plus zero or more Components” – is *not* atomic. It can be split.

And from there comes the secondary identities…

A Primary Identity: e.g. “The Player’s Tank” (specific)
A Primary Identity: e.g. “a Gun Component” (generic)

A Secondary Identity: e.g. “The Gun component … of the Player’s Tank Entity” (specific)

Revisiting my ad-hoc list of Game Identities above, I hope it’s clear that you can easily re-write most of those in terms of secondary identity.

And – bonus! – suddenly the relationships between them start to become (a little) clearer and cleaner. Easier for humans to reason about. Easier *for you to debug*. Easier *for you to design new features*.

Global Identity vs. Local Identity

Noticeably, the network-related Identities are still hard to deal with.

On *my* computer, I can’t reference entities on *your* computer. I cannot store: “The Gun component … of YOUR player’s tank”, because your “Player’s Tank” only exists in the memory of your computer – not mine.

There are (trivially) obvious solutions / approaches here, not least: make your Entity integers global. e.g. split the 64bit Integer into 2 32bit Integers: first Integer is the computer that an Entity lives on, the second is the local Entity Integer. Combined, they are a “global Entity ID”.

(I’m grossly over-simplifying there – if you’re interested in this, google for “globally unique identifiers” – the problems and solutions have been around for decades. Don’t re-invent the wheel)

But … at this point, they also offer you the chance to consider your game’s network architecture. Are you peer-to-peer, or client-server?

For instance, P2P architectures practically beg for unique Global entity numbers. But C/S architectures can happily live off non-global. For instance:

  • On each client, there are ONLY local Entity numbers
  • When the client receives data from the server, it generates new, local, Entities
  • …and adds a “ServerGenerated” component to each one, so it’s easy to see that they are “special” in some ways. That component could hold info like “the time in milliseconds that we last received an update on this object” – which is very useful for doing dead-reckoning, to make your remote objects appear to move smoothly on the local screen
  • The server *does* partition all entities from all machines. But none of the clients need to know that

Or, to take it further, if your network arch is any good at all for high-paced gaming:

  • The server differentiates between:
    1. The entity that the game-rules are operating on
    2. The entity that client 1 *believes* is current
    3. …ditto for client 2, client 3 … etc (each has their own one)
    4. The entity that the game-rules accept (e.g. if a hacked client has injected false info, the game-rules may override / rewrite some data in the local object)
  • The server also tags all the entities for a single in-game object as being “perspectives on the same thing”, so that it can keep them in synch with each other
  • The server does Clever Stuff, e.g.:
    • Every 2 milliseconds, it looks at the “current entity”, and compares it to the “client’s belief of that entity”. If it finds any differences, it sends a network message to the client, telling it that “you’re wrong, my friend: that entity’s components have changed their data. They are now X, Y and Z”

… or something like that. Again, I’m grossly over-simplifying – if you want to write decent network code, Google is your friend. But the fastest / lowest latency multiplayer code tends to work something like that.

How?

Ah, well.

What do you think?

(hint: you can do wonders using Reflection/Introspection on your entity / components. By their nature, they’re easy to write generic code for.

But you WILL need some extra metadata – to the extent that you may wish to ‘upgrade’ your Entity System into a SuperEntity System – something with a bit more expressive power, to handle the concept of multiple simultaneous *different* versions of the same Entity. Ouch)

Yeah, I’m bailing on you here. Too little time to write much right now – and it’s been a *long* time since I’ve implemented this level of network code for an ES. So, I’m going to have to think hard about it, refresh my memory, re-think what I think I knew. Will take some time…

Categories
entity systems games design MMOG development programming

Entity Systems: integrating Box2D with Artemis

Thanks to Mike Leahy for spotting this:

http://blog.gemserk.com/2012/02/02/how-we-use-box2d-with-artemis/

…a short blog post (with code) on how a team is integrating Box2D (a very well known open source physics lib) with Artemis (a java implementation of Entity Systems which starts from the same point as my Entity Systems posts, but fleshes it out)

Categories
computer games design games design network programming

Realm of the Mad God – a great game, interesting monetization

I’ve recently been playing the excellent Realm of the Mad God – a very fast-paced 2d co-operative shooter. My feeling is that it’s going to be one of the most important games of 2011/2012, as it continues to grow in popularity. Typical experience of this game is that within 30 seconds of being dumped into the main level, you’re surrounded by monsters, and then surrounded by other players, all on the same screen as you, blasting away in a rainbow of colours.

Sounds good. As if that’s not enough … it’s the guys who’ve been working with AmitP (Amit J Patel) (Amit maintains one of the best up-to-date collections of links and algorithms for indie game-developers). If you haven’t seen Amit’s pages, I recommend browsing through the blog – his links collection is OK, but his blog posts on algorithm design are excellent. If you get as far as the posts on “how I auto-generated a realistic 3D-world”, you may notice a striking similarity to the 2D worlds used in RotMG …

Anyway, it parallels an idea for an MMO shooter I’ve had kicking around for a long, long time. For me, it’s been a delight to see what works (and doesn’t) about the core ideas. The RotMG authors have done a great job of making a fast, simple, quick, easy-to-grasp game.

The Good

Fast. No barriers to play

This is how MMO-shooters should be: fast, furious, permadeath – but very quick to get back into the fray. You should expect to die tens of times every hour.

Permadeath – but paralled with some perma-advancement

Your progress is split evenly between items (which can be banked) and avatar stats (which are lost forever upon death).

Perma-advancement increases variety, unlocks new features

With 10 classes, there’s plenty of variety – and each class can only be unlocked by achieving a minimum level of progress with one or more other classes.

NB: this part could be improved and expanded IMHO. In particular, the classes are wonderfully varied – but merely unlocking classes isn’t enough these days. Plenty of games have shown that permanent-unlocks work best when there’s a variety of game-features in there. Also, the classes themselves would work better if there were some cross-effects (c.f. Diablo 2’s Lord of Destruction expansion, which had abilities in one class improve abilities in your older classes, re-vitalizing them for re-play)

Free game, paying is optional – payment kicks in when you’re most bought-in to the design

Free players get a tiny storage for permanent items (1/50th of what paying players get – it’s not enough! … so pay!), and are only allowed 1 class “alive” at once.

In a delicious twist, if you don’t pay for the game, the only way to take advantage of a newly-unlocked class is … to commit suicide … since you’re only allowed a single character per account (unless you pay)

You can ONLY benefit from other players, never suffer

(there’s actually a case where you can suffer, sadly – Thief’s get killed as a secondary-effect of other players teleporting to them, since the game doesn’t have a “prevent people from teleporting to me” flag)

This is the one that should have most wannabe-MMO-designers sitting up and paying attention. If you group-up with other players:

  1. You all get the same experience-points as if you’d single-handedly killed every monster
  2. You get the points just for being nearby – no need to score hits just to “tag” it for yourself
  3. Mob strength is constant, but player damage is multiplicative on number of players present

Net effect:

Every player is willing and eager (*) to collaborate with every other player, without words being exchanged, without fear of being ripped-off.

In a game that’s fast paced and frantic, you don’t have to keep pausing to negotiate. Other players can ONLY benefit you, so … run with them.

(*) – or just ignores the other players. Their presence doesn’t provide negative impact on you. It’s only their absence that is negative (in game-design terms).

Interesting design choices for lag

As a real-time game with dozens of players on screen at once, lag is guaranteed to effect gameplay. We’re always saying “try to work around lag through game-design changes”, so here’s the decisions they made:

  1. When packets are lost, everything moves in exactly the same direction it was going, at exactly the same speed, forever
  2. “Speed” used above is the “on-screen speed, including any rubber-banding effect”
    • FAIL: this means monsters and players often move MANY times faster than they are allowed to – so that when the lag stops, the side-effects are magnified
  3. Your avatar can’t be hit NOR damaged while it’s missing packets from the server
    • For the early parts of the game, this *almost* completely fixes lag problems
  4. Projectiles (bullets etc) that your client didn’t receive are queued up and sent to you all in one go once the packet-dropping stops
    • FAIL: this multiplies the damage output of enemies (NB: not players!), breaking all the designed-in balance in the game
    • In mid to late game, this ruins the gameplay – players end up running around never seeing a single enemy, because if you’re close enough to see it, a single flicker of lag will cause you to receive ZERO damage initially, followed by MORE damage than the monster is capable of – delivered instantaneously
  5. The client is authoritative on player liveness/death
    • MILD FAIL: in effect, coupled with the other features of the game, and the lack of lag compensation … this means you CAN and SHOULD (and, for some cases, effectively: MUST) cheat. You can run a bot on your machine – and if the network is less than perfect, you have to, in order to play the game properly.

Overall, apart from the massive security flaw (where anyone could write a bot to be invulnerable – and the developers are encouraging them to do so), it seems very close to a good solution for an MMO shooter.

I’m surprised by the way they approached the “save up the enemy bullets, then unleash them all at once”. My guess is that it wasn’t designed, it was just an accident: maybe they took a slightly lazy approach to compensating for lag (they don’t), and the net effect is this. It looks very much like what you get when using TCP for game-data packets (I really hope they’re not using TCP; if so, most of the lag is the developers’ own fault)

The Bad

I’ve unlocked half the classes, and looked at what classes other people play (and which classes rise high on the leaderboards). There’s good variety, and almost all the classes get used – even the beginning class, the one you get for free, works well.

Except one.

Unfortunately, at around 50% through unlocking the special classes, one of the classes is horribly unbalanced. The Assassin (which is supposedly an upgraded Thief – but is a massive downgrade) is almost impossible to play. The special ability fails completely when there’s lag (which is frequent in this game), and the class is the weakest, lowest-range of the lot. Looking around, you rarely see Assassins (I suspect: you only see them when people are desperately trying to upgrade them, to get past this dull and frustrating point in the upgrade tree).

Worse, because the *only* way to unlock the higher level classes is to reach the level cap with this class … you’re forced to play it. Over and over again. Watching the bad game-design … over and over … and over … again.

Every time the assassin dies, it’s like another twist of the knife:

We know you don’t enjoy this

We know that a mistake in our game design has you stuck here

(and our overall game design makes that “mistake” into “a disaster”)

We know that this whole process is turning “a class that wasn’t much fun” into “a class you hate”

And there’s nothing you can do about it!

So, single-handedly, it’s driven me to *not* purchase any game credit. I’d enjoyed the game enough to that point that I’d already decided to buy it – and if this had been on iTunes, I’d have paid already. But since it’s not an iPhone/iPad game, and paying for it is a bit more difficult, I hadn’t made the payment yet.

As it stands, I’m still playing occasionally, but now it’s for research rather than for enjoyment, which is a great pity.

Monetization: money thrown away

I think the developers are missing an ENORMOUSLY successful way to make money from this game. In fact, it’s so big, I suspect they could increase their revenues by a substantial multiplier.

With a permadeath game, there really is no need to actually delete the dead character. If the player isn’t paying, they are forced to kill their character sooner or later to change characters.

Taking a leaf from Flickr’s book, why not keep ONE single character in storage, with a tempting “buy now, for goodies *and to have this one returned to you, ready to play*”?

I’d set it so that when you change class (if you’re a free player), only the last character of the PREVIOUS class is retained. If you switch from Warrior to Knight, you can die many times as a Knight, and your Warrior remains on ice. But if you then grow tired of the Knight and switch to a Rogue … the Warrior is tipped out, and replaced with the last Knight you had.

i.e. you setup the exact flow of decision-making and options and “safety” that the player would have had, if only they’d purchased sooner, and allow them to benefit from it retroactively – if only they make the decision to pay.

Of course, it’s a very limited “retroactively” – it’s a sampler, to let you see the benefits of paying.

(*) – Flickr’s early promise was “upload your photos in highest resolution, you can view them for free – but only low-res versions. HOWEVER, we keep the high-res versions for you – forever, for free – until you decide to purchase a subscription. At which point, not just your new photos, but ALL your photos, become magically available at highest res”. It was a great way of simultaneously offering a high-value to paying customers, while making non-paying customers feel they weren’t committing themselves to loss. It reassured a lot of potential customers at a time when Flickr wasn’t yet famous, and most people weren’t yet “hooked” – it bridged that gap.

Analyse this

So, the interesting question is: how common is this problem?

Are the dev team correlating “players who pay” and “the point at which they pay”?

More importantly, are they correlating “players who DON’T pay” and “how their experience differed from the average”?

The last time I saw an MMO with a level-based kick in the teeth this bad … was in Tabula Rasa. We had a point where poor signposting by the quest designers meant many players were given quests that were many levels too hard for them, and effectively impossible to do. Those players died over and over and over again in a short time – and they hated it.

The dev team knew “you’re not supposed to do that quest”, but often they (randomly) gave it to new players as the first quest. I wasn’t privy to the arguments over whether this needed to be changed (and there were definitely arguments), but I did see the analytics that eventually got produced. They showed an almost perfectly smooth, averaged, graph of player behaviour – bar a big notch at this particular location. It stuck out like Rudolph’s nose on a snowy day.

I wonder if there’s a similar notch in RotMG? For a game that’s almost *designed* to drive people to rage-quit … what stats do they see on “what the last thing was before a player stopped playing forever?” … and what stats do they see on “…stopped playing for a long time, but eventually came back”?

Categories
computer games games design games industry games publishing iphone

TCE iPhone Games by Indie (and mainstream) Game Professionals

TheChaosEngine – private forums hangout for games-industry professionals. There’s an epic thread on there where people post projects they / their team / their employer has published on iPhone. It’s currently 40 pages long, so I went through and pulled out the links to the iTunes pages for each game.

NB: these run the gamut from “my first iPhone app” to “large-team of developers working for multinational publisher”. Quality here will vary hugely – YMMV!

Also, interesting to note … these are listed in order of posting to the forums, so … as you go down the list, you’re seeing an evolution over time of personal/indie (and occasionally “big team / AAA”) games on the app store.

TCE games, in first-launched order (earliest first)

  1. http://toucharcade.com/2008/12/12/ivory-tiles-a-unique-iphone-puzzle-game/
  2. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=298060143&mt=8
  3. http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=289208006&mt=8
  4. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=303057162&mt=8
  5. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=305889055&mt=8&s=143441
  6. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=307740243&mt=8
  7. http://zenbound.com/itunes
  8. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=307117698&mt=8
  9. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=311115651&mt=8
  10. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=318996099&mt=8&s=143441
  11. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=317781445&mt=8
  12. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=321510472&mt=8
  13. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=323694495&mt=8
  14. http://bit.ly/ifistchaosengine
  15. http://appshopper.com/utilities/isundial-2
  16. http://bit.ly/qqq_iphone
  17. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=333962577&mt=8
  18. http://itunes.com/app/Coretex
  19. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=334682266&mt=8
  20. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=334683021&mt=8
  21. http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=335955369&mt=8
  22. http://tinyurl.com/yc9bpr5
  23. http://itunes.apple.com/us/app/revz/id352513901?mt=8
  24. http://itunes.apple.com/gb/app/fm-2010/id352933624?mt=8
  25. http://itunes.apple.com/gb/app/koan/id366816832?mt=8
  26. http://itunes.apple.com/us/app/tiki-towers/id298127125?mt=8
  27. http://ultrablast.net/
  28. http://bit.ly/aurifi_itunes
  29. http://itunes.apple.com/gb/app/denki-blocks/id371685186?mt=8
  30. http://bit.ly/yatr_iphone
  31. http://bit.ly/qqq_worldfoot
  32. http://itunes.apple.com/au/app/gamebook-adventures-2-the/id375065935?mt=8
  33. http://itunes.apple.com/app/id356565414?mt=8
  34. http://itunes.apple.com/app/reckless-racing/id386234787?mt=8
  35. http://itunes.apple.com/gb/app/tiltstorm/id392545121?mt=8
  36. http://itunes.apple.com/us/app/awakening-the-dreamless-castle/id386161821?mt=8
  37. http://itunes.apple.com/au/app/gamebook-adventures-1-an-assassin/id352871101?mt=8
  38. http://itunes.apple.com/au/app/gamebook-adventures-4-revenant/id395652668?mt=8
  39. http://itunes.apple.com/gb/app/cricket-captain-2010/id406333955?mt=8
  40. http://itunes.apple.com/us/app/pocket-frogs/id386644958?mt=8&partnerId=30&siteID=0JkCNyaaKoo
  41. http://itunes.apple.com/us/app/sky-burger/id311972587?mt=8&partnerId=30&siteID=0JkCNyaaKoo
  42. http://itunes.apple.com/us/app/scoops-ice-cream-fun-for-everyone/id291591378?mt=8&partnerId=30&siteID=0JkCNyaaKoo
  43. http://itunes.apple.com/us/app/dizzypad-frog-jump-fun/id357104694?mt=8&partnerId=30&siteID=0JkCNyaaKoo
  44. http://itunes.apple.com/us/app/textropolis/id301643671?mt=8&partnerId=30&siteID=0JkCNyaaKoo
  45. http://itunes.apple.com/gb/app/kamicrazy/id299644692?mt=8
  46. http://itunes.apple.com/us/app/bubble-dreams/id400309976?mt=8&ls=1
  47. http://itunes.apple.com/au/app/gamebook-adventures-5-catacombs/id422246290?mt=8
  48. http://itunes.apple.com/gb/app/family-games/id417601428?mt=8
  49. http://itunes.apple.com/gb/app/moving-day/id395714931?mt=8&ign-mpt=uo%3D4
  50. http://itunes.apple.com/gb/app/to-fu-the-trials-of-chi/id436987555?mt=8
  51. http://itunes.apple.com/gb/app/bashi-blocks/id441051678?mt=8
  52. http://itunes.apple.com/gb/app/magnetic-billiards-blueprint/id432152950?mt=8
  53. http://itunes.apple.com/au/app/specky-mark-of-the-year/id458244379?mt=8
  54. http://itunes.apple.com/gb/app/quarrel-deluxe/id453203047?mt=8
  55. http://itunes.apple.com/us/app/death-at-fairing-point-a-dana/id445507820?mt=8
  56. http://itunes.apple.com/us/app/lap-uranus/id447548601?ls=1&mt=8
  57. http://itunes.apple.com/app/cutesy-the-quest-unicorn/id463920538?mt=8
  58. http://itunes.apple.com/app/funpark-friends/id444438531?mt=8
  59. http://itunes.apple.com/gb/app/myragdoll-3d/id444210353?mt=8
  60. http://itunes.apple.com/gb/app/puzzler-world-2/id465620717?mt=8
  61. http://itunes.apple.com/app/shark-jug/id473563382
  62. http://itunes.apple.com/au/app/mini-motor-racing/id426860241?mt=8
  63. http://itunes.apple.com/gb/app/grabatron/id481309065?mt=8
  64. http://itunes.apple.com/us/app/leapin-frogs/id487318065?mt=8
  65. http://itunes.com/apps/gravityrocks
  66. http://itunes.apple.com/app/puzzle-bonsai/id491318778?mt=8
  67. http://bit.ly/lighthousegame
  68. http://itunes.apple.com/us/app/my-coin-match/id472717295?mt=8
  69. http://itunes.apple.com/gb/app/froad/id469021974?mt=8
  70. http://j.mp/EufloriaHD
  71. http://itunes.apple.com/us/app/end-night-hd/id498102948?ls=1&mt=8
  72. http://smallgreenhill.com/ballonawall/index.php
  73. http://itunes.apple.com/us/app/rune-raiders/id497702195?mt=8

Non-chronological

These posters didn’t provide a real iTunes link – I had to hunt it down on their websites – so they’re out of order:

  1. http://itunes.apple.com/us/app/ax-raven-elite/id331999733?mt=8
  2. http://itunes.apple.com/us/app/red-card-rampage/id388957922?mt=8
  3. http://itunes.apple.com/us/app/wordsnap-contraption/id412453514?mt=8&ls=1
  4. http://bit.ly/zSf5vc
Categories
entity systems games design programming

Entity Systems: what makes good Components? good Entities?

In the ongoing, epic comments (300+ and counting!) for my Entity Systems posts, one of the recurring questions is:

What makes a good Component?
How should I split my conceptual model into Entities and Components?
How should I split my algorithms and methods into Systems?

It’s often difficult to answer these questions without concrete examples, which are thin on the ground.

Good news, then…

Paul Gestwicki runs a CS315: Game Programming course, and last year his students used an Entity System to implement their game – Morgan’s Raid. In a recent email conversation, he mentioned he’d been monitoring the actual number – and nature – of the Components and Systems that the teams developed and used on the project.

He’s now posted this list, along with some brief analysis.

All systems and Components

Read Paul’s post – there are some caveats he mentions, and there’s a useful diagram showing roughly how many systems were using each component.

I strongly recommend you play the game too (it’s free, and quick to play) so you can get an idea straight away – just from the names – what data and code some of these contain.

To recap, here’s the list:

“For your reading convenience, here’s a simple tabular view of the systems and components

Systems Components
BackgroundTileSystem
CityNameSystem
DestinationSystem
FadingSystem
GPSToScreenSystem
HoverableSystem
ImageRenderingSystem
IntInterpolationSystem
MinimumSleepTimeSystem
MorganLocationSystem
NightRenderingSystem
OnClickMoveHereSystem
OnScreenBoundingBoxSystem
RaidSoundSystem
RailwaySystem
ReputationSystem
RevealingTextSystem
SpeedSystem
StepwisePositionInterpolationSystem
SunSystem
TimePassingSystem
TimeTriggeredSystem
TownArrivalSystem
TownArrowSystem
TownUnderSiegeSystem
AnimationRenderable
ArrivesAtTownIndex
BackgroundTile
BeenRaided
CentersOnGPS
CityData
CityImages
CityName
CityPopulation
CityTargets
CommandPoint
Destination
DoesCityHaveMilitia
DoesCityLoseGame
DoesCityWinGame
GPSPosition
GPSPositionList
HasMorganGPS
Hoverable
ImageRenderable
ImageRenderLayer
InGameTime
IntInterpolated
MinimumSleepTimeOverride
Morgan
MorganLocation
MovesOnClick
OnClickMoveHere
OnScreenBoundingBox
OnScreenBoundingBoxList
PositionInterpolated
Raidable
Raider
Railway
Reputation
ReputationValue
RevealingText
Road
RoadsToCity
RouteTaken
Speed
Sun
Terrain
TimeToRaid
TimeTriggeredEvent
TownAdjacency
TownArrow
TownUnderSeige

Things I noticed straight away:

  1. There’s approximately 2:1 ratio of “components” to “systems”
  2. In Paul’s post, all the Systems are accessing *something*
  3. In Paul’s post, quite a few Components are NOT accessed
  4. A couple of components are used by almost every System
  5. The names of some Systems suggest they’re very trivial – perhaps only a dozen lines of effective code
  6. The names of some Components suggest they’re being designed in an OOP hierarchy

NB: I haven’t had time to look at the source code, but it’s freely downloadable here, so I’d recommend having a look if you have time.

How many Components per System?

I’ve generally started people off with: “aim for 1:1 ratio”. This is mainly to kick them out of the traditional class-based OOP mindset. In practice, there’s really no need to stick to that religiously – once you get the hang of ES design, you should be freely adding and subtracting components all over the place.

In reality, the pressures on “number of systems” and “number of components” are independent. Ideally, you add a new system when you have a major new concept to add to your game – e.g. “previously I was using hand-made jumping, now I want to add a complete physics-driven approach. This will mean changing collision-detection, changing the core game-loop, etc”.

Ideally, you add a new component when you have a new “dimension” to the game objects. For instance, if you’re adding a physics System, you may not need to add any new Components – it might be that all you need is Location (containing x,y,x position and dx,dy,dz velocity) and RenderState (containing screen-pixels x,y) – and that you already have those components.

Zero systems per component

One of the advantages of an ES is that old code can just fall off the radar and disappear. So I’m not surprised at all to see some components that appear to be unused – and it’s MUCH easier to simply delete this code from your project than it would be on a traditional OOP project. Does anything reference that data? If so, it’s a set of particular systems. For each system, you can look at MERELY the system and the component, and make a very quick decision about whether you still need this access – or if you can refactor to move (some of) it somewhere else. The amount of code you need to read to make such decisions safely is typically very small – i.e. easy, quick, and less error-prone.

Many systems per component

This is fine. However, it can also be an early-warning sign of a design or code-architecture bug. Sometimes, there are components that – innately – are just needed all over the place. For instance, in a team-based game, the component saying which “team” a given object/player/item/building belongs to is likely to affect almost every piece of algorithm code across the board. It’ll be referenced by many systems.

On the flip-side, it may be a sign that you’ve put too much data into one component. There are two usual versions of this:

  1. You have – say – 8 variables in the struct where you should instead have two structs (components), one with 5 variables, the other with 3.
  2. You have – say – 4 variables in the struct, but different systems are using those variables to mean different things. It works OK for now, but it’s very fragile – as soon as the different meanings diverge even a little, your code is going to start breaking

Of course, you get this exact problem in traditional OOP setups, but with an ES it’s trivial to fix. Split – or duplicate – the Component, change a few references in the Systems, and you’re done. If it turns out a week later that the split wasn’t necessary – or worse, was a step backwards (e.g. you find yourself frequently synching the data between those components) – it’s extremely cheap to swap it back.

By contrast, with OOP, this is a nightmare scenario, because you have to worry about every method on the original class. Does that method:

  1. Need to exist on both the new classes, or just one?
  2. Work correctly for the new class it will be on – or does it currently rely on some of the data (and shoudln’t) and will need to be re-written?
  3. Get used by other parts of the codebase in ways that will break if/when you split the class?

Thoughts, Suggestions?

…this is just a lightning quick analysis, but I strongly invite you to do you own digging into the classes – and the codebase – and come up with your own thoughts and feedback. We have here a convenient, real-life, list of components/systems – something to dig our teeth into, and debate the rights and wrongs of each decision. And I’m sure the students involved on the project would be interested in your feedback on their approaches :)

Did this post help you?

Support me on Patreon, writing about Entity Systems and sharing tech demos and code examples

Categories
games design games industry games publishing

Game Pitches – actual pitch docs from real games

http://www.gamepitches.com/ (just discovered this, via TCE):

The repository for video game pitches and design documents

This site serves to be a free resource to game designers offering them the web’s largest single collection of game design documents and game pitches.

It says “resource got game designers”, but … pitch documents are hugely valuable to anyone working on the business/funding side too. (there are two aspects to the site – design docs, and pitch docs).

There’s some good stuff on there – from the GTA design doc to Spider’s original concept doc. Note to fledgling designers: they’re impressively brief and succinct!

…and if you work for a studio or publisher, perhaps you could ask about getting some of your company’s old pitch/design docs put up online?

Categories
games design iphone programming

Using Genetic Algorithms to playtest an iPad game

Looks like a “normal” KickStarter project for a new Tower Defence game.

Halfway through the demo video, it switches to “here’s how I’ve been using GA to detect game-design flaws, and to test ideas in tweaking game design”.

Something I’ve wanted to do for more than a decade, but could never find a company who’d take it seriously :). I really hope this iPad game does well – would be great to see a poster-child / real-world demonstration of a workable technique here.

Categories
computer games games design iphone programming

New game (Risk clone) – need SVG maps!

As a free-time project, I’ve been writing a Risk clone (*) for iPad.

One of the bits I like best right now is that you can give it the URL of *any* SVG file on the web, and it automatically turns it into a Risk map.

(e.g. all the maps in Wikipedia articles are SVG files – it’s a common file format with good browser support)

This was one of those “interesting” technical challenges – I had to find an algorithm that would automatically work out which territories a human would “assume” were connected to each other.

I’m using an open-source SVG library which works fine for basic SVG files but has a lot of bugs with the more esoteric ones. I’ve already fixed a few of the major bugs (they’re now merged into the GitHub project) – but I’d like to get more SVG files to test with.

The one thing to bear in mind is that the colour-data gets wiped when it imports. So … SVG files that make heavy use of different colours or gradient-fills/pattern-fills lose detail when imported.

Also, files where none of the elements are close enough to be deemed “connected territories” … work poorly.

Everything else works fine.

So … if you’ve got any, please post a comment here with URL, or email them to me directly (address in the About link at top of this page).

(*) – I say “clone” because it’s the same genre – but the gameplay is “fixed” quite a lot. If you once loved Risk, but grew to hate it, you’ll see why I wanted to change the baic game design :).

Categories
games design

GDC 2012 Rejection

Against my own advice, I submitted an eleventh hour proposal for the 2012 GDC. I’ve fallen in love with San Francisco, but I’m in two minds about going next year, it seems to have too much of E3 about it. The simple beauty of a conference for games people, about games, feels washed out and faded away.

“While we can’t comment on why individual submissions were declined due to the high volume of submissions received, be aware that it can often be due to multiple reasons — many of which have nothing to do with the professionalism or quality of the talk proposed.”

The more time I spend around inspirational people, the more I realise that it is never acceptable to refuse reasons for a decision. Usually, the reasons are things you’d rather not hear – criticisms too close to the bone, complaints too painful but fair – but they are things you need to hear anyway, to have a decent chance of moving forwards as a person.

CMP / Think Services is in the unenviable position that they own the only global event that speaks for mankind’s total relationship with computer games. I’m sure it seemed like a good commercial play at the time – but how fair is it that they now must shoulder the total face-time of every step forwards in the art and science of game development? Tough crowd, if you ask me.

Or is there some other (non judgemental) forum for face-to-face game design that I’ve missed?

Categories
android computer games dev-process games design programming

Prototyping: Chess Quest v0.4

(I’m prototyping a new game (working title: “ChessQuest”) – original post here)

Major changes:

  1. Enemies have health, and can be killed by touching them
  2. Performance is another 30% faster (should be running OK on most phones now?)
  3. Enemies have a direction indicator (not necessary right now, but it’ll become important in a later version…)

Download link

Chess Quest-0.4.0

Categories
agile games design programming

16 KB Game Competition (winter 2011) – Java

http://www.java-gaming.org/topics/lwjgl16k/25093/view.html

“the LWJGL16k competition starts right here, right now.” – Cas

The rules

First deadline: 25th November 2011
First task: get a black screen running using LWJGL

“you’ve got 7 days. All I’m looking for at this stage from you is a blank window opening up and maybe a rotating square or whatever. Of course complete games are even more welcome but the idea is to get something shipped.”

Well, what are you waiting for?

If you’ve got Eclipse installed, all you need do is download the LWJGL library, copy/paste the 50-line minimal project from the Wiki, and submit your entry!

(I believe Cas is onto a good thing here … force people to realise how easy it is to make a game if you focus on small-but-visible steps done *quickly* – No more procrastination!)

Categories
android devdiary games design

Prototyping: Chess Quest v0.3

(I’m prototyping a new game (working title: “ChessQuest”) – original post here)

Three major changes:

  1. You have a health bar, and can die
  2. The trackball is now supported for movement
  3. Performance is literally 1.5x – 2x faster

Download link

Chess Quest-0.3.3

So, a friend of mine tried it out today, and he couldn’t move around at all – something wrong with his HTC Desire (even though I’ve been testing on near-identical phone, for some reason his phone was losing the input gestures). This evening I did some improvements and fixes until it began to work “tolerably” on his phone – and I threw in some new small features too.

It’s still test stuff – not indicative of the final gameplay, but I’m trying out different basic ways of achieveing the stuff I want to achieve in the later versions.

Overview of what’s changed

  • You have a very basic HUD
  • There’s a couple of coloured powerups scattered around – red restores health, green increases maximum health permanently
  • Enemies actually kill you now, every moment you’re touched by one, your health drains continuously
  • You can choose different levels at the start – I included one of the early test levels that was easy for me to upgrade with recent changes. I’ve got another one I can probably add quickly later (one which generates 100% random mazes each time you play)
  • The ultra-simple EntitySystem I’m using was running too slow. There’s no simple fix I can see – the ES really needs to be written for performance, if I want it to be high performance – but I was able to do a 10-lines-of-code workaround that took the worst piece of bad performance in my game and made it literally 5 times faster. That’s good enough for now!
  • Input system has changed *again* – the Android OS has poor input management, a bit buggy, with an inconsistent programming API, which *also* runs differently on different phones – so I keep trying to do as little work on this as possible. The Android OS is desperately trying to prevent me from doing any prototyping at all – it’s begging for me to write hundreds of lines of code to make up for Google’s inattention there – but if I do that, I will lose all the time I would have spent doing game design and dev, and the whole project will be a failure. So, yet again, I’m putting on a band-aid and dodging the rest for now. But … at least now you can use trackball instead of / in addition to swiping on the touchscreen
  • There’s an FPS counter on the screen