Saturday, June 28, 2014

Productivity

Buildings and Tools

As part of the game design process there's some decisions to be made about industrial structures and tools that help your people make more stuff so that they can consume more stuff in their evil capitalist materialist consumerist lifestyle of reckless abandon.

Tools

Tools cost a certain amount of resources to make, they last a certain amount of uses. This means it's more efficient to use them in conjunction with an industrial building. Then they break and must be replaced. This helps speed labour and of course the bonus must be balanced against the cost of the tool. By reducing labour time this frees up food (because labour time could be calculated in terms of the food that was eaten).

Their bonus is simple. Tool increases production speed and reduces labour time required.

Industrial Buildings

An industrial building takes up space and requires fuel. The kind of fuel changes with technology. This cost is balanced against the reduction in consumption of inputs and an increase in the amount of outputs. The building lasts forever but has high sunk costs.

First, it improves the ratio of input to output. Say you want to make pottery. If you have no building it costs 100 slip to make 1 pottery. If you have a firing pit it takes 180 slip and 10 lithic fuel to make 2 pottery. That's a better ratio. It takes the same amount of time but since you get twice the output, really your productivity has doubled.

Fuel

I've been wrestling with how to make fuel "simple". One issue is that you can effin burn anything. Let's power your evil firing pit with everything from orange peels to old people! Okay, maybe not orange peels. In any case, since so many things can be "fuel", how do I want to define it in game? My current design idea is something like this: there's a good you can make called "lithic fuel", this is the simplest fuel you can make. However, you can make the generic lithic fuel out of many different inputs. So you can select which items are allowed to be used in your lithic fuel industry and then your assigned workers automatically choose the "cheapest" (which would probably be interpreted as the "most abundant") input possible and then create lithic fuel from that. So lithic fuel could use "wood" or "filler" or "bones" or whatever.

However, perhaps the better industrial buildings then require something like "coal fuel". This has stricter input requirements. Now you can only use "wood" or "coal" (which sadly isn't in the game right now, but perhaps a future iteration!). As a side note, the early steampunk tech route is likely to just mirror China because their ancient technology is pretty much steampunk (they had blast furnaces for thousands of years before Europe). That or Greeks if they hadn't wasted all their technology as toys while using mass slave labour.

So the main issue here is that it makes the coding a bit tricky. While most of my goods have only one possible kind of input, fuel has several kinds of possible input. But, I've introduced a concept called "item super id", in addition to an "item id". So what I can do is have 3 or 4 different item ids that say "lithic fuel" and to the player they'll see they have several kinds of lithic fuel. They'll understand why they're in different bundles because it'll say something like Lithic Fuel (switchgrass) and another will say Lithic Fuel (oak). That's understandable. They can then have matching super ids, so that the "firing pit" will require the super id of "lithic fuel super category" which all of those different item ids fit in. Voila! Solved my code problem. With more ids.

Occupancy

Another aspect is how many people can live in the same structure? Originally I was going to do a flat "2 people per room". But then I thought "hmm maybe a bedroom can fit more than say a storage vault". So I'm introducing the concept of occupancy rate per room. It's pretty simple. Go beyond the rate then the family suffers some penalty.

One of the estates that a family owns is considered the primary residence. They get a base health/happiness bonus. If the family exceeds the occupancy rate of this estate then they suffer a penalty for every person beyond that to their health and happiness. Very simple.

Animal Growth

Trying to keep this one simple as well. Animals are born during their birthing season. The rate depends on the herd size. Outside of the birthing season, their numbers decrease to the maximum. The maximum herd size is determined by how many plants (if herbivores) there are in the land region or animals (if carnivores). Best to slaughter animals beyond the max herd size just as it leaves birthing season.

Friday, June 27, 2014

Alpha Time

As Cultura head towards a playable Alpha it's time to lock down some of the game design decisions. What has been influencing the entire process has been a focus on:

  • Simplicity: Can the user understand what is happening at a glance?
  • Simulation: Is this a reasonable simplification of real life?
  • Longevity: What is the future path of this game element and is it fun to keep pursuing it?

That's a sort of rough list of what the factors are in saying whether a game element stays, is changed or is dropped.

UI: I'm leaning towards a "total" rather than location UI. It shows you what you have in total in the top right (just a few of the relevant resources or maybe I can splay the 15 resources across the top). Commands you give are carried out by government employed workers (eventually in a sequel there'll be private market). There may be a secondary advanced layer, which requires one additional click, for tweaking at the building or individual citizen level.

Buildings: There'll be probably just a simple set of five main buildings for residential purposes that allows the consumption of goods (consumable and property). They revolve around how to improve health and happiness. Then there are infrastructure buildings like work sites, roads, irrigation and walls. And then there are industrial buildings like mines and farms (maybe JUST mines and farms). These would pop up in a radial menu... probably by pressing "b" for basic buildings, "v" for industrial buildings, "x" for infrastructure buildings. Then perhaps a hideable bar for the same buttons at the bottom of the screen.

Additionally, buildings are built room by room. Doors are the connection points. You mush rooms together to form larger buildings. Each building can only be owned by one family. Ownership (for now) will be automatic. In the future, I'd like there to be an advanced assignment UI (especially if you are an evil dictator trying to form different classes of citizens, some should get better housing than others).

Goods consumption is facing a few changes at this point. There was the concept of consumable and property, where they were equal in health/happiness benefit. I'm going to change it such that property lasts longer, costs less resources over the long run but has high initial costs. That way consumables and property represent a trade off between short term gain and long term gain.

The environment will be separate from artificial structures (though not entirely realistic). This means there can be wild trees, plants and grasses and they grow, you can harvest them and they will regenerate. Same with animals (they'll run around and you can hunt them). Farms and pastures on the other hand require input (labour, maybe water, perhaps some other stuff) but are upgradeable to produce at a higher rate than nature (thus increasing per tile food productivity).

Consumption is automatic. You give orders to produce goods per industry, work orders for a specific amount of a particular good. This UI would be simplified so that you just give one general order for your whole society. I'd like it to be more advanced but that may make the UI too cluttered and I don't have a good solution to that yet.

The world will be designed such that each season represents a consumption of different resources so that there's always something interesting to do (especially during the stone age). As you shift into agrarian (in some future version of this game) it'll change into a more planting/do nothing/harvest rotation and you choose what you might want to do in the "do nothing" phase (like wage war as if you were the Romans).

Interesting diplomatic relations. This is a lot more about making believable AI and on top of that they would give you verbal cues to the rationale behind their actions. That way if they were to do something stupid on purpose, they inform you of this, so that you know. In this way it prevents the "do not dumb here, not dumb area" feeling. Hopefully. Needs some playtesting.

Tuesday, June 10, 2014

Spreading the Resource Butter

As the game gets inexorably closer to the stage wherein one collects raw resources, converts them into finished goods and then eats them in order to feed a hungry faceless mass of labourers whose only purpose is to reproduce in competition to other faceless masses of labourers, we get closer to thoughts on the world generation. For a game like Cultura one expects procedurally generated worlds (ie. random). That leads to a lot of questions about how to place resources, initially seeding the starting points of different peoples and how might biomes/climates work.

The general status of the game is that the consumption of food, consumable goods and property items is in! Seeing as how those are fairly complicated state machines, there's a lot of testing that needs to be done (and then bug fixing anything wrong that is found). There's also the delicate issue of balance but that comes later. It's an exciting time. The general idea is that food is pretty obvious (make food, eat food) but there will be a balance between consumable goods (consumed once, get a bonus) and property items (needs repair over time but get a better long term bonus for the cost). So your society's economy is a balance between short-term and long-term gain.

But, let's get back to world generation. In the world of Cultura it is powered by the "This Makes No Sense" resource engine. Essentially, the resource system boils down to fifteen different raw resources: wood, stone, earth, grain, meat... etc. For each type of resource there are eight different types of materials for it. As an example, wood could be pine or oak or ironwood. This allows you to create the same product between two different societies but use different materials and you can then trade these different goods. Bonuses are based on the consumption of a variety of materials (every material type consumed for a good it's a multiplier bonus). So an oak chair gives you +10 happiness. But an oak and pine chair would give you +20 happiness. I know that when I go home to my table made out of six different kinds of stone I get six times the happiness from it. Don't you?

The placement of each type of material is what matters most. So for the most simplistic version of a world generator, firstly it would build out where land exists. Everything in Cultura right now is flat (there are mountains but basically they're just rocky obstacle walls). Then the world is divided down into eight regions (or four regions). Each region is then claimed by a single material type (or two, if there are four regions). The selection is random. One part might be pine and then another might be oak. This process is repeated for the fifteen different types of resources each with differently shaped regions and so the overlap of resources varies. Some areas might have pine and unicorns, another might have silverwood and deer. It's random.

Now of course this isn't a super realistic resource placement but alas one developer can only do so much in order to actually finish a game within his/her lifetime.

You: Why is there pine near the equator? Shouldn't it be in the colder regions of the planet?

(ノಥ益ಥ)ノ ┻━┻
Me: Why is your table flipped?!

You: :(

There's a very large wish list of my own that I would like to eventually include in Cultura but all in due time! For now, I'll just discuss what I think is minimally necessary for the game to be fun and realistic enough. The main point is that different regions have access to different resources so that trading in the initial era (the lithic ages) is predicated on the exchange of different goods. As societies advance (and sequels to the game are made), they'll be based more on comparative advantage due to labour skill, non-residential capital investment (it'll be more fun doing in the game than what that sounds like) and education opportunities. For now, just an even spraying of resources across the world shall suffice. As a side bonus, it makes balancing a lot easier.

Sunday, June 1, 2014

Four Focuses

Work has been done, the latest aspect is property items. These kinds of items are stuff you stick into slots in a family's home and then they enjoy health/happiness bonus from it (spread evenly to every member in the family). That's on-going. Another on-going aspect is the graphics engine. Needless to say, a game needs a good graphics engine to be graphically nice. There's some technical thoughts on that but until it comes to fruition, it will be written about in later posts.

But, what of Cultura as a game? The total game design is coming along and let me take you along that journey. For a game as broad as Cultura, one problem is trying to bring it back together into a neat little box of designed fun. You want the game to be wide open, sandboxy and capable of creating unexpected situations. The emergent aspects. On the other hand you want it to be understandable at a glance, to have a low barrier to playing it so that you can say, I'm going to play for an hour and I can just dive right back into the game.

The whole of Cultura has been split into four neatly laid out focuses in the game that explore the whole of the setting that is displayed to you in all its glory.

Ecology and nature is the most apparent. You start off in an open world with different trees, plants and animals out there. Some you can eat, others you use for producing luxury goods. One of the big concerns in Cultura is the "carrying capacity" of the land. Trees grow, animals are born but at a rate determined by different factors. For Cultura, these factors are simplified. Until there's a "realistic mode", the simulation model is fairly simple so that a player can understand it quickly and adjust to meet social needs for short and long term goals. Forests grow based on the number of still standing trees. Most plants grow just the same, based on the number that exist. Animals grow based on the number of animals but the herd starts starving if it runs low on the number of plants in the wild. So maybe you think you're harvesting "glowing nettle" and it's fine, until you realise you're starving out the local deer of their food source and the herd dies out.

It'll be prominent and direct. The interface will show you each land region. Each land region lists the resources available in it. It shows you the rate at which they grow and what affects the growth rates. Then it's up to the player to decide how to handle that.

As the name would imply, Cultura revolves around culture and that's the biggest core focus as you play. Technology and cultural traits are thrown together like a bunch of miniature skill trees for you to pick and choose to develop the aesthetic feel of your society and also the play style. Most of the technology revolves around improving your industry (industrial buildings, tools, lifting resource extraction limitations), expanding your repertoire of goods you can manufacture (choosing between goods built from each kind of resource, or different high level goods, to build a particular aesthetic feel to the kind of luxuries your society makes), expanding your ability to consume (more or better structures to build), government policies (different ways of performing taxation and also ruling over a larger empire). Cultural traits revolve around social values to adhere to a particular play style. Choosing values that favour war and military, being able to hold Roman-style triumphs, would benefit an aggressive player who wants to gain happiness bonuses from going to war. Or you can choose a pacifist route where you can agree to unfavourable peace treaties yet still gain happiness in your society because your people abhor war so much.

Technology is very specific and the cultural traits you choose are very specific. They allow you to shape your society however you see fit. A militant raider society that produces wood carvings and yarn dolls. A trading society that produces stone axe heads and stone-tipped arrows. It's really what Cultura is all about.

Then there is industry. Handling your resource extraction and manufacturing. The focus is on how much resources you consume, how many goods you produce and whether your goods production matches your population's consumption. You can shore up missing goods through trade. You can over-produce specifically to sell the goods to others. The focus is on setting up new industries, expanding current ones and managing labour distribution. You can have seasonal industries (hunting after an animal herd's growth period). For the first iteration of Cultura, it's about making things for your people and trading the excess to others for things you don't have.

Finally there is diplomacy. This is the most emergent aspect of the game. Are you surrounded by aggressive barbarians? Is there perhaps a trading empire close by? Maybe there's a lot of weaker societies but each of them are more adept than yours at producing particular sets of goods. You interact with them for trade, treaties or war. Trading and raiding are the two most important interactions with other societies to gain goods you cannot produce or do not have enough of, and your choices depend on the total interaction within the world.

Diplomacy and trade are combined and they occur along trade routes. Convoys move back and forth between societies to deliver diplomatic messages, treaty proposals, trade agreements or just the goods you already agreed to trade. But, of course, you can always choose to forgo such polite diplomacy and opt for raiding and as your society becomes more advanced, waging war!

This is a lot more focused version of what Cultura will be about and it gives players a more clear-minded way to approach the game. It leaves the sandbox nature there (you can choose to interact with nature and people however you wish) but displayed in a clear way. Imagine, you have a land rich in iron but low in wood. A neighbour is rich in forests. Do you raid them for their wood using your superior metal-based weapons? But then others might see you as aggressive and refuse to trade with you and you haven't the military to attack them all. They provide valuable goods like wine and fruit juices to maintain your empire's health. You make your choices and live with the consequences.