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

Hybrid and electric engines in Production Line

So I have put it off long enough, due to fixing and improving existing things, but the ongoing clamour from the user-base to include these features into Production Line (which for new readers, is my PC car-factory tycoon game), means that I needed to give in and stasrt work on getting it into the game, which is what I’ve done for the last few days.

The design basically comes down to defining each car as being one of three types, based on what people generally refer to as the ‘power-train’. A car is either ICE (internal combustion engine (diesel/petrol), Electric or Hybrid. This is simple enough, and I can work this out from a cars design simply by seeing if certain mutually-exclusive features have been added, for example ‘hybrid power-train’. Any car that is not explicitly hybrid or electric is assumed to be ICE. (This system also allows support for me to at some later stage maybe implement diesel/petrol as two distinctly different technologies.

The slight complexity comes from the fact that for the first time in the design of the simulation, this has to be applied to each CAR, not each design. This is because you can (and players do) change the features of a car design while cars are actively being produced. Its no good changing car type A from ICE to electric when 33 cars of that design have already skipped battery installs and have fuel tanks and radiators…

So thats the first obstacle I had to get over. the second one is to add new power-train-specific support to each production slot. For example, the ‘fit fuel tank’ slot will now fix a battery instead if the car at that slot happens to be a hybrid or electric car (and each of those their own battery size). There also is now support for entirely skipping a slot if the task its performing is irrelevant, which in the case of radiators and pure-electric cars is indeed the case (also exhausts).

So those are the big code changes that have been needed, along with support (with backwards compatibility) for saving and loading the power-train type of each car currently in the game. The other steps are relatively simple, in that they involve setting up new research, new unlockable upgrades and the applicable car features for Hybrid power-train, Electric power-train, and Large Battery support. (Electric cars will initially default to small batteries, with large ones being a researchable option). I also needed to add new resources for electric motors, and 3 different battery types, plus a composite resource for a hybrid power-train. That gives me ‘basic’ support for a choice between ICE, Hybrid and Electric . From then on, in future updates, I can introduce slots to manufacture those components, such as make battery, make electric motor etc, and maybe some researchable techs for higher power-density batteries etc. Thats all in the future.

For now it just feels good to know I’ll have this new tech in the game in a few days time.

In the meantime I am off to Indiecade Paris where I will be giving my down-to-earth honest talk called ‘how not to go bankrupt’.

Oh and by the way, if you are a steam customer, or a direct-bought customer with a steam key (which comes with every order), you might be interested to know that we now have cool Steam Trading cards available for the game.

Oh…and last thing, the steam Halloween sale is on, with a ton of cool positech bargains. Production Line is NOT discounted, nor will it be in any other sales this year, but you can buy it from the link below for $17.99 :D

More production line game balancing

Balancing games is really HARD. I’ve posted before twice about using stats to fine tune Production Line, mostly because I ma better with hard numbers than I am with reading forum comments, reddit comments, facebook comments, emails, reviews on steam and everything else the community has to say in order to draw conclusions. people generally dont comment on a game, so the 1% that do can give you a very skewed view of what is going on, and I want to ensure I am working to effectively improve the game for everyone. With that in mind lets look at some stats.

Here is a graph showing the progression within games from 50-500 game hours, expressed as the median value.

It looks like I kinda screwed up with build 1.32 and it was too generous(easy) in the long run, with the median player having buckets too much cash. I prefer the way things are now, although TBVH cash accumulates too much at the end anyway. This may be the effect of outliers running cheats though? If I look at the distribution for the current version I get this:

Which has a log scale and shows that we definitely have some people cheating at the top end, but a fair few people who have more than $100mill in hour 500. A cluster seems to be around the 1-10 mill level which is fine. overall, I dont see any major balancing issue here. Now looking at profit margins:

I really dont want the player to have significantly negative profit margins over the course of the game. Its fine in the short run, as loans can allow it, but not indefinitely. It looks like the last two builds did a decent job of preveting catastrophic meltdowns over the 100-400 hour mark, but I could still do with tweaking the marketplace to stop that negative margin being so low. it looks like the system is good at preventing excessive profits, but can resulty in unsustainable losses, so I’m going to need to tweak that a bit.

This chart is showing how strongly the AI competitors compete with the player. it looks like I made no noticeable impact on this in the last build. The AI basically runs on maximum from when you reach the 200 hour mark. This is probably related to it over-punishing the player and causing that negative profit margin. It looks like I just need the AI to back off a bit quicker once it starts having an impact on the players profit margins.

All fun stuff for me to think about today, and then tomorrow I’ll just be doing final testing before releasing build 1.34 to the wild. Talking of which…

I am increasing the price of Production Line tomorrow from its current $15.99 to $17.99. I thought this was a good time to do it, as I’ll be adding the new exciting Pickup Truck to the game:

As well as lots of new animations, and we are getting closer to the eventual point where it gets described as ‘beta’ and then eventually ‘released’. The games price has been the same all through Early Access so far so I thought it was about time. if you want to save yourself $2 you can grab it from the link below. (or steam/Gog). If you are enjoying the game, positive reviews are always nice to have :D

More balance analysis with production Line (build 1.33)

My Excel skills have levelled up since I last wrote about balancing production line using player statistics. As a result I now have more informative charts to look at when analysing play sessions from build 1.32. My intentions with this balancing are to increase the long term playability and balance of the game. basically player retention is good after 1 day, good after 7 days, but starts to tail off before 28 days, implying that the game is good initially but loses its challenge after a while. it may also suggest a lack of content, which is surprising given what’s in the game, but will be naturally fixed over time as more is added (Pickup trucks, quality control, branding, breakdowns).

Looking at the following chart I can see that the amount of cash players have after 50,200,200,300…500 hours. I’m quite happy with this. clearly the amount climbs over time, but is not exorbitant for the median player. I’d like the player to have the odd million dollars in cash, but beyond 10 million makes things a bit easy. Hopefully some expensive upgrades for luxury cars in the late game will push that down slightly.

This second chart shows the intensity of AI competition, and is basically a measure of how well the player is doing, as perceived by the AI. I can see that I was absolutely right to do away with the 50-hour moratorium of AI competitors, as clearly some players race ahead and needed to have the AI rein them in. The clear problem here is that the competition value is trending rapidly up to 100%. I feel that this is a strong indicator that the maximum competitive level of the AI just is not competitive enough. In other words, the metrics by which the AI judges the player are not being bought under control by the methods available to the AI. This needs fixing.

This final graph shows the profitability (as percentage margin) of the players business over time. Its not unreasonable for this to be low, even at a loss during the start, as the player invests in equipment and ramps up production. Over time this is trending to slightly above zero, and my raw stats show an average value at 500 hours of 7.2%. This isn’t too bad, certainly believable in an industry like car production. I dont see that anything really needs to change is response to this graph.

So my conclusions from the currently available data is that the competition index metric is too meek, and that the player should face potentially more challenging AI at the top end, but at the bottom end, it should definitely continue to act as before, taking its foot off the metaphorical gas pedal of competition. The AI seems ok at not crushing the poor-performing player, but too weak to offer a decent challenge to the high-performing one.

Of course the important thing here is to work out what my ideal metrics are for improving the game. I’m assuming that people only continue to play games that they enjoy, and thus the hours played of the game should be a decent metric to show whether or not the game is getting more fun. Right now those stats look like this:

Which isn’t too shabby. I compared it with another one of my games and this isn’t too bad, especially considering the much shorter time its been out, and the fact that it is not content complete. Ideally you dont just make a game for those hardcore who put in 20+ hours but try to move everyone along that graph. I’d like to see the number of people playing 2 hours go up a lot more. I think if you don’t like a game you find out before then, so that’s a sign I’ve made something enjoyable. To that end, I need to ensure the game remains challenging in the long run, so tweaking these figures should hopefully nudge it in the right direction.

I feel I should do some actual marketing fluff here, so if you like the sound of the game and haven’t bought it, here is a link :D

More Production Line customer modelling

I’ve talked about this issue in the design of customer AI in Production Line before.

In the last patch, I made some changes. here is the current system:

Each customer arrives at the showroom and looks at the cars on sale. That customer has a fixed ‘budget’ and have some leeway around that budget, from 20% less to 20% more (so a $20,000 customer checks out cars between $16,000 and $24,000, regardless what price range this puts them into). Every customer looks at every car and calculates a ‘score’ for that car…

They take into account the value of the car by comparing its estimated fair value to its actual value (basically they look at the markup you set). They then get a value from 1% to 100% saying how likely they are to buy that car. if the car is a different body style to the one they had originally wanted, they penalize that score.

The top five cars by this rating system are then looked at, and the player effectively rolls a percentage dice against each one to see if they will buy them. They may buy one of them, or not buy at all. The other four cars (or maybe all five) get given feedback by this customer on why they did not get bought, with the options being:

  • Wrong Body Style (assuming thats true)
  • Too Expensive ( failed the random die-roll)
  • Missing features (The car was missing some essential features, and this had a 5% or more impact on the likelihood to buy.
  • Bought an identical model (The customer bought exactly this model, but there was just more than one).

So like I say…thats the current system. It appears to have problems.

The most obvious problem is the customer budget. A top budget makes sense, but a bottom budget kind of does-not. If the customer wants a top feature sports car, and has a set budget of $200,000 and we are trying desperately to sell them for $100k, they should snap that up!. This is clearly nonsensical. What the customer should have is reasonable feature requests, not the minimum budget (which was being used as a proxy for this). The problem is, I need to do this sensibly, accurately, correctly and also fast, because some people have a LOT of cars on sale and a lot of customers. So how can I do this…

Right now I think the first thing I’m going to try is to remove the lower budget limit, but instead represent it as a quantity of features, that at a reasonable price, would be equivalent to that value. In other words, if My budget range is $80-120,000, I actually cap my buying at $120,000, but will consider any car that has $80,000-worth of features, regardless how far below $120k that car is priced.

 

Analyzing some user stats to help balance

Quick post before I stop work to eat!. I’ve been analyzing some play stats from sessions of the game to try and work out why some people are saying the game is impossible, and others are clearly generating a TON of cash. Some are obviously cheating the config files, but regardless of that I feel that there is definitely a problem with people amassing too much cash too early (in terms of providing a fun, balanced experience). Here is the cash balance of players at 50,100,200,300,400 and 500 in-game hours of play:

Its clear that there is a VAST range, and perhaps nobody should really be able to go beyond the 100million cash point so early, so I need to toughen up the cash in those first 50 hours. ironically the toughening up seems to overcompensate late in the game, as the trend is clearly to lose cash later, rather than increase it. yikes…

This second chart shows how strong the AI competition is during the game. I have made major screwups here, for example, the AI ignores you for the first 50 hours. BIG mistake, I need a lot more intelligence in deciding when to step in…

Lastly lets take a look at the players profit margin over time:

Clearly some cheating going on with those outliers, and some real disastrous, almost snapchat level loses for some people. Looks like that free fifty hours of no competition is letting people go nuts in the first 50 hours, and as I suspected from the above data, I then overcompensate and crush people with over-competition until their cash levels drop down.

I’m so glad I have this data, it will allow me to make a much better, much more balanced game.