DevLog #1-5 , System design, Game design,
Summarising, (This was before, taking notes from the gitHub History commit, so some things might not be fully accurate, since the strucutre of the game changed a lot later hah)
-----------------------------------------------------------------------------------------
Very important ; the game design and how it changed. The original idea was, many cities, and states, company operates freely anywhere, all markets are open, total freedom to do whatever, and battle against ai. That changed considerably later. As well as the realtime to turn based, and then time tick based to just tick based on click...
-----------------------------------------------------------------------------------------
-Added CityState struct as and the WorldManager , changed from previous failed attempts of creating many objets in Unity. The structure was changed to use completely datadrive approach, whereas scriptable objects are used to set the starting game data and settings.
- added Stores, as storeState ,HubState ,MarketState, etc..instead of separate objects,
Previously added:
-Written logic for cityGrowth in the relation of the market demand/supply ratio,
-Logic for market demand , based on the product and the product base demand in relation to population
example:
{ foreach (MarketState market in city.activeMarkets)
- added Stores, as storeState ,HubState ,MarketState, etc..instead of separate objects,
Previously added:
-Written logic for cityGrowth in the relation of the market demand/supply ratio,
-Logic for market demand , based on the product and the product base demand in relation to population
example:
{ foreach (MarketState market in city.activeMarkets)
{
city.growthRate = -0.01f; // Example for the future fix
float satisfaction = market.currentSupply / market.demand;
float marketGrowthMin = satisfaction - 0.5f; //this was controling the satisfaction after which the growth happens
float totalGrowth = Mathf.Pow(marketGrowthMin, 3f) * 0.01f;
totalGrowthRate +=totalGrowth;
}
-Logic for MarketSystem - Essentially controls the marketTick which calculates amount of goods stores and sold per day, then calculates the pcurrent price of the city which buys the products, which changes in relation to demand/supply.
very old code:
Obviously with many problems and limitations, but it was working for sometime, the idea was to hard cap the prices and also that it doesnt change as fast as the nextTurn market would change it. But overall simple system to calculate based on the demand supply. Problem was the price could go as as far as 20/30 times more then base haha.
Here also we still use delta time as the time count which was long abolished later.
Here also we still use delta time as the time count which was long abolished later.

Comments
Post a Comment