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

Long numbers and dumb coding in Production Line

I have a few reports of a bug in production line where people have got VERY good at the game and amassed tens of billions of dollars. Nothing actually crashes, but financial reports start filling up with gibberish like $-1,-4,-2,-0,-1,-3,-5 and so on. The cause is simple, the fix difficult(ish) and the wider implications worthy of comment.

Firstly, as most coders can already guess, its because I’ve gone outside the max limits on the data type I’m using. I use a ‘float’ for financial figures in the game (mainly because some items get percentage reductions due to global events and competition, so I need decimals) and because *somewhere* I must be casting it to an int (no idea where yet) the numbers I can represent are limited to -2,147,483,648 to 2,147,483,647 because an int is 4 bytes. If I was using only a float, things would be super different. More details here.

Anyway, although generally speaking numbers like that are big enough, in a financial sim, restricting any possible number to a max value of $2billion is not ideal. My game is not ‘realistic’ in costs, and its rare that players finances will exceed $100 million, let alone 2 billion, but obviously it happens now and then and the game kinda screws up.

The fix is easy. I just need to replace that datatype, but the actual implementation is a bit more messy, because that means old save games need converting or handling as I load those numbers in (right now the game only knows how to load ints, floats and strings and likely casts to ints somewhere). I also have to go through every place where those numbers get locally stored by any GUI code and ensure I’m not using ints there either, and of course I need to change my display code so it handles floats properly and converts them to strings properly.

TBH its likely only a days work, but assuming another day to test it, and then a few days of ‘unstable build’ roll-out to the hardcore before folding it into the main code branch, all this means that this will be a fix coming after release on Thursday, and NOT today :D

Perhaps the more interesting topic is how do you deal with edge cases and marginal cases with a sim/strategy game. I know from experience that people WILL push these games to the extreme and WILL break them. I’ve had negative reviews from people with >100 hours playtime because their extreme playtime has led to discovering exploits, and edge cases that allow them to ‘break’ the game.

Anyway, this is a real issue because making a balanced, playable, fun, reliable game that works for 99% of the playerbase takes 99% of the effort, and making it work perfectly in EVERY edge case is…another 99% of effort. Generally speaking, its way better to concentrate on fixes, features and changes which make the game better for the 99% than to fixate on the extreme edge cases, especially as a time-limited indie who can never do everything.

I’ll fix the numbers thing post-release, but I have to admit that are likely some other real edge cases that I never will. This is also true of any of my games, like Democracy 3, or Gratuitous Space Battles. There are probably obscure edge cases and tactics that you can discover in all my games that ‘break’ them, after 100+ hours of gameplay. Thats not shocking. I’m always going to make the majority of players who play in the ‘usual’ way my primary focus. Edge case fixes are something I like to do, and want to do, but you can never get them all, or fix them all. You will go mad trying to do so.

Do not forget that there are companies like EA/DICE where thousands of players will scream that ‘X’ is unbalanced or ‘Y’ breaks the game and has not been fixed!, and yet presumably those companies have 50x the manpower I do. The likelihood is that they have data that shows this is only true in 0.1% of cases, and their dev time is better spent elsewhere. I have no illusions that players will accept that as an answer, but that will not stop it being the case!

Production Line Updated to 1.68

This is the last feature-update before we come out of Early Access. The next week is likely to just be bug fixing and usability/UI tweaks and fixes. Here is the list of new stuff:

1) [GUI] Changed vehicle renaming so it doesn’t annoyingly add (1) to a duplicate name until you leave that screen, to prevent driving people MAD.
2) [GUI] Component prices on the finance screen can now be sorted up or down by either name or price.
3) [GUI] Added remappable shortcut key (B) to toggle blueprint mode.
4) [GUI] Redesigned layout of car design screen to accommodate longer languages.
5) [Feature] Added Swedish translation and improved others.

6) [Bug] Fixed bug when adding items to a supply stockpile where some categories would occasionally not be shown.
7) [GUI] Smart junctions now retain their list of designs when switching in/out of design mode, and also add new designs to the default list.
8) [Bug] Fixed crash bug when moving existing paint drying slots.
9) [Feature] You can now move supply stockpiles, and they keep their configuration when moved.
10) [Bug] Fixed bug where if you changed floor textures under office space, then moved existing office facilities, the default office floor texture was not re-set.
11) [Feature] Added researchable make electric motor and make electric powertrain slots.
12) [GUI] Canceling a slot or facility movement action snaps the item back to its old location.
13) [Feature] You now get a brand awareness boost of up to 20% automatically if you have high number of sales over the last four hours.
14) [Bug] Moved slots now remember their import preferences.
15) [Feature] Telling a supply stockpile to copy a specific task’s requirements now links it, and it auto-updates to account for new research. Any manual change to the slot breaks the link.

16) [GUI] You can now place down conveyor belts as blueprints.

17) [GUI] The production schedules at the start of each line are now saved if you move that slot.
18) [GUI] Slight gradients on the vehicle design price slider now mark out the different price ranges.
19) [Content] Some new items have been added to various slots, to show gantrys, dashboards, shock absorbers, speedometers,automated platforms & scisssor lifts.

Hope you like the new stuff. feedback most welcome, as are bug reports, we really want a bug-free emergence from Early Access. Many thanks to all your support while the game was in EA. Suggestions for future updates also welcome. if you like the game, bought it from steam and have not yet left a steam review, it is much appreciated!

Production Line development cost breakdown

Only part of the ‘true cost’ of producing a game is the narrowly defined ‘development cost’, as it should also theoretically include an allowance for ongoing studio costs over the lifetime of making the game. The cost of heating my home office, the accountant, the webhosting for all my sites (including this blog) and depreciation of my PC should all play a part in calculating the *true* cost of producing Production Line. (My car factory strategy game for the PC).

With this in mind I thought I’d briefly add up some estimates of the paper-cost, the estimated cost if I was paid a regular salary, and also the true, true cost.

So the basic cost, if I break it out into categories gets me a breakdown like this:

If I assume as lead programmer I should be earning £60,000 (first result I found. Note that I’m the only coder and have 20+ years coding experience), then things change a lot to look like this:

Then I need to add in the office costs. Firstly I’d get a pension as an employee, so I should add that in over the dev period (3 years of contributions), 3 years of accountancy, 3 years of webhosting, and as I replace my PC probably every 4 years, I need to allow for 3/4 of a new desktop PC. I also have 3 years of office internet and phone bill to include. There is stationary, heating and other bullshit, but lets just call that $200 a year. New chart:

So is anything learned from this short little exercise? Well there are many ways to interpret it. Firstly, It really looks like I may be undervaluing music and SFX in my game. Surely combined they should be more than 5% of my dev budget right? And translation, although the costs scare the fuck out of me, actually seems relatively small in terms of the big picture.

It also brings home just how important personal productivity and time management is. If I messed around on twitter less, got distracted less, and maybe got up a bit earlier each day, a 10% increase in my productivity would have a massive impact on overall costs, probably saving me enough to make a huge boost to the art budget.

It also shows me that trimming the art budget if the game is not doing well is absolutely the wrong target. Its all about the code.

And finally its worth keeping an eye on the external dev costs such as webhosting etc. Each item is small, but together they are virtually the same as the art budget. Also worth noting: I deserve an absolute monster PC every 4 years, thats for sure. Even if I doubled the price I pay for a PC, the faster compile times would probably pay for themselves.

At last… Production Line is in beta

I updated the version of the game today to build 1.66, on Steam, GoG and the humble store / direct. The latest update is 1.66, a build whose major feature is the introduction of the late-game ‘world events’ feature. That was THE feature that I was determined to get in before I could describe the game as feature complete. it may need some tweaking and balancing, but now its in, i’m calling the game ‘beta’. You can read the full list of changes in this version on the forum here.

There will still be a good few weeks of tweaking, adjusting, balancing and checking before we actually take the game out of Early Access and declare it ‘released’. And even when that is done, its very likely that I will continue to spend a decent amount of time of improving and balancing the game. I don’t have any firm plans for expansions yet, but I’ll have time to think about it, and to ask people what they might like to see.

Production Line is the first game I’ve every released in early access on steam, although I’ve done low-key betas before (Big Pharma was one). I definitely have enjoyed the EA experience, but I think it could possibly be facilitated better within the steam platform…

I used my own system to gather data from players within the game to find out what the player-base thought my dev-priorities should be. I also had to use the ‘artwork’ upload part of steam a lot to share screenshots of stuff that was a work-in-progress or ideas for improvement. TBH it felt clunky, and not fleshed out.

There is also no way to tell (without collecting your own data) how many people have played a beta build on steam, making it a bit tricky to know that the ‘unstable’ branch had got enough testing before rolling out changes to everyone else.

Anyway… Its been great fun, and a lot of effort (and time!) has gone in. I even got into the habit of doing almost-every-week video blogs to document work on the game, here is the latest one:

I’ve really enjoyed doing those too, and will probably do a few more to highlight any post-release tweaks and ideas for expansions that might crop up after the game leaves early access. After that, it would theoretically be time to think about what game I would work on next (or consider ports of PL to other platforms). The thing is, we already have Democracy 4 in production, and as that gets closer to its initial Early Access (or even pre-EA), I’ll need to devote more time to producing that.

Finally its worth mentioning that the price of Production Line will go UP before release from its current $19.95 to $24.95. I’ve pencilled that in for 12th February, so if you were considering buying the game at some point, don’t wait too long :D And yup, we get the biggest cut of the money when you buy direct:

Promoting Production Line

For the last year or so I’ve been employing a pretty ‘passive’ approach to promoting my current game Production Line. By this I mean that I have primarily concentrated on posting on my own forums and the steam forums, posting weekly video blogs, and cross posting those to the forums, reddit and my production line facebook page.

In a sense, all of that is basically preaching to the converted, as if you follow me on youtube, are subscribed to the reddit, or a fan of the facebook page… well you already know about the game and very likely already bought it.

The only way in which I am actively reaching beyond the current audience is by some facebook ads, but obviously the cannot reach everyone (loads of gamers don’t even have facebook accounts). We don’t have any more game shows coming up for me to meet youtubers and press, so apart from facebook, to the outside world I’m pretty silent about the game.

I should probably get used to changing that as the game eventually shuffles towards release (probably January next year?). With that in mind, I think I’m going to set aside some time next week to build up a proper list of youtubers to get in touch with, and put together a proper updated press release with new screenshots and information. The game is now on Kartridge and the Humble Store, so that definitely needs updating.

 

Of course the trouble with any *active* promotion is that it involves my time. The blog posts, video blog, tweets and facebook posts already take up a big chunk of time, and I’m busy coding the game as it is! Unfortunately I don’t have any *easy* way to outsource any of this work. It is *me* in the videos after all, and even if I could record the video, then pay someone else magically to disassemble my green screen, render out the video (only 2 mins editing normally needed), upload it, cross-post it and so-on… its only likely saving me 30mins-1 hour a week anyway. Thats also the fantasy scenario where someone beams star-trek style to my house to assist me, then beams out immediately.

SO I remain, after all these years both the code AND the marketing/PR/Biz bottleneck for my company. I have a horrible feeling that if I *did* ever expand further, code would be easier for me to outsource the rest of it. I’ve tried outsourcing PR a lot of times and never made a decent ROI (or even a positive one).

Food for thought.