Skip to content

Commit

Permalink
closes #188
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashet committed Jun 22, 2017
1 parent 97125bc commit ec8dc78
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Assets/code/Logic/Country.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ public Country(string iname, Culture iculture, Color color, Province capital) :
new Modifier (x=>(x as Country).getLastAttackDateOn(this).getYearsSince() > Options.CountryTimeToForgetBattle
&& this.getLastAttackDateOn(x as Country).getYearsSince() > Options.CountryTimeToForgetBattle,"Lives in peace with us", 0.005f, false),
new Modifier (x=>(x as Country).getLastAttackDateOn(this).getYearsSince() > 0 && (x as Country).getLastAttackDateOn(this).getYearsSince() < 15,
"Recently attacked us", -0.05f, false),
"Recently attacked us", -0.06f, false),
new Modifier (x=> this.isThreatenBy(x as Country),"We are weaker", -0.05f, false),
new Modifier (delegate(System.Object x) { Country bully = isThereBadboyCountry(); return bully != null && bully!= x as Country && bully!= this; },"There is bigger threat to the world", 0.05f, false)
new Modifier (delegate(System.Object x) { Country bully = isThereBadboyCountry(); return bully != null && bully!= x as Country && bully!= this; },"There is bigger threat to the world", 0.03f, false)
//, new Modifier (x=>isThereBadboyCountry() ==x,"You are very bad boy", -0.05f, false)
});
bank = new Bank();
Expand Down
10 changes: 7 additions & 3 deletions Assets/code/Logic/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,13 @@ static private void makePopTypes()

new PopType(PopType.PopTypes.Aristocrats, null, "Aristocrats", 4f,
new PrimitiveStorageSet(new List<Storage> { new Storage(Product.Food, 0.2f), new Storage(Product.ColdArms, 0.2f), new Storage(Product.Firearms, 0.4f), new Storage(Product.Ammunition, 0.6f), new Storage(Product.Artillery, 0.2f), new Storage(Product.Cars, 0.2f), new Storage(Product.Tanks, 0.2f), new Storage(Product.Airplanes, 0.2f), new Storage(Product.Fuel, 0.6f) }));

new PopType(PopType.PopTypes.Capitalists, null, "Capitalists", 1f,
new PrimitiveStorageSet(new List<Storage> { new Storage(Product.Food, 0.2f), new Storage(Product.ColdArms, 0.2f), new Storage(Product.Firearms, 0.4f), new Storage(Product.Ammunition, 0.6f), new Storage(Product.Artillery, 0.2f), new Storage(Product.Cars, 0.2f), new Storage(Product.Tanks, 0.2f), new Storage(Product.Airplanes, 0.2f), new Storage(Product.Fuel, 0.6f) }));
new PopType(PopType.PopTypes.Farmers, new Storage(Product.findByName("Food"), 1.0f), "Farmers", 1f,

new PopType(PopType.PopTypes.Farmers, new Storage(Product.findByName("Food"), 1.5f), "Farmers", 1f,
new PrimitiveStorageSet(new List<Storage> { new Storage(Product.Food, 0.2f), new Storage(Product.ColdArms, 0.2f), new Storage(Product.Firearms, 0.4f), new Storage(Product.Ammunition, 0.6f), new Storage(Product.Artillery, 0.2f), new Storage(Product.Cars, 0.2f), new Storage(Product.Tanks, 0.2f), new Storage(Product.Airplanes, 0.2f), new Storage(Product.Fuel, 0.6f) }));

new PopType(PopType.PopTypes.Workers, null, "Workers", 1f,
new PrimitiveStorageSet(new List<Storage> { new Storage(Product.Food, 0.2f), new Storage(Product.ColdArms, 0.2f), new Storage(Product.Firearms, 0.4f), new Storage(Product.Ammunition, 0.6f), new Storage(Product.Artillery, 0.2f), new Storage(Product.Cars, 0.2f), new Storage(Product.Tanks, 0.2f), new Storage(Product.Airplanes, 0.2f), new Storage(Product.Fuel, 0.6f) }));

Expand Down Expand Up @@ -613,10 +616,11 @@ static void makeHelloMessage()
new Message("Tutorial", "Hi, this is VERY early demo of game-like economy simulator" +
"\n\nCurrently there is: "
+ "\n\npopulation agents \nbasic trade & production \nbasic warfare \nbasic inventions \nbasic reforms (population can vote for reforms)"
+ " \npopulation demotion\\promotion to other classes \nmigration\\immigration\nassimilation"
+ " \npopulation demotion\\promotion to other classes \nmigration\\immigration\\assimilation"
+ "\npolitical\\culture\\core map mode"
+ "\n\nYou play as " + Game.Player.getName() + " country yet there is no much gameplay for now. You can try to growth economy or conquer the world."
+ "\n\nTry arrows or WASD for scrolling map and mouse wheel for scale"
+ "\nEnter key to close top window, space - to pause\\unpause"
+ "\n'Enter' key to close top window, space - to pause\\unpause"
, "Ok");
}
static void loadImages()
Expand Down
Binary file modified ProjectSettings/ProjectSettings.asset
Binary file not shown.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[![Bugs](https://badge.waffle.io/Nashet/EconomicSimulation.png?label=bug&title=bugs)](https://waffle.io/Nashet/EconomicSimulation)
# Economic simulation

## Demo
Expand All @@ -11,35 +10,40 @@ Several years ago I made [Economy analyzer for PDS's Victoria 2 game](https://gi
Making that tool made me disappointed in how Victoria 2 economy is made. Since I didn't find better game-like economy simulation, I decided to try to make my own.
So, main principles of that simulation are:
* free market agent based economy simulation (currently with one currency - gold)
* no ridiculous x5 price limits ( except 0.001 and 999), allowing realistic inflation
* no ridiculous x5 price limits (except 0.001 and 999), allowing realistic inflation
* population consume goods not in fixed order but - at first cheap goods, then expensive
* factories can compete for workforce by changeable salary
* factories have specific owner like government or population unit
* capitalists can take loans form national bank for business expansion
* governments can put extra money in bank
* player should have as much freedom as possible, even if player is going to do something stupid

## What it has now (v0.11.0)
## What it has now (v0.12.0)
- provinces and countries
- population agents
- basic production\trade\consumption
- basic warfare
- basic inventions
- basic reforms (population can vote for reforms)
- population demotion\promotion to other classes
- migration\immigration
- assimilation
- migration\immigration\assimilation
- political\culture\core map mode
- basic diplomacy (only relations for now)
- [![Bugs](https://badge.waffle.io/Nashet/EconomicSimulation.png?label=bug&title=bugs)](https://waffle.io/Nashet/EconomicSimulation)

Map is generated randomly, you play as some country yet there is no much gameplay for now. You can try to growth economy or conquer the world.

## Current targets
- more gameplay
- diplomacy
- better looking map
- perfomance

## Screenshots
![Image of Yaktocat](http://i.imgur.com/Wm0vhz2.png)
![map](http://i.imgrpost.com/imgr/2017/06/22/VYAaereVAVArdsdVA.png)
![diplomacy](http://i.imgrpost.com/imgr/2017/06/22/VYAaersderdsdVA.png)
![Imgur](http://i.imgur.com/KevTH51.png)
![Imgur](http://i.imgur.com/uzEJCvM.png)
![old map](http://i.imgur.com/Wm0vhz2.png)

## Contributing
I would love to have other people providing ideas, code or questions. You may:
Expand Down
Binary file modified WEBGL/Build/WEBGL.asm.code.unityweb
Binary file not shown.
Binary file modified WEBGL/Build/WEBGL.asm.framework.unityweb
Binary file not shown.
Binary file modified WEBGL/Build/WEBGL.asm.memory.unityweb
Binary file not shown.
Binary file modified WEBGL/Build/WEBGL.data.unityweb
Binary file not shown.

0 comments on commit ec8dc78

Please sign in to comment.