OK, a completely different approach this time (based on the “new technique for Render to Texture” that I mentioned last time). And it works a lot better – lighting, shaders, etc is all there for free (but something is wrong with the side-to-side)
TL;DR: A couple of things that jumped out at me:
- The total dev team for Skyrim (TES 5) is 90 people (less than normal for this size game)
- Oblivion (TES 4) had a mere 45 staff!
- They strategically embrace modular levels as the way to produce enough content in time
- …Added together: explains the recurring Art problem in Elder Scrolls games, where after an hour or so everywhere starts to look very similar
- …NB: while I resent that (and I know many people who won’t play the games, they hate it so much), the tradeoff is IMHO worth it: broad story-content in a huge world. So it’s a big loss, but a compromise I’ve always been willing to accept as a player
- …in the article, they call this “art fatigue”
- Allegedly only in Skyrim (but … I’m sure I saw this in Oblivion too), they put arbitrary-rotated wall segments inside rooms to break the sense of “rectangular” walls everywhere. They called this “Shell Based” building
- “It’s common at the start of a project to strongly associate a particular setting with specific types of inhabitants or gameplay. You may want to only see soldiers in military bases, and zombies in crypts, for example. Resist this.”
- …IMHO: obvious (it’s basic art-composition theory), but worth pointing out to anyone non-art background looking at game and level design
- There was some pushback in the team against mix/matching modules from different kits: “The notion of [an artist's] art being used in unforeseen ways could lead to bad intersections or lighting issues, for example.”
- …Stupid of me, I’d never thought about how the team artists would react to this kind of mix/match (the only games I’ve worked on with modular art kits … were 2-3 person indie projects, so the atmosphere was very different)
- …This also explains a *lot* of the geometry bugs in TES games (where you get stuck in angles of the wall, temporarily, or items drop in places you are blocked from reaching for no apparent reason): the combination of assets wasn’t designed-for / tested-for, so there were bajillions too many combinations to test!
- “when you’re trying to identify somebody with the the aptitude and interest to be a great kit artist, you’re basically looking for a unicorn. They’re rare.”
The author initially cites this with respect to:
“the same rock or farmhouse or tapestry used again and again. And another two dozen times after.”
…IME, that’s not the problem at all. The problem is that every internal environment appears to have bought their walls, floor, and ceilings from the same branch of Viking Ikea ™. As demonstrated in the screenshot of “blatantly modular pipes” in the article:
…and when talking about Oblivion, it sounds like my experience was reflected in their testing with large groups of players too:
you’re more likely to pick up on repeated clutter first, then the repeated architecture. This is especially true in actual gameplay from a first-person perspective. To minimize needless repetition, we abolished the use of warehouse cells as they existed in Oblivion.
To be honest, I’ve long been surprised that Bethesda stuck with “square-based grids” for so long (other games were using non-square grids decades ago). As one of the commenters points out:
Square meshes and ‘cubic’ tile-blocks on naturalistic indoor environments (eg natural caves) can be a challenge – how about equilateral triangular meshes, or for 3d space rhombic-dodecahedrons? – Xu En
Common AAA art/design/level-design problem: handoff
This is rarely written about but the kind of thing that Leads, Producers, EPs and Project managers spend ages dealing with:
“They’ll do an art pass and make the level visually appealing Once they’re at a place they’re happy with, they send it back to design for final markup and scripting. Once design has done that, the level should theoretically be done – right?
Not usually. Level designers often inherit a litany of unforeseen problems when receiving final art for their levels. Cover along a street has been converted into poles too thin to take cover behind. A wall intended as a visual blocker is now a see-though chain-link fence. A bridge now has support beams which occlude sight lines in a major gunfight you had planned.”
Common level-design problem: reference sizes
Obviously, you need to know how “tall” your characters are. But how do you translate that into a practical measurement when working on a scene?
“One thing we’ve found very useful is to determine a uniform dimension for door frames. This has a few benefits. It allows us to transition from kit to kit without unique pieces, as well as allowing easy re-use of doors between kits. More importantly, it gives AI and animation a fixed standard to work from, which can be reinforced throughout the game.”
A little bit of the Agile/Scrum mindset
Some of their approach is inherently Scrum:
“we get our kits to a “functional-but-ugly” state as soon as possible”
“The level designer should be constantly stress testing throughout these stages. The artist should deliver pieces as soon as they are even rudimentarily functional, and the level designer should use them in non-ideal conditions. ”
They don’t go into detail, but imply that this has caused a lot of friction in the past with individual developers who found it emotionally difficult to work in this way. I would have liked some more info on that – dealing with this kind of “mindset” issue on game teams is a major challenge.
With my recent fixes to “auto-scaling” in SVGKit, I can now take in images, apply various effects, and lay them out in a grid:
- Top row: input SVGs of arbitrary size, auto-scaled to fit
- Middle row: applying a 2 lines of code filter to remove the colours
- Bottom row: applying a 2 lines of code filter to convert to a solid silhouette
…next step: get this stickers-game working…
(unsubstantiated, but hilarious): “If the measurement is close enough to the surface, light rays can curve downward at a rate equal to the mean curvature of the Earth’s surface. In this case, the two effects of curvature and refraction cancel each other out and the Earth will appear flat in optical experiments.”
…”an increase in air temperature … of 0.11 degrees Celsius per metre of altitude would create an illusion of a flat canal, … [or if] higher than this … all optical observations would be consistent with a concave surface, a “bowl-shaped earth””
…”Ulysses Grant Morrow, … found that his target marker, eighteen inches above water level and five miles distant, was clearly visible he concluded that the Earth’s surface was concavely curved”
(the history of maps and globe representations of the Earth is full of wonderful things like this)
“Tomb Raider triggered me, sure. But it didn’t do it needlessly. It didn’t do it tactlessly. It didn’t do it for a cheap rise. It instead captured a real emotion and a real experience millions of women will encounter in their life. Some of them won’t be as lucky as I was. Some of them won’t be as lucky as Lara Croft was, either. Some of them won’t survive. Some of them will be silenced forever.
Some of them will die and some of their attackers will live.
Tomb Raider triggered me and that’s ok. Maybe that’s even good. I think it is because it means it’s the first realistic, non-gratifying portrayal of violence against women that I’ve seen in video games. It’s the first one I’ve seen that wasn’t exploitive.”
Carlo Delallana responds to the sensationalized report that “I think most game designers really just suck”:
“One of biggest problems that game designers face in their path towards mastery is respect. It’s easy to respect an artist with a demonstrable skill, no average person assumes they can do what an engineer does. But game designer? For one thing our profession faces a common misconception, that game design is coming up with ideas (as noted by Garrott’s comment on lazy designers). That all you need to do is clone, that you are no better than your competition (as noted by Mark Pincus).
We are a compromised profession, tasked at executing a formula to minimize risk. Unfortunately, executing on formula is counter to mastery of any skill. If the marching order is “status quo” instead of “challenge yourself” then how does a game designer grow?”
(NB: Gamasutra clearly did the IMHO scummy journalist thing of sensationalizing RG’s quote; and RG should have been a lot more careful – personally I believe he didn’t mean it the way it came across, but it came across … badly)
Either way, Carlo’s reply is worth reading in full
Most of the teams were adults (even: real companies), but a team of students from Blatchington Mill School won, with their idea for an iPhone/iPad app: “My Science Lab”.
Team: Quantum Games
The three students named themselves “Quantum Games”: Jon, Nick, and Oli. All three of them have been studying for their GCSE’s in parallel with this project.
They’ve been supported by Mark Leighton, Assistant Head / ICT Director at the school.
For mentoring and game-development expertise, they had me – Adam Martin – previously CTO at MindCandy and NCsoft Europe, now an iPhone/Android developer
The students chose to focus on a game that would help other students revise the “Momentum” part of GCSE Physics.
In summer/autumn 2012, they learnt the basics of game design and development. We didn’t do any formal teaching – they simply had to pick up the skills they needed as we went along. YouTube videos, and “trial and error”, were our primary techniques…
By the end of 2012, they’d written their own physics engine, some basic gameplay, and a simple simulation of an exercise/problem in Momentum.
The big thing this month has been BETT. Pearson had a large stand, and asked the students along to talk about the project. They gave an excellent presentation to an audience of approx 30 people at BETT, covering the background and some of the things that went well, that didn’t, and what they’d learnt from it.
Leading up to BETT, they worked hard to squeeze in a new build of the game, with a rethink on the interactive sections and how they hang together. Unfortunately, we hit what seemed to be a major bug in Unity’s camera-handling, and none of us could fix it in time (nor could we get an answer from Unity support in time). But the students managed to invent a workaround at the last minute which worked fine for demoing at BETT.
The game isn’t finished yet – GCSE’s and schoolwork left too little time to complete it before BETT – but we’re very close now. The students are aiming to finish it off this month and next, and I’m hoping I might even be able to take a copy to the GDC conference in March (taking place in San Francisco, GDC is the commercial games industry’s main annual conference).
In the meantime … you can sign up now on the Quantum Games website (http://quantumgames.co.uk), and we’ll email you as soon as the game is ready – or sooner, with a private beta-test!
Unity’s QA dept needs a smack up-side the head. If you get this bug, you’re a bit screwed – the only “fix” is to go into system settings and wipe Unity’s crud.
type == kMetaAssetType && pathName.find (“library/metadata”) != 0
Thanks, Unity, that’s very human-readable and helpful. Not.
(appears to be an Assert written by a junior programmer – or a debug-only Assert that got left in the shipping version(!))\
- Unity’s tech team wrote Unity 3 so that it would open projects BEFORE checking if there was a new version available
- Unity 4 is NOT backwards compatible; it corrupts projects so that they will NEVER load in Unity 3.x
- …also: Unity 3.5 will FATAL CRASH if it tries to open a Unity 4 project
- Unity (generally) is badly written and auto-opens the last project, even if you don’t want to, and EVEN IF ITS CORRUPT
- Unity (generally) DOESN’T BOTHER to offer any way of starting “safely”
Solution (OS X):
- Force-quit Unity (not only does it crash, but it hangs forever) – RMB on the icon, hold down alt/option, and the Force Quit option appears
- run Finder, go to (your user)/Library, aka “~/Library”. If you don’t know how, then do ONE OF the following (either works):
- EITHER: Start at your username folder (it’s the parent folder of your Desktop folder, parent of your Documents folder, etc), un-break OS X (Apple ships it as broken-by-default): google for “enable see Library folder in Finder”, follow the instructions
- OR: In Finder’s “Go” menu, select “Go to folder”, and type “~/Library”
- Inside Library, find “Preferences” folder
- Find *everything* that begins “com.unity3d.” and delete it (there are approx 20 files, of 2 different file types)
- Re-start Unity, and it will open the default project
- …And this time, Unity will offer to upgrade to Unity 4
For bonus points, the Unity 4 “upgrade” isn’t an upgrade: it’s a replacement. I expected it to download “the bits that have changed”. Nuh-uh. One gigabyte download! (try getting that in a hurry, when your project has suddenly imploded in front of you, because of the non-existent backwards-compatibility :( ).
Some idle thoughts…
I’ve seen similar behaviour before when writing very simple OS X apps. There’s some massive bugs in Apple’s code that have been around for 5+ years (and Apple shows no intention of fixing), which cause “startup actions” to happen in a semi-random order, depending on the NAME and NUMBER of recently-opened projects.
It takes very little testing to discover this. If it’s the problem with the Unity software, then Unity needs to seriously improve their testing on OS X – they should have discovered this easily.
But also … why on earth are they using the NSDocument loading system? Apple never finished writing the docs for it, they seem to have never finished implementing it (major bits of the API seem to be missing) – in general, OS X authors don’t seem to use it any more. Probably because it doesn’t work?
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)
“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
“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
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.”
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?
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.
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.
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!
“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.
(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.
- 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.
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?
(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)
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?
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.
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.”
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 :
- Game-role: e.g. … “enemy”, “powerup”, “start location”
- 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”
- 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”
- 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”
- 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”)
- 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.
- 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?
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:
- The entity that the game-rules are operating on
- The entity that client 1 *believes* is current
- …ditto for client 2, client 3 … etc (each has their own one)
- 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.
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…
Thanks to Mike Leahy for spotting this:
…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)
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.
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:
- You all get the same experience-points as if you’d single-handedly killed every monster
- You get the points just for being nearby – no need to score hits just to “tag” it for yourself
- Mob strength is constant, but player damage is multiplicative on number of players present
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:
- When packets are lost, everything moves in exactly the same direction it was going, at exactly the same speed, forever
- “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
- 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
- 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
- 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)
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.
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.
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”?
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)
These posters didn’t provide a real iTunes link – I had to hunt it down on their websites – so they’re out of order: