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

Battering the RAM

I had a bug in Production Line recently that made me think. Large factories under certain circumstances (and by large I mean HUGE) would occasionally crash, seemingly randomly. I suspected (as you usually do if you have a large player-base) that this must be the players machines. If code works fine of 99.5% of PCs, and breaks on the remainder…that seems suspicious. Once I managed to get the same save games to crash on mine, again in seemingly weird places, but always near some memory allocation…the cause became obvious.

I had run out of memory.

This might seem crazy to most programmers because memory, as in RAM is effectively unlimited right? 16GB is common, 8GB practically ubiquitous, and in any case windows supports virtual memory, so really we are talking hundreds of gigs potentially. Sure, paging to disk is a performance nightmare…but it shouldn’t just…crash?

Actually it WILL, if you are running a 32 bit program (as opposed to 64 bit) and you exceed 2 GB of RAM for your process.  This has always been the case, I’ve just never coded a game that used anything LIKE that. Cue angry rant from unhinged ‘customer’ who thinks it is something akin to being a Neanderthal that my game is 32 bit. Take a look at your program files folders people…the (x86) is all the 32 bit programs. I bet yours is not empty… 64bit is all well and good, but the majority of code you run on a day-to-day basis is still 32 bit. For the vast majority of programs it really wont matter. For some BIG games, it really does. Clearly a lot of FPS games easily need that RAM.

So the ‘obvious’ solution is just to port my engine and game to 64 bit right?

No.

Not for any backwards compatibility reasons, or any porting problems reasons (although it WOULD be a pain tbh…) but because asking how to raise that 2 GB RAM limit is, to me, completely the wrong question. The correct question is “Why the fuck are we needing over 2GB  of RAM for an indie isometric biz sim anyway?” And it turns out that if you DO ask that question, you solve the problem very quickly, very easily, and with a great deal of pride and satisfaction.

So what was the cause? and how was it fixed? Its actually quite surprising. Every ‘vehicle’ in the game code has a GUI representation. Because the cars are built from a number of layers, they are not simple sprites, but actually an array of sprites. The current limit is 34 layers (some layers have 2 sub-layers, for colored and non-colored), from axles to drive shafts to front and rear doors, windows, wing mirrors, headlights, exhausts and so on. Every car in the game may be drawn at any time, so they all need a GUI representation. The game supports 4 directions (isometric), so it turns out we need 34 layers X 2 sub-layers X 4 directions = 272 sprites per car. Each sprite needs 4 verts and a texture pointer (and some other management fluff). Call it 184 bytes per sprite, that means the memory requirements for any car amount to 50k per car. If the player has been over-producing and has 6,000 cars in the showroom then this suddenly amounts to 300MB just of car layer data.

So that explains where a lot of the memory comes from…but what can I do about it? I’m not stupid enough to DRAW all these all the time BTW, I cache them into a sprite sheet and when zoomed out I use that for single-draw-call splats of a whole car, but for when zoomed in, or when the sprite sheet is full, I still need them, and I need them to be there to fill the sprite sheet mid-game anyway. How did I reduce the memory requirements so much?

Basically I realized that although SOME vehicle components (car doors etc) had 2 layers, the vast majority did not. I was allocating memory for secondary layers that would never be rendered. I simply reorganized the code so that the second layer was just a NULL pointer which was allocated only if needed, saving myself the majority of that RAM. With my optimizing hat on, I also found a fair few other places in the code where I have been using ints instead of shorts (like the hour member of a sales record) and wasting a bunch more RAM. Eventually I ended up knocking something like 700MB of RAM in the largest, worst cases.

Now my point is… if I had just taken the attitude of many *modern* coders and thought ‘ha! what a dick! lets allow for > 2GB memory’ rather than thinking about exactly how the amount had crept up so much, I would never have discovered my own silliness, or made the clearly sensible optimization. Lower memory use is always good, as long as there isn’t a major CPU impact. More vehicle components can now fit into the cache, and be processed quicker. I’ve sped up the games performance as well as reducing its RAM hunger.

Constraints are good. If you have never, ever given any thought to how much RAM your game is using, you really should. It can be eye-opening.

 

 

Giving a talk at a game conference. Yeah…lets stop doing this.

I’ve been thinking about this post for a long time.  Before I go any further let me state I’m not criticizing the actions of any person, or any organisation., Businesses make money, thats what they do, and people weigh up their own pluses and minuses, thats fine. I’d just like to give my current, 2018 take on the the topic of indie game developers giving talks at conferences and shows, like GDC, EGX, whatever.

For the record, I’ve done lots of these talks (although a lot less than some more ‘popular’ devs. I gave my first talk at the ‘lil bit of alright’ show at channel4 in London (if I recall), and I gave a talk a few days ago. My two ‘big name’ talks were probably my GDC indie rant called ‘fuck unity and the horse it rode in on‘ and also my appearance on a panel at steam dev days talking about marketing. (Dev days is a special case, keep reading*).  I also got into an argument with epics mark rein once at a talk, and was also fairly recently at a talk in Paris which was rather cool.

Heres the thing most people who are not developers probably dont realize:

You generally don’t get paid.**

Not only that, but if the talk is a long way away, you almost certainly dont get any travel costs reimbursed. If you have to fly from the UK to San Francisco for your talk…well tough. Your airfare, your airport parking, your transit to the hotel, your hotel bill…its all on you. If you are wondering what you DO get…well you get a VIP pass, that lets you go to the show. Cool huh?

On the plus-side, you DO get some ‘exposure’ to the media, and mostly to…other devs. A lot of people will know who I am because of my dev days talk, or my GDC rant, or the other talks. If you are an introvert, its great to do a talk, because then people come up to YOU to introduce themselves and you dont need to do it yourself. There can also sometimes be some cool media buzz around you if your talk goes well. My GDC rant and the mark rein thing both really lifted my profile, and a lot of devs have watched my dev days marketing appearance. It can make you well-known and popular at parties…

..WITH OTHER DEVELOPERS.

I haven’t seen concrete evidence that this really translates into more sales. if there is a link between giving talks at shows, and higher game sales then…its really pretty weak. How can I say this? Here is a list of people I never see give a talk at a developer show:

Garry Newman (Rust/Garry’s mod) The RimWorld dev, The PUBg dev, The Factorio Devs (Wube), Notch. When you think about it, these guys should be headline-talk stars at any show with a bunch of developers, but yet they are not there, and instead we get the SAME faces from the SAME developers regularly ‘doing the show circuit’ giving inspirational talks and helpful advice about their games that sell maybe 50,000 units. If there really was a correlation between sales and talks, a lot of the indie darlings on the speaker circuit wouldn’t be seen again. The correlation between commercial success and developer profile is VERY LOW.

Thats not to say that the indie darlings talks aren’t great, or the people fab, or the talks helpful and entertaining. They are often all of these things, and I love those people but… and here I am going to blunt.

Why the fuck are they bothering?

If you wanted to ‘share your story with other developers’, then write a blog post. Google can auto-translate it, and everyone on earth can read it, not just those with the spare cash (and time) to fly to San Francisco. There is zero argument to hide your wisdom behind a commercial paywall if your TRUE desire is just to ‘share with other developers’. The idea that some people in the developer community just love the experience of giving talks strikes me as bullshit. FFS we are introvert programmers (most of us), you think we do this for FUN? I know NOBODY who really enjoys the ‘giving a talk experience’. We do it because we think it will make us successful.

There is a popular piece of ‘general knowledge’ among artists that when developers ask you to work for them on their game, and you ask about payment, and the answer comes back ‘we dont have any money for you, but think of the ‘exposure!’ that this is LIES and BULLSHIT and a complete con, and you should tell those people to get lost. You undervalue yourself by doing indie artwork for free, its demeaning and insulting and drags down the income of the entire industry.

I refer you to my early statement about how much developers get paid to give a talk.

Things would be different if the flavour of most shows was ‘hey…its not a money thing, this is a great community-driven place to meet and share knowledge, its all non-profit’. But this is NOT the case. Running these shows is very profitable, they will make money from everything. They charge developers to have a booth to exhibit, they charge developers to come to the show, they charge developers to ‘sponsor’ the show, and not just the show, the show guide, the lanyards you wear around your neck, the name badges. Even the ‘free’ (haha) coffee between talks is ‘sponsored’ at a markup of about 10,000%. Some shows even have ‘tiers’ of attendees. The ‘special’ talks are given to the attendees with the special passes, who have more money, the people with ‘only a few hundred dollars’ tickets get to see the ‘cheap’ talks. AFAIK, the people giving the actual talks, providing the actual content are STILL not paid. Oh BTW most of the shows have stewards who are volunteers. Yes…volunteers.

THIS IS GENIUS on the part of the show organizers. They are even cleverer than facebook, which gets all its content provided by us, for free. In the game shows case, we (devs) provide all the content, and they then CHARGE the rest of us to go access it. Its amazing. Sure they have to to hire the venue, pay for staff, catering, security etc, I get that. Nobody expects a show to be free, but if I give a talk at a show, listed in all of the guides, the brochures the social media, the website…how come the person who cleans the toilets at the venue is earning more than me, a game developer with 20 years commercial experience?

What the actual fuck?

Of course its not phrased that way. if I ran the Positech Games Conference, and told you all to submit your talks to me (please put lots of effort in, with no guarantee of acceptance), and I would pick the lucky few who would be allowed to stand on my stage and read out their talks to the rest, who would all pay me for the chance to listen to the lucky chosen speakers, and I pointed out that I was happily making money from the event, paying the staff, all of them, except you…well you’d laugh in my face.

I don’t blame show organizers, they are behaving very rationally. its supply and demand, and they know indies are SO DESPERATE for exposure they will happily talk for free, even fly/travel at their own expense to go give a talk. But personally…I’m done with it. I will happily give a talk at a show for $2,800 (roughly what makes sense for a day of my time), but certainly not for less. I absolutely know this means nobody will ever see me give a ‘proper’ talk again, but if you want to read what I think on any topic, just bookmark this blog. I get to control what and when I write here, you read it for free (a few discrete ads on your right…) If you want to help yourself to a tea or coffee as you read, feel free to sponsor it yourself. You will still see me at shows, but I’ll be in the audience, not on a stage.

**Steam dev days is the best show I’ve ever been to, and has treated speakers the best by far in my experience. None of this article applies to them.

I have many leather-bound books and my car smells of rich mahogany

Thats paraphrasing the great Ron Burgundy, in case its not clear… Anyway…

One of the main areas of game that is ‘missing’ from the current alpha build of my car-factory sim game ‘Production Line‘, is all of the high-end stuff that goes into real luxury cars. (By luxury I am meaning $100,000+) Right now it is very hard to actually make a car that you can sell for $100k without a huge markup, and although it can be argued that cars at that price range *do* have a huge markup, its not quite *that* crazy. Some of the things that spring to mind are probably high-performance engines (turbo etc, lots of cylinders, or multiple motors for electric cars), fancy bodywork such as gull-wing or falcon wing doors, and plush interiors. I’m currently thinking about the design of the ‘plush interiors’ stuff.

Although its probably declining in fashion, there is definitely a market in luxury cars for real-wood in the dashboard and other internal parts of the car, such as the area around the gear-stick (thats stick-shift for you Americans?). I am guessing that the price differential between a simple plastic dashboard like you find in most cars to a smooth polished and multi-layered varnished wooden dashboard is probably pretty massive. FWIW I used to varnish mahogany for a living. its harder than it looks, especially if you want that smooth-as-glass finish without a single blemish. Its all about removing all the dust. I digress…

A quick glance at the BMW configurator (UK) for the 740e saloon (about the right price range) shows me such options as ‘fineline wood high gloss’ for ‘included in price’ to ‘Eucalyptus smoke brown’ for an extra £995 ($1,373). Thats a nice handy nudge towards luxury pricing in my game! Wooden dashboards here we come.

Dashboards are just one thing, what about all that shiny chrome stuff you get in cars, surely that costs a bit too? Indeed it can. A pair of chrome wing-mirror covers for the Jaguar XJR (A stupidly slow and overpriced low-tech car for the money…but again…I am getting distracted) will cost you… £198 ($273). Even Aluminium gearshift paddles cost £389. its hilarious how peoples sense of perspective implodes the minute they buy a luxury car. Anyway, its amazing how many bits of a car you can cover in chrome, if you want to give it a ‘luxury’ feel, and I certainly don’t want to bore the player (and complicate the GUI) with a bazillion options, so I was thinking of just including a single ‘chrome fixtures’ upgrade for luxury cars in the game. I’m guessing $1,000 should cover it? I’m amused to discover both that Aston martin calls this stuff  ‘jewellery pack’ and that it doesn’t price it separately! haha. Its configurator is hilariously gratuitous.

The third option that I plan to add soon is that of interior lighting. The Ford ‘edge’ talks about ‘enhanced ambient lighting’. This is the stuff you dont notice until its gone, but it includes subtle lights in the foot-well by the pedals, the lights by the door handles on the inside, and those cool lights that gently fade in and out when activated rather than snapping on. Looking at the difference between models, I think some companies are charging up to $700 for a ‘premium ambient lighting package’.

So that gives us an extra $3,000 of new features to push up the price of our car. To summarize:

  • Premium ambient lighting package
  • Wooden Dashboard
  • Chrome fixtures

Thats the easy bit, where do we add these in the production line? Right now we have ‘fit dashboard’ which is part of the larger ‘fit accessories’ task. At the moment it takes 2.0 seconds of player time, but it has a number of additional options, such as ‘driver and passenger airbags, a heater, and touchscreen. This already can cause a bit of a bottleneck, so how about this as a solution:

  • Split the existing ‘fit dashboard into two tasks: ‘fit controls’ and ‘fit cabin options’. I can rename the original ‘fit dashboard to ‘fit interior’.
  • Set the wooden dashboard, chrome fixtures and premium lighting to be options under ‘fit cabin options’
  • Set the airbags, heater and touchscreen to be options under ‘fit controls’

The only problem with this would be that if I have the fit interior needing research to be split into two, that means you need to do this research AND expand the line slightly before fit heater & airbags and touchscreen become an option. What I *could* do here is to allow them to also be options under the parent, which should work AFAIK, but is something I have not done before. Would that be confusing? Hmmm.

So question one is does this work for everyone as a system to incorporate these new features in the production line. Wooden dashboard would require the new wood resource, chrome requires chrome, and ambient lighting would need sensors and light bulbs (also a new resource).

My second question on this is where these items should be researched. Wooden dashboards isn’t really a ‘technology’ so might it be something we can add to the design studio instead? That facility does become redundant once all the current body types are done. Or… is that going to lead to confusion? Also surely getting the right production processes to build a wooden dashboard surely *is* a sort of technology? Hmmm.

As always, thoughts and opinions are very welcome.

 

 

 

Shadowhand, post-release analysis

So… recently we released our latest 3rd-party title: Shadowhand, developed by Grey Alien games. Its a unique RPG/Solitaire/Visual-Novel hybrid where you play the role of a highway-woman in 18th century England. The game has been out just over a month, and its selling ok, and is getting extremely good reviews and playtime. Right now its steam reviews sit at 85% positive, and the median play-time is 4 hours 58, and an average of 10 hours 36. A large proportion of the players are playing 20 hours+, even slightly larger than for Production Line, which has been out for much longer.

We spent some money on release to get the game noticed, which worked to an extent, but because the game had dramatically overshot its original production schedule, we ended up releasing it before the steam Christmas sale, which possibly impacted its launch a bit. (although I still think this was the correct decision, you can ALWAYS find an excuse to put off releasing a game…people even lose their home whilst not realizing this…). The game is selling ok, but it is not a clear indie hit right now, and obviously me being me, I want to analyse why, and how we can change that.

We did get a few negative comments with the first release, saying basically that the game was too RNG-based, but since we got those, Jake patched the game to round-off the impact of the RNG and make it more clearly skill-based. This was more of a perception problem than reality, as when you get deeper in to the game its hugely skill-based. The very good reviews, and the extremely long playtime suggests to me that the *actual game* is very good, and should be selling better. For now, lets assume that changes to the core game are not going to make a positive difference to its sales. What other possibilities are there?

We know that the game sold well during the recent steam sale, more than its selling now, and that seems to be just that more people see the game during a sale. Also we got some coverage at giant bomb, which led to a small spike in sales too. It seems that when the game actually gets shown to people, they buy it, so the main problem here seems to be exposure. Exposure can either be organic, solicited, or paid.

Organic.

The steam algorithm should theoretically send people towards shadowhand who will like it. We may be a bit cursed here because the game is a bit RPG, a bit puzzler, a bit casual, a bit adventure…and when you have something *different* recommendation algorithms can really struggle. Are we getting the right people seeing the game? Sadly this is mostly out of our control, although it may be slightly influenced by the ‘tags’. As I understand it, the more people who upvote or apply a tag on a game page, the more that tag is seen as relevant by steam. Are there maybe some tags we are missing that we should have? It looks like not enough people have applied ‘solitaire’ which is a big surprise.

Another organic route is through user-reviews. the reviews are good, but as ever, the number of players who leave a review is always really low. We already have a decent review score, although it could always be higher. Obviously if you bought and enjoyed the game, we REALLY want you to leave a review of it. I think that this creates some more SEO too (within steam) as presumably reviews show up on users profile pages etc, all more ways to enable organic discovery.

When it comes to off-steam methods, it matters a lot if the game gets tweets or forum-posts about it, but again, this is something mostly beyond our control. We do have a facebook page for the game, which I think also helps.

Solicited

As you probably know, steam forbids (quite understandably) games from soliciting for reviews from within the game, especially for stuff like giving out free xp or whatever. This was a curse with mobile and tablet games. However, we are possibly not as creative as we should be when it comes to encouraging people to support the game. AFAIK its fine for me to post here that we really appreciate steam reviews, for example. Something I’ve seen other games do is to make more of a feature out of their social media presence from within the game. For example Democracy 3 has a link from the main menu to the games facebook page. We are probably being a bit meek there, but does that ruin the immersion of the game to include such stuff? Would Jake even do that? :D

Paid.

I’m on solid ground with paid promotion because I know how it works. My experiments with shadowhand show that I can get a click-through to the steam store page for about $0.27. In December the store page stats give me reason to believe that a visit to the shadowhand store page earns $0.11 in immediate gross revenue (before steams cut). SH currently has more wishlist adds than owners by a factor of five, suggesting a lot of the visitors will not necessarily buy the game, but they may well add it to their wishlists. Is that difference enough to justify a $0.27 click? Gah! its so hard to tell. Just for LOLs I checked the same stats for production line, and it looks like a store page visit there is worth $0.25. Gah!!! What is happening here? I strongly suspect that its price related. basically strategy gamers are prepared to pay more…and players of other games are more prepared to wait for a sale with a bigger discount.

I guess in conclusion I really need data on the conversion rate of all those tons of wish-list adds to actual shadowhand sales during an actual weekend/ weekly sale. In the meantime, there is a lot of staring at numbers.

2017 in statistical review

IMHO learning from past endeavours is pretty much what life is all about, so what happened to positech games in 2017?

Steam revenue: DOWN 18%

Total Game revenue:  UP 3.95%

Income from democracy 3 (incl DLC): DOWN 20%

Expenditure (game dev, marketing, everything): UP 61%

Investment income: UP 95%

Share of total games revenue from 3rd party* (published) titles: 17% (down from 21%)

*total income, not positech’s share.

Net profit after tax:  UP 27%

Steam revenue from OSX: DOWN from 10% to 8%

Steam revenue from Linux: DOWN from 1% to 0.8%

Revenue from itunes: DOWN 39%

Share of income from game development: 82%

Share of steam income from China: 2% (3% in last month)

Share of Steam income from Russia: 1%

A surprisingly good year, considering Production Line (my main new earner) is in Early Access still, and shadowhand released so late. Democracy 3 and Big Pharma made hefty contributions, and my whizz-bang stock market investments have done amazingly well. OSX continues to be fairly minor, and linux is practically irrelevant. I can’t see me bothering with itunes any more, and likely doing very little (if any) publishing of 3rd party stuff in future. I’m concentrating on my core business, with a healthy side order of stock investment and long-term investment in green energy and infrastructure projects.

Looking at reviews, and play times for production Line & shadowhand gives me a lot of optimism for 2018, plus I have a secret thing I’ll announce in about 6 months which is likely to do well (I hope!). Onwards and upwards.