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
amusing iphone marketing and PR

Toshiba’s “failed vs. Apple” marketing

I feel sorry for Toshiba; they make good products, but their marketing
seems to belong to a much smaller, poorer company.

Take this advert, from April 2012, when Apple is already far along with shifting their whole laptop lineup to “ultra thin” MacBook airs (rumour suggests the non-thin models will continue to be phased out next cycle – doesn’t matter so much for this post, but if true, it adds extra emphasis to the post):

…and compare it with Apple’s photo from the same period:

Apple’s problems

The iPad 3 is considerably heavier and thicker than the iPad 2. This is a pain for users, but for Apple Marketing it’s a disaster. They’ve been fighting to prevent people equating “iPad” with “low power, low utility, inferior Laptop”. The iPad 1 had a fair go, but struggled. The iPad 2 went a long way to achieve it with it’s ultra slim/light/long battery life.

With other companies (e.g. Google) we’d assume that Apple did intensive market research on iPad 1 vs iPad 2, and found that weight didn’t factor into the purchase decision much. Given this is Apple … I expect it was an internal decision instead. They decided that the sheer awesomeness of the Retina display meant the pain of the weight + thickness would just have to be accepted. Personally, I agree: the Retina makes such a huge difference that it’s a no-brainer to buy an iPad 3.

(NB: even with the considerable increase in weight, and in battery quality, the iPad 3 has a considerably shorter battery life than previous iterations)

So, what does Apple do?

It’s not a bug, it’s a feature: Apple redefines Reality

All previous Apple marketing for iPad/iPhone has included side-on photos on the front page. iPad 3 is the first to use an isometric view – not just on the front page, but *everywhere*.

APPLE LESSON 1: If it’s bad, hide it.

The photo they use is EXTREMELY poorly positioned. The iPad 3 is contorted, the image is squished by perspective, the flower image looks terrible.

But you won’t notice any of that (unless you’re a product-photographer). No, you’ll notice HOW THIN IT LOOKS!

Apple carefully chose the angle to use perspective to hide the actual width of the product. It’s just shallow enough an angle to make it appear that you’re seeing the width – but just deep enough an angle to hide most of the width. (recall that the iPad 2 and iPad 3 both have a very deep bevel on the underside).

Apple also carefully chose the lighting: white iPad 3, ultra bright lights (my gut feel is these are even brighter than normal in Apple ads, which is very bright to start with), even the photo of a delicate thin flower (see what they did there?) is itself over-exposed a little. The iPad itself seems to almost … disappear … on the advert.

APPLE LESSON 2: If it’s really bad, make a photo that lies.

Toshiba: Fat, dark, and ugly

Let’s revisit Toshiba’s photo:

  1. the angle TRIPLES the width of the lid
  2. the angle DOUBLES the width of the base (look at the extreme bottom right edge – the base appears to mirror around the white hilight stripe)
  3. the inside is DARK, with HEAVY, THICK, DIRTY lighting
  4. the shadow underneath the laptop is ALMOST AS THICK AS the laptop itself, and coloured DARK BLACK

OK, so I could forgive poor colour scheme – marketing had no choice in that.

You could (maybe) forgive the stupid choice of perspective – maybe the laptop just looks ugly at any other angle. Or maybe they “needed” to show the ports on the side (if so, they failed: the lighting is so bad you can’t see the important ones).

But … who in Toshiba Marketing approved a photo with a black shadow underneath that makes their “thin” laptop look considerably thicker than it is? There’s no excuse for this: it’s a terrible photo (should have been rejected during the photo-shoot) – but it’s a catastrophically bad piece of marketing.

TOSHIBA LESSON 1: ?

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
Google? Doh! recruiting

Google interview questions: beware the Interviewer

This is from 4 years ago, courtesy of Steve Yegge. I just came across it by accident, it’s wonderfully well written, but one bit caught my attention in particular:

“First, you can’t tell interviewers what’s important. Not at any company. Not unless they’re specifically asking you for advice.”

Wait – what? … why not? Surely – if you’re being an honest candidate – your views on what’s important are a huge part of the interview process? These people want to know what you’ll be like as a colleague, how you tick – no?

“You have a very narrow window of perhaps one year after an engineer graduates from college to inculcate them in the art of interviewing, after which the window closes and they believe they are a “good interviewer” and they don’t need to change their questions, their question styles, their interviewing style, or their feedback style, ever again.”

Ah. Right. Yes, makes sense now. Sad, but true.

I will also add: for all the reasons Steve cited, I *do not run interviews this way*, and haven’t for a long time now. In my late twenties, I learnt the hard way how stupid a lot of those practices are.

Looking back at my sole Google interview, it explains a lot: I had no idea that Google accepted / allowed these practices among their interviewers – I’d assumed they’d have actively stamped them out. Apparently not. It was a big part of why I never considered Google again: if “A people hire A people” and “B people hire C people”, that part of Google’s process stank of the B people. Not a place I wanted to work…

Of course, Steve’s still writing about Google’s hiring, and his criticisms seem to be getting sharper over time. Just last year, he dropped this into a post:

“It’s a match made in heaven, I’m tellin’ ya. It might take you a couple tries to get in the door, because Google’s interview process — what’s the word I’m looking for here — ah yes, their process sucks at letting in all the qualified people. They’re trying to get better at it, but it’s not really Google’s fault so much as the fault of interviewers who insist that you’re not qualified to work there unless you are exactly like them.”

So … given Steve’s one-man crusade to undo the bad work of Google HR, I’d recommend anyone rejected by Google to give them another go. But don’t look at interview prep questions, don’t brush up on obscure programming technique – just read and re-read Steve’s blog posts, and remind yourself that it’s “a stupid process” you’re trying to get past, one that doesn’t fairly represent the company – nor the colleagues – you’ll be working for.

Categories
fixing your desktop

Warning: before you install OS X lion

… It removes one of the most valuable features of OS X for laptop owners:

OS x lion WILL NOT recharge a plugged-in iPhone when the lid is closed (after 10 seconds of pretending to charge – just long enough to fool you – Apple cuts the power)

At conferences, on sales trips, on plane trips … I have relied on this feature many many times to recharge a phone off the laptop battery.

Now?

Denied.

No user setting for it (that I can find so far) just … Removed :(

Categories
games industry recruiting

Games QA job in Brighton UK

No link provided, but should be easy to find the studio email HR address:

“Hi All, I’m looking for a QA person to join us at Zoe Mode. I need someone with experience as I need QA for multiple titles of different genres. A sense of rhythm will help. Please pass this on, thx.”

Alys is a good person to work with.

Categories
bitching Web 0.1 web 2.0

Apple OS X install hell: way worse than Windows :(

Almost a year after Apple’s disastrous “force consumers to download Lion, instead of installing from DVD”, apparently it still doesn’t work. It’s hard to recommend OS X to anyone after this experience.

UPDATE 2: Apple’s “download a file from the internet” code is so bad it’s causing the MacBook to overheat – 80 degrees celsius, very close to the “automatically reboot” temperature. This is *to download a file*. Apple’s misuse / misunderstanding of web technologies seems quite incredible.

(the process is called “storeagent”)

My last 24 hours:

  1. Buy Lion
  2. Download starts
  3. …it’s a 4gb download, this takes a long time…
  4. Download stops at 25% for no reason.
  5. Resume button gives a wait cursor for 5 seconds, then goes back to “paused”
  6. Repeat twice
  7. Third time, the Resume button is disabled, and now Lion is stuck in “Waiting” and there’s no buttons you can press except “cancel”
  8. Remains in “waiting” for many hours. Googling suggests this is a permanent crash in Apple’s App Store.
  9. Cancel the download, re click the “buy app” link
  10. Apple quits OS X, kills all apps, deletes all unsaved data, throws me out to the login screen
  11. Login again, and Lion icon has appeared in the dock.
  12. …but: Lion now refuses to even start downloading – it’s stuck on “Paused, 0 of 0 bytes”

UPDATE:

  1. Try again (delete OS X Lion, re-purchase from App Store) and … finally the download starts. Waiting now to see if it will complete this time, instead of giving up partway like before…

I.e. Apple’s infrastructure is still blocking me from downloading the OS. How hard can it be to *download a file* ?

Next step: walk in to an apple store and ask them to give me a USB stick, since their webserver is FUBAR.

Categories
amusing

Hitler meets George RR Martin

Third Reich vs. Game of Thrones … one of the best Downfall mashups I’ve seen (particularly like the timing on “Headless”)

http://www.youtube.com/watch?feature=fvwp&v=1kLSYTHQbm4&NR=1

Categories
entrepreneurship investors startup advice

Great explanation of “disruption” – and why investors dislike startups that meet expectations

“Disruption” used to be mentioned frequently as the thing that every company wanted to be (urged on by investors).

But what is it, really? I’ve met lots of people who believe it’s “a fancy word for ‘innovation'” – but if that’s all, it would be pretty pointless and vapid.

This post from 2011 gives a great explanation based on simple concrete ideas. It explains why disruption is interesting to companies and managers.

What about investors?

It’s a great explanation, although it’s mostly from the perspective of business owners / management. Why do investors – especially startup / VC investors – care about disruption?

The key here is Des’s paragraph about share price:

“Microsoft’s share price hasn’t moved. This is because they are precisely predictable. Their shareholders have gotten exactly what they paid for, and not a penny more.”

A share price that doesn’t move *still provides profit to shareholders* (in the form of annual dividend). In fact, it often provides rather a nice sum of money – just like the rental income from owning property).

…but: Angel/VC investors make the bulk of their profit from changes in the share-price, not from dividends. Two reasons:

  1. Startups usually choose NOT to pay dividends – the money is reinvested into the company instead, to try and grow even bigger, even faster (pour gasoline on the fire of your success, make it burn faster!)
  2. The returns from dividends are – like rent on property – a small fraction of the investment. The returns from the share-price changing are – like betting on a horse-race – a substantial multiple of the investment

If you run your startup perfectly …

If you do everything you said you would do …

If nothing goes wrong …

… your investors may class you a failure. And they’d be right to do so. They didn’t invest for the dividends, they invested for the “surprise me” factor.

(which should, perhaps, give you pause for thought: if they’re “right” to pan you for achieving your aims … are/were you “right” to take their investment?)

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)