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

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.

Improving customer simulation in Production Line

The current system for customer simulation in Production Line is a bit too simple.

There are 4 bands of pricing, and multiple car body styles. Every customer, when created is assigned a price band and body style. They then show up at the showroom and see what is available. For each car that matches exactly their price range and body style, they rate that car based on their chance of buying it at the given price. There is a graphed slope based on the equation y = 1-(x^2) that gives the probability of buying a car, plotted against the relative premium that is being charged on it (or discount, obviously). This enables them to then pick a ‘best’ car (the one with the highest score).

That score is then the probability of the customer buying the car, which they then may or may not do based on a random number generator.

The positives to this system are:

  • Overpriced cars take longer to sell, under-priced cars sell easier.
  • There is a clear market segment for each body style.
  • There is a clear market segment for each price band.

These are all good things. However, it has problems:

  • As body style options increase, it seems unrealistic. Is there nobody who shops for an SUV who ends up with a sedan etc?
  • Price bands are fixed. This means that there is no difference in pricing at the low or high end of the price band, as long as the markup is the same.
  • The customer only really has a ‘chance’ of buying one car, the best one. Surely a wide range should result in a higher chance of a sale?
  • The customer seemingly has no opinions on features. The presence or not of a sunroof, for example never swings (or loses) a sale, the player can always afford it, if its in their price-range.

So here I’m thinking of ways to improve on this.

Firstly I can change customers so they have a price point, and some fuzz. So rather than be looking at all cars from 0 -$15,000 (budget), they can have a price point of $14,000 +/- 20%, and thus evaluate any car from $11,200 to $16,800. This means we suddenly have an incentive to make some ‘low end’ budget cars (with some missing features) and some ‘high-end’ budget cars, with m,ore features, effectively catering to more tastes, and dissuading the player from just feature-cramming every model. On the downside, this also makes the list of designs maybe quite big… This would give me cool customer feedback about being too pricey, or lacking in features depending how things go.

Secondly I should have some fuzz around body styles. maybe a customer wants a sedan, but only applies a 20% negative modifier to a car of a different style. After all, if all the sedans are overpriced and crap but the sports car is surprisingly cheap and awesome, shouldn’t there be a chance of a sale?

Thirdly, maybe features should come into it. How about assigning a ‘must-have’ feature to each customer (thats common or universal at that price point), and they refuse to buy any car that does not have that feature? This would allow me to store some pretty fun customer feedback on the car ‘doesn’t have electric windows’ for example…

Fourthly, the wide range should come into it. Maybe the player should be able to consider up to five different cars (discounting ones with similar options), and run the random check against them all. This rewards the player for having a wide range, even within a single price band and body style.

That involves a bit of code, but as always with big sim games, the code is trivial (when you have coded a lot), its the design, the balance, the GUI and the making the code run super-fast (so having 100 customers how up and evaluate all this is not a frame-skipping event) that will take all the time. I’d like to know what people think, and if any of this sounds like the wrong direction before I start coding it. Obviously numbers given are easy for me to tweak, its just the pricing and sales mechanics I want to improve upon.

Production Line GUI usability issues

I have been turning my attention recently to improving the usability and intuitiveness of the design for Production Line. I run some ads to promote the game, and have to assume a bunch of people buy it and play it without ever seeing me or anyone else play it in a video, have not read about it anywhere, and are relying purely on the in-game tutorial. Of course tutorials are all well-and-good, but ultimately the aim has to be to have a game design and GUI so intuitive that it just feel obvious to the player and they don’t get frustrated or stuck.

The next update (1.31, coming tomorrow with any luck), comes with a whole bunch of cool usability improvements. Supply stockpiles and new car designs now copy all existing options, which makes them much more useful features. there are some pricing and production hints on the sales matrix, and a host of other things. I have identified 2 small areas that I think are still confusing and want to improve upon…

The first is the interface for choosing which cars to produce. Basically the game starts with just one design, and only when you have created extra models do you need to worry about this. To edit the ‘production schedule’ you need to go the the slot at the very start of the production line (there may be several lines), click it to launch its details screen, and then notice the new button that gives you access to this feature (which is then relatively well explained).

There are several problems here:

  1. The player may not even realize they need to do this, and assume the cars are equally produced.
  2. The player may have no idea where the start of their line is, at first glance.
  3. The player may not spot the new button even if they do click on the start of the line.

There are a bunch of solutions to this. Firstly, I could stick a big fat warning on the car design window, along with a new stat showing production last hour, alerting the player to the fact that no production of this car is currently scheduled. Maybe add a tooltip on there explaining what to do to get to the production schedule screen?

Secondly, I could have a permanent icon floating above the start of the line indicating this is where the production scheduler is, and maybe double up as a button that launches the scheduler for that slot.

Thirdly maybe I need something more obvious than just a text button, something with icons, and which draws the players eye much more on that slot window? Just a button with ‘Change’ on it is kinda awful :D

Thats just the first usability issue. The second is a problem relating to missing features on cars, something that is very badly communicated to the player. The player selects which features should be applied to each of their various car designs, with some getting tons of them, and cheaper models getting few. This means that at a slot such as ‘fit wheels’ some cars will get alloy wheels, some will not. Thats fine, but sometimes the player gets out of synch, and researches the ‘alloy wheels’ tech, applies it to some designs, and then forgets to upgrade all the slots that fit wheels. (Or at least all the ones the expensive cars go through).  We currently have yellow text in the showroom for cars which have ‘missing’ features, but it makes absolutely no distinction between features missing because the cars production pre-dated this feature (old stock), and ones where there was a screw-up and a feature got missed.

Ideally the screw-up should never happen, but I’m wary of stopping the whole line when this happens. That may be confusing, and will need explanatory GUI anyway. However, it may be the best option. I could reserve that yellow text just for stuff which was really missed, and maybe leave it in white or labelled differently for stuff which is just ‘old stock’. That would at least distinguish between the two. I guess I could also have a popup on the vehicle as it goes around the factory to show a missing feature, so the player notices this before it gets as far as the showroom (by which time many poorly-configured cars have been made).

I’m still musing on the best solution to this.

A heads-up on future stuff. I will ship 1.31 this week, then I’m away for a week from Sunday, and just after that will have a booth at the EGX show in the Birmingham NEC in Birmingham UK. Please do come along if you can and say hi, or try the game (if you dont already have it). press interviews most welcome!

I guess I should point out to any new readers that Production Line is in Early Access on steam/GoG and direct from us. its $15.99 and you can grab a DRM-free copy, together with a steam key from the link below…

Boxed myself into some design problems I really need to fix.

There are a number of things wrong with the nitty-gritty fine detail of Production Line’s design. I don’t mean easily adjusted stuff like ‘this costs too much’ or ‘that happens too quickly’, but actual design issues that may require me to change the way some of the mechanics work. Here is an explanation and some background:

Production Line is a car game where cars move along a production line from one ‘slot’ to another, and new components such as doors, engines, wheels etc get added at each slot. Different cars may be different designs, meaning they get a different series of components added. For example all cars get wing-mirrors added, but some get heated wing-mirrors, some get heated+folding wing-mirrors, and so on. Where I have gone wrong is this ‘fitting complex components’ mechanic.

Essentially, the problem comes from the relative simplicity of when I first started work on the game. For example, fitting door panels was just a thing that happened, taking X minutes to do. Then I added a new feature ‘car alarm’ which I decided could be fitted at the door panel slot. This slightly slowed down that slot. (For cars with alarms). then came lane-collision avoidance tech, which again involved extra components at the ‘fit doors’ slot. Then came keyless entry…and so on. As a result, something that was once simple (fit door) became really complex, and really slow, causing a bottleneck not only due to the sheer penalty time for all those features, but also waiting for all the myriad of components (sensors, alarms etc) to arrive for each door, meaning the slot was often ‘waiting for resources’. This also felt unrealistic. Surely the doors get fitted with all this stuff already assembled?

Because I’m clever I fixed this.

Now you have a system where some upgrades (folding/heated wing-mirrors is one) can only be installed if you make them yourself. As a result, you have a slot in the game that will manufacture wing-mirrors, and you can then upgrade THAT slot, and it will attach extra ‘features’ to each wing-mirror. The wing-mirror then gets requested by the fitting slot, attached to the car and the final car now has the features it wanted, fitted no slower than the normal wing-mirror.

A combination of method A and method B of adding features keeps a nice balance between bottlenecks and free-flowing of the line, encourages the player to experiment with local production, and adds to the complexity, maybe even the fun of the game?

Unfortunately it leads to big problems!

Imagine a situation where there are two car designs, Budget and Luxury, and production alternates so the line sees B,L,B,L etc. B has basic wing mirrors, luxury has everything… A local production slot ‘factory’ is upgraded, and thus churning out a load of heated & folded wing-mirrors. This is the process by which it all screws up:

The fitting slot encounters a BUDGET car. It fits some basic wing-mirrors, which because its closer to an importer than the factory, it imports. It also fills up the pare 14 slots with new basic wing-mirrors.

The fitting slot now encounters a LUXURY car. It now needs wing-mirrors that are heated and folding. Should it trash 2 wing-mirrors and order them from the factory? if so, does the player get the trashed items refunded? What about numbers…does it order just 2? or 14. it cannot be 100% certain that the end car (due to complex junctions) will be a Budget or Luxury. It has no idea. Does it order half and half? what if there are four designs? or eight and they all have different combinations, and production ratios? How many do I order? Also…back at the production slot, should I be just making a bunch of fully-loaded wing-mirrors? or some ratio? how do I set this? is it automatic? does the player decide?

Plus…because some components now have upgrades, how the hell is the supply stockpile GUI even working any more? when I say this stockpile should be full of wing-mirrors…which type? does it care? should the player be able to control this? how?

Why did I start making video games? what the fuck am I doing with my life? What made me think I know how to do this? ARGGGHHH.

Obviously this can be solved somehow, but I need to do it properly and not flail around coding random hacks, which is basically how I ended up here. How on earth am I going to fix this mess? Here are some solutions, not all to the same exact part of the problem, and not mutually exclusive:

Solution A: Downgrade components where required.

In other words, when we fit a wing-mirror to a budget car, we effectively snip the wires, and it acts just like a cheap wing mirror. We fucked up here in some ways, and spent the money to make an expensive component that got wasted. This is effectively very simple to implement, as some code can handle this at the fitting stage (stripping inappropriate features before adding them to the car). This is potentially very frustrating to the player, as if they want to produced everything locally, they are effectively wasting money (and resources) on every cheap car they produce. This is not efficient, and efficiency is the key to the game :(

Solution B: Scrap the idea of embedded features in components.

This means that all the component fitting is done *at the assembly line*. So factory slots now just make wing-mirrors, and the upgrades move to the fitting slot. This simplifies the games design from a tutorial POV very much, but it re-introduces big bottleneck, is very unrealistic, and involves a lot of change which will fuck up save games. Plus it doesn’t solve the core problem anyway, we still may have the wrong resources at the fitting stage.

Solution C: Allow manual configuration of assembly-line stockpiles.

Right now, the player has no control over what components a fitting-slot orders. It decides what to order when a new car arrives, and it then ‘over-orders’ on the assumption that the following car will be the same design. Because the player knows that all those aluminium stocks for an aluminium body shell are not needed for 90% of the cars, he/she could specify what to keep in stock instead, giving the player micro-management. The downside is this will not work AT ALL if you go BBBBBLLBBBBBLL, and thus the local ‘caching’ demands change. Plus its rife with the possibility of bugs, and confusion.

Solution D: Allow automatic ‘flushing’ of unused resources in a stockpile.

If I order 5 chunks of aluminium for a body-shell, and then take the effort to order another 11 to fill my stockpile, but the next car doesn’t use aluminium, I should immediately flush (probably refund) all those spare aluminium chunks the minute I realize this. This would eliminate a current ‘blocking’ problem, but mean that if my cars go BLBLBLBL (where L uses aluminium), I am constantly wrong-ordering and flushing. In a sense, this is for the player to spot and fix right?

Solution E: Express composite resources as their own resource.

Life might get simpler if I allow the player to refer to ‘folding wing-mirror’ ‘heated wing-mirror’ and ‘folding,heated,wing-mirror’ rather than just ‘wing-mirror’ in terms of supply stockpiles etc. This only solves a minor issue, regarding supply stockpiles, and vastly complicates the supply stockpile resource picker list (and others for that matter0. However this would theoretically allow the player to import them ready-made rather than produce stuff locally, which gives the player more flexibility.

ARGGGH.

I’m in a design mess here. It *will* get better, probably through a process of far better tutorial & player feedback combined with some combination of the changes listed above. I’m interested to know how annoying all this mess is for actual players right now. Have you encountered any of this? does it bother you? do you think I’m getting too fixated? Is this just something you enjoy working around? How bad is it? :(