Why no desktop 16-core CPU?

Posted by | Posted in Game Development, Pioneer | Posted on 06-03-2013

It’s a question I keep coming up against as I do multi-threading work but where are all of the desktop 16-core CPUs?

You can get what AMD call a 16-core CPU in the Opteron 6200 but it’s built on Bulldozer or Piledriver which are more like 1.5 cores per “dual core” thanks to sharing their FPU capabilities. Or to put it another way, 16-core INTEGER and 8-core FLOATING POINT.

Not long ago we went from single-core to dual-core, to true dual-core (both cores on the same die), to quad-core… and then we stopped.

I guess the argument could be that it’s not worth it for most people? Or that hyperthreading gives you 8 hardware threads with upto 30% performance boost if you can use them well.

This all misses the point though and I’d have been quite happy if AMD had continued adding cores to it’s K10 architecture, keeping up with the process node advances (die shrinking), updating, optimising and just piling on the cores. They have done that to some degree because K10h, as used in the Phenom 2, did make it into the early APU’s in a low power die-shrunk version. It lacked any kind of L3 cache though it did have some extensions, updates and improvements so that it just about holds it’s own against a similar number of core Phenom 2.

Those chips were APU’s though, with an on chip GPU for mobile use. So they clocked slower and fully 50% of the die was spent on the GPU. You could get versions without the GPU called Athlon II but they still lacked the L3 cache and the GPU was there, just disabled and powered off. There was no 8-core Athlon II with an L3, even a small one even though it was probably possible.

We’re down at 22nm + 3D transitors with Intel CPUs whilst AMD are still rolling out on 32nm but are we really stuck at 4-cores?

No, there are higher core counts as you can see but they’re for servers rather than our mere mortal desktop machines. So the work isn’t going into getting more performance out of heavily threading things, instead it’s in GPGPU languages like CUDA, DirectCompute and OpenCL. Utilising the GPU to do work you’d normally have just hammered out on the CPU. There’s real benefit to doing things on your GPU, and eventually I think AMDs “APU” strategy might pay off if they can reduce the latency between the CPU<->GPU for compute languages for example but traditional multi-threading seems to have been ignored. It’s not even an option to get more cores on a desktop CPU and I think that’s a shame as there’s a lot of workloads that will happily scale to 16 or 32 threads without the need to move them to GPU.

It would have been interesting if AMD had chosen to do it, to keep scaling the cores at least as an option but then I think there’s a metric fucktonne of things that AMD could have done to stay relevant which they’ve manifestly failed to do so here’s a short list:

  • big.LITTLE – as in the ARM design where you have a group (4 typically) of large, fast, powerful CPUs and then you have one tiny little low power CPU that is used when the workload gets light to save power.
  • Unlocked multipliers and clocks on CPUs sold with a very limited warranty at the same price as the regular locked one – the Black Edition chips are good but not enough.
  • Change the chip packaging format as Intel and IBM have both separately proposed for better thermal, power and mounting design – if you’re in 2nd place you innovate to survive.
  • Speaking of IBM – form an alliance, use their resources and manufacturing to get access to better process node shrinks.
  • …and of Process Node shrinks – you can’t compete with Intel on them but as soon as AMD were free of Global Foundaries why didn’t they run off to TSMC (or IBM) and aggressively chase what there was available?

There must be a tonne more as well besides, but in short I miss the AMD of old. We were speaking about it at work the other day and it always produces the same head-shaking response where you just can’t believe that todays AMD is the same one that gave us the K6 and k8 architectures. The AMD that bludgeoned Intels Pentium 4 misstep into a cocked hat and happily overclocked it pants off.

Todays AMD seems to be one that releases products based on “vision” rather than”getting-the-fucking-job-done-well“. I’d even settle for: “getting the job done well enough” and do it with more cores but instead if you buy AMD now you’re probably getting a Piledriver chip at the high-end which is finally a little bit faster in some situations than the k10h architecture… they could have done an 8-core k10h in approximately the same die area but minus the GPU and I’d rather have had that because all my GPU needs are serviced by a separate card in a PCI-e slot.

I’d buy that chip, fuck I’d buy a 16-core version without hesitation. A die shrunk 8/16-core Phenom, L3 cache intact, the improvements they rolled into the Stars (k10h successor) architecture, no GPU, on a quad channel memory bus and clocked at about 3Ghz. That could pummel my Core i7 into the floor with the loads I have in mind.

It’s not to be though, that AMD is dead and for some reason so are desktop 8/16-core CPUs it seems.

What I do when I’m programming.

Posted by | Posted in Game Development, Life, Lua, Pioneer | Posted on 02-02-2013

Today, as with the last 6 weekends in a fucking row I am ill, whoop, and being the weekend the doctors are off. It’s not an “emergency” so I can’t get seen until Monday, by which time I will be ok again and they won’t know what to do… fucking fabulous.

Instead of posting about that, or how you can’t buy a laptop with a decent resolution screen these days unless it’s made by Apple, I’ve decided to describe how I approach programming a feature in Pioneer. I happen to be working on a relatively bite size one at the moment so it’s fair game.

Read the rest of this entry »

Kick Me?

Posted by | Posted in Game Development, GLSLPlanet, Life, Lua, Pioneer, red ship | Posted on 11-01-2013

I wonder if you could use KickStarter a bit differently, to fund individual developers? I haven’t really contributed much to Pioneer this last couple of months since starting at Crytek, it’s just consumed all of my time.

I’d like too contribute a lot more, in fact I have a fecking long list which doesn’t even include all of the things that I’d like to do with it: https://github.com/fluffyfreak/pioneer/issues?state=open

This must be the same for some of the other Pioneer team too but our “real” jobs get in the way of the fun things we actually want to do.

So, how about KickStarter campaigns for individuals?
You list what you want to do, time estimated, and in priority order with whatever you think is a fair rate of pay for doing something you love.
Let say I did it, since I’ve just thought of it and don’t mind publicly discussing my finances :)

What if I could risk working for only 6 months next year (Hah! Again that is!). That would put my minimal funding for it at about £15k before tax to cover my mortgage and bills etc. Stretch goals would take you further through the list of things you hope to cover so I’d have:

  • GPU terrain,
  • orbitals,
  • water,
  • Faction Trade value differences.

For the first 6 months, and that would take £15k to get funding, if I got £15k then that’s what I’d deliver in that time before I bugger off and find more paying work, but stretch goals could also be:

  • 3D cockpits,
  • Threaded Job Scheduler,
  • Atmospheric Heating and re-entry effects,
  • Temporary decals showing shield hits,
  • Rewrite noise system to use graph/nodes.

They could take the rest of the year and require another £15k divided into £3k chunks for each stretch goal.

All of that is just an example list, I think I’d be doing a lot more than that in a year of solid development on Pioneer for a start! :D money is just a guess as well as I haven’t taken taxation into account or indeed how that would even work :/

What I’m wondering from you lot however is what people think of the idea itself? Getting people to pay for individual developers on Open Source projects isn’t a new thing, there’s lots of examples of companies paying developers fulltime, bounties are a common way of funding large features too so it’s not that odd an idea.

Any obvious problems or flaws in the idea?

Ah Lua, how do I loathe thee… I mean Love, yeah Love…

Posted by | Posted in Game Development, Lua, Pioneer | Posted on 25-11-2012

I’ve never understood the love given to scripting languages embedded in a game engine.

I’m going to take Lua in Pioneer, or in anything else for that matter but it’s Pioneers that sparked this off. You have a system written in C++, you expose it to Lua with C++ side functions that get presented to Lua scripts, you then program in Lua.

You are still programming, it’s just another programming language. Lua is not King, neither is C++, they’re both just programming languages.

Now, inevitably, the next step occurs: Everything has to be done in Lua.

What was a convenience, or a way of rapid prototyping, or a way of scripting light data handling routines, or for displaying data in a GUI is now doing heavy lifting in the engine at about 1/35th to 1/50th the speed it was being done in the traditionally compiled code.

Of course by this time only experienced programmers can actually write or modify the scripts because to make Lua useful you’ve extended it with home grown libraries & since the purpose of Lua is usually to make designers and non-coders lives easier it has fundamentally failed in this regard by this stage.

Whole systems are exposed from C++ meaning that you’re maintaining code twice except that you’ve exposed the worst bits of C++ via the wooley type unsafe Lua where the most advanced editor has all the sophistication of “Notepad.exe”.

Lua is not king, Lua quickly becomes a ball ache most of the time because it grows out of it’s usefulness, rapidly doubles the amount of work required to maintain engines, and slaughters anywhere it’s used in a performance critical subsystem.

I say this as someone who has programmed using it at several companies and Loves Lua for scripting. I just don’t think it’s anything other than a helper and best if it’s regularly pruned to reduce what it’s used for.

Some things should be moved out of Lua in Pioneer entirely and into some form of structured data generated by a tool. All the LMR stuff is obvious, ship definitions, spacestation configuration info, and ANYTHING to do with vectors/matrices/quaternions.

Other stuff is perfect Lua fodder: missions, trade pricing, defining factions, the GUI and probably a few others.

It’s just so annoying writing something in one language, then everyone wanting it in Lua too. Fuck off. It’s written already. Why have it in yet another language? It’ll be doing the same thing! Only then it’ll be in a language that I can muddle by in compared to C/C++ which I’ve been doing for 18 years (33 now, 15 when I started). What bloody good will that do? Will it mean more people can use it? No. There’s already a load of people who can write in C++ on the project who don’t know/use Lua. If anything it will reduce the number of people who can use it to only those who know/use Lua!

Does anyone really think that something has been done in Lua that couldn’t have been done in the C++ side? No. It does mean however that there’s a shitlod of C++ code, then a shitload of C++ interface code, and then a shitload of Lua code to make the C++ do what would have taken at least one shitload less of interface code to just do directly in C++.

You know what? If you find yourself embedding Lua to make your life easier and to get away from C++ then Lua isn’t the answer.

C# is.

Of ripped assets and other painful metaphors

Posted by | Posted in Game Development | Posted on 07-08-2012

Time to speak of work and I haven’t been slacking off or wasting my time!

Last night I finally integrated the Gwen UI system with “the project” so it’s now even getting a bit of polish and usable UI rather than bizarrely assigned keypresses. There are some notes that I’d make about Gwen before you pick it as your UI of choice.

  1. Firstly I’m using it with SFML 2.0 pulled direct from the SFML git repository. That means I’ve had to make some changes just to get it to compile with it. These are documented on a number of different sites so I’ll probably upload a patch somewhere and try to document them on here in a separate post later.
  2. The Gwen solution for VS2010 is a classic example of an uber-solution. All of the projects are inside it for all possible libraries that it can build so if you don’t have Allegro or DirectX 2D available or in your global paths then you’re going to get lots of compile errors. A better approach might have been to have a number of different projects for each implementation but nevermind.
  3. This is very much an ingame psuedo-serious UI. It’s not for a HUD – though I’m sure I could twist it to do so, it’s providing MFC alike buttons, text windows, scroll bars and things like that. In this regard it’s exactly what I’m looking for and my impression of it’s abilities will probably change as I learn to use it.

So far it all looks very simple but powerful and I wish I’d actually gone through those minor hassles before now. I can think of a few older projects I’ll be integrating it with post-haste because they’ll look a lot more professional once I have!

Speaking of “the project” this is the one I’ve been reluctant to show screenshots of because I’m currently using ripped isometric graphics from a rather popular isometric Bullfrog game. It’s silly of me because eventually I think only the presentation will be isometric the graphics themselves will be 3D assets but I’m having to learn a lot of things that people back in the Amiga days just seemed to be aware of. I may be trivialising the work of those pioneers with that sentence but I don’t half feel stupid trying to work some of it out.

Ideally there’d be some set of these 3D assets lying around, I could integrate them now and modify the renderer to get everything displaying again. It’s a lot of work to look like you’re standing still but it’s a necessary part of the handover process from pseudo 2.5D to true 3D assets. Nothing is ideal though and my art skills have never been anything more than complete cack therefore I’m stuck with 2.5D and ripped assets for the time being. I can still get on with the system, audio and gameplay though oh and the ingame editor UI which is what the Gwen integration is for.

Broomy was talking seriously about quitting and going indie but needing a year long plan, so we spent most of an evening working out whether we can take “the project” further than my whimsical hacking. He’s actually more clued up about the whole thing than I am and would prefer to start smaller or use middleware like Unity or UDK which is very sensible but does have a learning curve we’d both have to get over. There’s also the issue of what else to make, we’re both talented enough to make some pretty cool little games, it’s more a question of: “What cool little game can two guys make in less than 3 months to start earning a tiny bit of money?” – this is actually quite trivial to answer if you consider the available markets, i.e: PC, Android or iOS. That answer is, none. Or less pessimistically: If 10,000 two man teams made a game in less than 3 months only one of those teams would break even or better.

Currently I find myself in the position of trying this by default since I don’t have a job, go me.

I’ve worked on and off on “the project” since January so it’s not exactly new but finding time and sustaining motivation is really tricky. it began as nothing more than a Syndicate level viewer. I just wanted to scroll around the maps a bit for nostalgia. Then I started exporting them in a more flexible and editable format, then came the different palettes, then dissecting the level construction, then the level collision etc. Now it’s becoming… well “the project”. The Syndicate-level-viewer origins became a bit of a hindrance a little while ago but only in a few minor ways, that’ll all fade away soon. Mostly though what I’m doing is just fun now, something I enjoy going back to work on each day.

Working on this has another benefit, it’s reminded me that I need to focus more, to work on just one thing at a time: Do one thing at a time and do it well.

My weak C++ is overkill.

Posted by | Posted in Game Development, Life | Posted on 30-07-2012

In the space of the last two weeks I’ve done a few programming tests, travelled down to Oxford for an interview + test and failed multiple times.

The feedback has been consistently inconsistent. Having failed at one test due to my approach being “overkill” and focusing too much on the technical I decided that it needed a bit more work and another approach implementing that was a little more bare bones. Then when the Oxford based studio wanted an example of some code I reused that “overkill” code for this purpose. This time apparently my C++ was “too weak“.

At this point, and over £90 down on travel expenses which will never be reimbursed, I’m feeling a little out of sorts with the whole process. Previously I’ve been head hunted by other companies, I’m still one of the first people that our old CEO approaches when he needs a coder and whilst everyone has something they don’t like about the way I code they still tell me that they’d happily work with me again.

So what’s going on?

Maybe I just don’t fit that eminently employable mold that everyone seems to be getting squeezed into lately? No, well “yes” but it’s not quite that simple. I don’t have a great range of demos to show people, or a large volume of finished projects. Mostly my spare time coding is learning about a single thing that doesn’t really add up to what you’d call “a demo“. The titles I’ve worked on are usually my demos but recently EVERYONE has insisted on seeing production quality code. By “production quality” I think they’re actually meaning some kind of aspirational coding quality that I’ve yet to see in real game code but we all know what they want anyway. I don’t have the code for a lot of projects, and even if I did it’s under NDA as far as I’m concerned. I don’t go around showing people the code from other companies projects because it’s not mine to show.

Of course there’s always the “coding test“; the ultimate independent arbiter of a programmers ability! There’s no better test than seeing how they solve the old point-is-inside-a-polygon with pen and paper to really tell you what kind of a programmer is sat before you! Maybe instead it’ll be something almost 20 or 30 lines long with a couple of functions just to see how they cope, or my new personal favourite; the whilst ski-ing with your new co-workers which route do you take semi-psychological question. Yay! Shame that “bury their corpses in the mountain snow for giving me this stupid test” wasn’t one of the possible answers.

What a fucking ball ache, plus a massive waste of time. They’re like any bloody test, they tell you how good the person sat in front of you is at that test and that test only. Not what they’re coding style is, not how quickly or well they can change that style to match your companies Byzantine preference, it doesn’t tell you how they learn, adapt or take criticism of the approach they’ve used. It doesn’t help you see why they have those recommendations on LinkedIn (Did they ask for them or were given? Who are those people to you friends or just co-workers?), what they’d like to learn more about or where they’re weak.

My personal experience is that I seem to be getting filtered out at a lot of these tests, even for companies where their whole game is less complicated than a single feature I’ve worked on for other titles. Apparently all those years of experience don’t matter because they don’t like the style I used to answer an arbitrary test question on a sub-subject that I haven’t needed to look at since the second year of University over 10 years ago… I still answered it and in the last interview I even got praised that I’d taken the correct approach to solving it!

What seems to happen is that I fall foul of these tiny tests that stretch some irrelevant scrap of knowledge or practice and that’s it, test over, interview failed. For the bigger tests, the tests you can do sat at home, I’m either going to too much effort (wtf!?!) or I’m just not hearing back from places, at all.

These places aren’t Valve, Sony, Microsoft, BioWare etc. No, I’m falling flat on my face with over a decade and a half of programming practice and 9 years in the Games Industry for companies making mobile phone games who have development teams of over 140 people. We did MotoGP 10/11 for Xbox360 and PS3 (and an internal PC version) with less than 50 and I wrote major pieces of core functionality and gameplay for those damned games.

Does that make me the best coder I know? Good grief no, I’m average, sometimes I’m better than the next guy, sometimes I’m worse, frequently it depends on the task at hand. If you want to wait on finding that super-coder-from-the-year-3001 then just say so but don’t expect to hire him for as little as you’re offering me.

The upshot?

I’m tired, I feel a little beaten up by this application and interviewing process. I wish I could hit pause, get a cuppa, tell everyone to fuck off… and quietly turn 33 years old on Saturday 4th Aug (I’d like a career change this year please!), returning renewed, ready … and tell everyone to _really_ fuck off because I’d rather go Indie than work for most of these places that I’m applying to. Sadly this on-again/off-again relationship I’ve had with contracts and work post-Monumental-Games-Ltd has meant that I have absolutely nothing left of savings, and since I haven’t even been paid for my last bit of contracting(!) I am pretty screwed this month too.

This isn’t a very satisfactory ending to this post because this isn’t some story with a conclusion, this is just my life recently.

I thought being unemployed meant having nothing to do! (+ Birthdays!)

Posted by | Posted in Game Development, Life | Posted on 16-07-2012

The title is a little white lie, I don’t know anyone who finds being unemployed relaxing. Everyone I know is always running around trying to find more work.

Take the last few weeks for example: I’ve had several telephone interviews, written hundreds of emails, updated my LinkedIn profile, written a distance field ray marcher as a demo (over a two week period), done two technical tests – one taking 1hour 30mins the other spread over 3 days, started a company (Red Sail Games Ltd) for my own titles (if I EVER get the time to work on them), travelled to York & Scarborough to visit family and friends then rush back for an interview and then had Mark & Linda and 2 year old Layla stay for this weekend just gone, not forgetting that I’ve also had a minor bout of insomnia for the past week or so, also just been chasing agencies about work in fact in another window I’m just writing another email to one!

I am completely exhausted, as I sit here typing my left eye is actually twitching and aching! Odd.

So of course today I am also working on improving the program I wrote for the technical test that I’ve just spent 3 days working on. This is in case they come back and either want to know more or actually get me down for an interview. I may also use it just as an example that I can point people to since it can be used as a generic “map” implemented as a Red-Black Tree which doesn’t depend on the STL. There’s so many more things that I can do with it and I want to explore some of the options without having to keep it tied into the test framework that they sent me it in.

Oh yes I keep meaning to mention this too: BIRTHDAY(S)!!!

This year Danni is turning 30 on the 14th August, yes I know it’s hard to believe however -> I am also turning 33 on the 4th August and since we will be away over the weekend before Danni’s birthday and the day itself we’ve decided to do some combined celebrating on/around my birthday.

What this means is that there will be … a “thing” happening on Saturday the 4th August… as you can see, this has been carefully thought through. There may actually be a couple of days of celebrating this year just to spread things out a bit due to the bad weather. There might be a party however and probably a day out somewhere. I guess this is more warning than information :)

The other thing to note is the peramlink to this post… which is number “1234” ;)