Game Design, Programming and running a one-man games business…

Re-thinking the lineage court case

Have you seen this?

Craig Smallwood, the plaintiff, claims NCsoft of South Korea should pay unspecified monetary damages because of the addictive nature of the game. Smallwood claims to have played Lineage II for 20,000 hours between 2004 and 2009. Among other things, he alleges he would not have begun playing if he was aware “that he would become addicted to the game.

Now clearkly, the internet world is awash with people saying “what a dumbass, its not like they forced him to play!” and “thats like suing mcdonalds for being fat”. But it may not be…

Is he addicted? This is 10 hours a day for 5 years. That’s pretty heavy usage, when holding down a job too. That’s getting home at 6pm, and playing to 4AM every day 365 days a year (ok, more time available on weekends, but still…).you bet he is. But the big question is are NCSoft to blame? People talk in glowing terms about ‘addicting gameplay’ (grates teeth… we say ADDICTIVE), it would be a brave defence lawyer that tried to argue that making a game addictive was not a core element of MMO design. The entire business model relies on you coming back every month to pay again.

Ok, so that’s fair enough, making a product good enough to encourage replay is fine, hardly criminal. However there is something magical about an MMO that *may* mean that courts take this stuff seriously:

They know how addicted he is.

They know in exact detail that account X logs on 10 hours a day for 5 years**. If it’s a micro-payment MMO, then KNOW that one guy has spend >$50,0000 a year (or whatever). This is totally different to the store that sells alcohol to an alcoholic for cash, they don’t know how much he drinks.

I don’t think the case has merit, and I agree with a lot of the criticism of it, but in these days where companies show adverts to test-subjects inside MRI scanners, and people get better every year at crafting more elegant skinner-boxes dressed up as facebook games, I wouldn’t be at all surprised to see judges mandate that all MMO games need to have systems in place to prevent people getting this bad. The industry will complain it’s being held to a higher standard than alcohol or other addictive pruchases, btu I suspect the court system will argue that only the games industry has the technical capability to regulate against true addiction. Addiction isn’t a topic for mockery. I’ve known people addicted to heroin (scary stuff), I’ve known people who used to smoke now and then, casually, and clearly just didn’t have whatever gene makes nicotine addictive. I’ve drunk a hell of a lot in my youth, but bounced out of it before sliding into addiction, as various friends did. Something that you personally can take or leave is another persons crippling addiction, and we shouldn’t dismiss them as idiots because we don’t share the exact genetic makeup that gives us that same vulnerability.

It’s an interesting story to follow, in any case.

(don’t yell at me. I’m not saying that NCSoft are guilty, or the guy should win. I’m saying there are real issues here, and the industry needs to look at them sensibly)

**I know it could be a shared account, but it could still raise a flag. If its the same character being used, without logging in or out, it’s pretty safe to say the same person is behind the keyboard.

Basic principles of game optimisation

Making games run faster is a pet topic of mine. Code samples are too specific to help many people, so here are some general principles I’ve learned.

1) Design to avoid the code.

Sounds horrid doesn’t it, but people do it all the time. ‘Skinned’ animation at points like shoulders and knees is CPU intensive and tricky. Ever noticed how many characters in games have big shoulder-pads? Makes life much easier. GSB is a 2D game, mainly because I prefer 2D gameplay, but I can’t ignore the fact that it would be horrendously more draining on the CPU/GPU to be in 3D

2) Run the code offline.

If the output of your code is a one-off, only ever do it once, and before you ship the game. The GSB campaign game code has some really inefficient slow brute force stuff for calculating planet-travel distances. It’s done as a one-off, and the results loaded in at run time. If there are calculations your game makes at run time that are based on data that never changes, just pre-calc them and load in a table, assuming the table is small enough

3) Run the code once, and cache it.

This is the ultimate big win. In the old days, people used tables of cosine/sine lookups, rather than calculating them. Hold on! GSB does that for some stuff too (nothing gameplay critical). Never make a calculation twice in a  function if you can do it once and reference it later. It’s amazing what a difference this makes. even simple stuff like STL list end() calls can mount up with really large containers

4) Don’t run the code every frame.

Not much code has to be run every frame. The minimap in GSB isn’t updated every frame. Can you notice? I can’t, because most frames a ships movement would be ‘sub-pixel’ anyway. If stuff like this seems to jitter, update half the code one frame, the other half the next frame. A frame should be 1/60th of a second. Nobody will notice.

5) Don’t process what isn’t seen.

GSB does some cunning code for all kinds of cosmetic things that only applies if that activity happens onscreen. In theory you can pause the game, scroll around and spot very minor inconsistencies (good luck). With strategy games, most of the time, most of the action isn’t being viewed, so you can skip allsorts of stuff. I don’t update timers for running lights offscreen, for example.

6) Re-order and group stuff.

Graphics cards like to do things in big clumps. give them a single texture, and 50 sprites to draw and they are happy. Give them 50 sprites with different textures and they are not. This is why all the GSB debris is clumped into a single texture, ditto the laser bolts. I also re-order ships in the game code so that similar ones are drawn one after the other, even when drawn as icons. This minimizes texture swaps. Because GSB doesn’t use a z-buffer(for blending reasons), that makes for some spaghetti like code, but it’s worth it. The easiest system I’ve found is to maintain spritelists for different textures. You still draw sprites as normal, but when they draw they just get thrown into the relevant list, and the list gets drawn later.

7) Save stuff for when you are not busy

GSB does this. It’s very tricky, but you can have code that only runs when the CPU is idle. If a laser bolt hits some debris in GSB, the debris explodes. This ONLY happens if the CPU is idling. People spot it occasionally and think it’s l33t. They never spot that it doesn’t happen all the time.

8) Optimize the UI

People get a fast engine then slap some super-slow UI on top. Madness! With a lot of text, icons, dialog box backgrounds and multi-part buttons, you can have crazy overdraw, crazy texture-swaps and huge inefficiency. Keep an eye on it.

Don’t forget that you can also optimize textures too. Some textures are ripe for compression, others not, but you can also do crazy tricks with some stuff, like chop a circle texture into one quarter, and raw it as 4 flipped and mirrored sprites (I do that a lot). Not everyone has 512 MB video cards, and its quicker to load a small texture than a big one anyway.

Most coders probably know all this already, but it doesn’t hurt to recap. It’s easy to forget about optimising and just worry about features, but gamers will thank you for it. I get a lot of people remarking how surprised they are at how well GSB runs on their machine. This is no accident :D.

Size Doesn’t matter

I’m not the only indie developer writing on this topic today, check out the links at the bottom of this post.

There is a bit of a trend, as I see it, an unwelcome one, for the subject of game ‘length’ to be the dominant topic in the reviews of new games. I don’t think this a good direction for the industry to move in.
As an ‘older’ gamer, I recall a time when the whole idea of game length was silly. How long is pacman? how long is space invaders? As long as you have time for, clearly. Now you may argue (and some do) that the only reason that early games worked this way was the artificial constraints caused by a lack of processing power and file storage. These days we can have games with hand-crafted, bump mapped worlds made in incredible detail, and this is clearly better and more immersive and thus games should be measured in this way.
Now I’m not vaguely going to suggest that more-detailed, more immersive worlds are not a good thing. They clearly are. What I’m against is the weighing up of a games value (both artistically and in monetary terms) by sheer length and content.

Firstly, it would be insane to judge movies or books the same way. Andrew Marrs ‘The History of Modern Britain’ weighs in at 602 pages for £8.99, whereas Malcom Gladwells ‘tipping point’ is an all-too short disappointing gameplay experience at just 259 pages for £7.99, representing far worse gameplay for your gaming cash.

Sounds totally bonkers doesn’t it?

Is Halo a better game than World of Goo? Personally, I probably enjoyed WoG better, but I haven’t finished either game, so I have no idea which is longest. Clearly, game length didn’t vaguely factor in for me. And That doesn’t put me in some minority either. A huge chunk of gamers never finish games. I’ve been gaming since pong and only ever ‘finished’ 3 games in my entire life. I got bored with Half Life (yes really) and Half Life 2, and Bioshock, and almost any game you care to mention. When I read about how some l33t haxxor ‘finished’ a game in 8 hours, I find it laughable. Imagine bragging about ‘finishing’ war and peace in 2 days. The idea is to enjoy the experience, not race to the end as fast as you can.

Even worse than paying for games where the effort is spread out over 100 hours, when i know I’ll get bored at 20, is games where, in a desperate bid to make the game sound ‘longer’, the designers introduce tedious sections where you plod back and forth between the same points to get their moneys-worth from the scenery. It’s obvious, it’s tedious, and it’s embarrassing. Please stop.

I don’t judge food purely by quantity. Anyone can produce a ton of bland rice for a trivial cost. We tend not to judge things purely by quantity, and when we do, we can at least admit we are being shallow. So lets stop doing it with games. Tell me if a game is good, tell me if a game is dull, but some meaningless statistic about how many levels, or how big the installer is, or how long it took you to ‘finish’ it is meaningless to me. Size doesn’t matter.

Other blog posts:

patch 146

I released patch 1.46 for GSB today. It’s up and running now. This is quite a minor patch, but I thought it worth doing. I must make a mental note to tell steam, stardock etc about it tomorrow. The big feature of the patch is it lets you toggle between the new and the old post-battle stats now with a mere click of a button. Hurrah. The rest is just bug fixes. Apostrophes in usernames cause errors and are no longer allowed, etc…

Tomorrow I’ll be back working on the campaign. There is some new GUI artwork, and a list of bugs to fix. Plus I had some crazy ideas for some gameplay balancing code.

In other news, today was spent partly pacing around the outside of the house seeing where there is room to put solar panels. I’ve long long wanted solar panels, and it would be kinda cool to have positech solar-powered at my end :D It’s pretty scary when you add up how amny units of electricity we use, and then pace out how much space (and cash) is needed to provide all that. Currently, 12 square meters of space is possibly viable, and that’s maybe a third of the requirement. Bah.

One day maybe…

New GSB Website

I’ve updated the gsb website. For the first time since positech started, I’ve actually got a proper web-designer to do  a webpage, rather than me knocking it up myself in basic html and crappy coder-art. Even then, it was a single page, which I cloned and fiddled with for the rest of the site, because I’m so cheap :D

I think it looks way better than before. There are a ton of minor formatting things to fix, and no doubt a lot of the graphics on the ‘other’ pages need tweaking now. If you spot any broken links, then let me know. I’m aware that ‘about’ and ‘faq’ are the same thing. Maybe ‘about’ should go to this blog?

here it is: