Author Topic: Main Topic  (Read 4284 times)

0 Members and 1 Guest are viewing this topic.

Offline Geoffroypi

  • Moderator
  • Chief Petty Officer
  • *****
  • Posts: 44
    • View Profile
Main Topic
« on: November 28, 2013, 02:36:36 PM »
Hello,

I have discovered a few years ago aurora, and its forum, which i still considered to be the best on the internet, for its level of discussion, and the good atmosphere.
That is why i decided to post here , despite being a bit reluctant to write in english.

Since august 2013 i started to develop a 4x , learning c++ in the process.
At the start it was just a text game , simulating a virtual realistic economy.
Then i began to learn SFML (along with c++ allows 2d graphics) , and started developing the actual game, in fact from august to november i have rewritten many times the program as my c++ skills were improving.
Now i think i have finally reached a cruise speed in the development of the game , and i think the project is enough anchored in my long-term ambition to be publicly presented.



For now it features :

-Procedurally generated universe (in real scale), galaxies are generated that generate (theorically) a few billions planetary systems that holds a star (will implement binary , ternary, quaternary ect...) star populations (OBAFGKM) are represented, planets , asteroids (no moons yet) are generated with their respective atmosphere physical and orbital properties ( currently not eccentric orbits (i have good reasons for that  ;D), and other characteristcs useful to establish a colony.

Province (colony if you prefer  ;) )  holds the following :
-Realistic trade economy based on (intelligent) supply/demand . (intelligent : The 'price' can make good or bad assumptions value of the intrinsec value of the product)
-Industry is dynamicly simulated, no abstract bonus/malus system : each industrial unit for each type of production is managed as a society, it can be compared to the Victoria 2 and x3 factory but in a more complex way .
-Demography with growth based on mortality (which is based on a lot of factors) and natality (lot of factors too). in fact theres is usually more than one population in a colony (diferent race, ethnic group). Population have a lot of variables related to political opinions , age, education, health, privilege ect...
-Fully personalizable ship (2d tile based editor) , with personnalizable/standard components (comparable to Shore of Hazeron). Just like in aurora or kerbal space program , everything affect everything . I had quite some fun desining ships with todays propulsion technology .
-Crew is not yet really implemented , but you will likely see a dwarvish kind of crew (a bit less anarchic , but still stupid).
-Politics : not really implemented, it will be similar to vicoria 2 with parties, factions , reforms laws ect...);

(what i am doing currently)
-Making an generator that builds ground super structures of 300 meters high , 300 meters deep , in a square of 300m*300m, it is currently working well , and it is ... HUGE, it generates residences commerciale areas , and generates peoples and assign a house to them. each person is unique, has traits, shedule ect... Each person use no more than 40 octet (currently pre-sheduled path-finding will increase that a bit) so generating the 50.000-60.000 persons  that a 'Bloc' is intented to hold isn't a problem.
Shops (and later public sector and industry) employ peoples based on their instruction level.

(I almost forgot)
-the game uses newtonian mecanics , for now it possible to make hohmann transfer.
-the game is pausable real-time like in most paradox grand strategy games (HOI, crusader kings ect...).
 
The game will be a hybrid of a rpg and a 4x, you will not be the usual super dictator at the start of the game, you will start as a tiny person released in a huge, dangerous and cynical world .  

Sorry if i botched up my post, i'd love to expose you the project in every details, and I intend to regularly edit this post.

PS: Currently making screenshots of the game so you actually see something  ;D



Updated 29/11/2013

This is a 100X100 light-year flatten cube with a star density of 0.003 AL^3 .
Note that 80-90% of the stars are orange-red  , for now it appears to you  that every star are red. It because i didn't make any visual work to make cold star dimmer and hot star brighter. The generation is surprisingly fast (about 1-2 sec on my 2.2ghz processor).
You can click on any of the star shown leading you to the system map. (the green star (top-left) is the solar system).


The system map
Everything work in respect of newtonian law , but for performance and gameplay , all planets orbits are accuratly pre-calculate once, because i decrease the accuracy of newtonian calculation as increment goes up. That ways everything is very fast and accurate and planets and asteroids have nice and fluid movements. I pushed that to extreme speed (50 years/sec) and everything is ok.
 [/url][/img]



Before i was using a sub-library called sfgui which give easy tool to make interface, infortunaly i found later that sfgui didnt meet my need and was slowing down my program, so i have deleted EVERYTHING i have done for the ui to make my own later.
Here is a very old version of the program i just found, it shows the industry panel of the province, others menu for demography and politic are not worth showing :


This is the spaceship editor
saving/loading , and some other useful shortcut are implemented (like copying current level to below).
(the grey square is the player i used to test collision).
Components and their interactions are partially implemented.






This is the template from wich a bloc level is generated ( There is another secondary file that is used for wall and door).


The bloc in-game , with some household generated

« Last Edit: December 10, 2013, 04:47:17 AM by Geoffroypi »
 My 4X game project
 

Offline GeneJack

  • Petty Officer
  • **
  • Posts: 17
  • I am operating within established parameters.
    • View Profile
Re: Developing a 4X
« Reply #1 on: November 28, 2013, 09:22:13 PM »
Look forward to hearing more.
 

Offline Alfapiomega

  • Lt. Commander
  • ********
  • Posts: 231
  • Thanked: 2 times
    • View Profile
    • My Youtube channel
Re: Developing a 4X
« Reply #2 on: November 29, 2013, 02:34:34 AM »
This seems interesting if only as an experiment!
"Everything is possible until you make a choice. "
 

Offline Geoffroypi

  • Moderator
  • Chief Petty Officer
  • *****
  • Posts: 44
    • View Profile
Re: Developing a 4X
« Reply #3 on: November 29, 2013, 07:01:54 AM »
Thanks for your interest. :)
Added some sreenshots to the first post .


If anyone is willing to design template level for the bloc  i would gladly accept their help, you do not need any drawing, programming skill, just to respect color and placement rules so the program can read it. 
 My 4X game project
 

Offline joeclark77

  • Commander
  • *********
  • Posts: 337
    • View Profile
Re: Developing a 4X
« Reply #4 on: November 30, 2013, 08:13:38 PM »
Very interesting macro-micro design there! How're you going to manage performance when lots of colonies and fleets are moving and shaking? Maybe colonies will "sleep" until somebody looks at them?
 

Offline Xelanthol

  • Chief Petty Officer
  • ***
  • Posts: 33
    • View Profile
Re: Developing a 4X
« Reply #5 on: November 30, 2013, 10:50:07 PM »
Looks neat! Keep us updated :)
 

Offline Geoffroypi

  • Moderator
  • Chief Petty Officer
  • *****
  • Posts: 44
    • View Profile
Re: Developing a 4X
« Reply #6 on: December 02, 2013, 09:24:10 AM »
Quote
Very interesting macro-micro design there! How're you going to manage performance when lots of colonies and fleets are moving and shaking? Maybe colonies will "sleep" until somebody looks at them?

Performance is my n°1 priority, a lots of 4x and grand strategy games suffers of performance issues , except paradox's games that are very well optimized .
 I have done a few tests , like simulating 1 month economy of  20 000 colonies at once (on absolute accuracy) , it takes 2-3 sec on 2.22 ghz processor. of course if we add everything on , those 2-3 sec will increase a lot .

That is why i'm planning , not to make remote ships/empire "sleeps" but decrease the accuracy of all game-mecanics as we go virtualy 'further'.
there will be 3 "approximation" :
The first  "absolute" , will calculate everything in very high accuracy , this will be true for the empire you own/live in, bordering empires , and place you have visited recently.
The second approximation will calculate for distant yet influencing territories.
The third will be much more global , it will serve for the rest of the galaxy (likely the 99.99% you might never see). It will only considere empire wide datas, and will act more like a history generator.

This applies for ships, economy, politic demography ect...

Performance will be also be greatly influenced by the pace of the game, because of the roleplaying elements and the amount of micro-scale  features i plan to add , the game will be designed to be slow yet intense , so i suppose 1 in-game year might take 1-2 hour or even more. It is a good thing for performance as the heavy calculations  planned will be spreaded a lot.

A note about space-ships travelling in newtonian era .
The ships will travel from planet to planet ,  doing (at early propulsion tech) hohmann transfers. Thats means ships will travel in waves given the launch opportunities.
Ships of the same wave will be assembled in a convoy , performance is going to like that and it adds some gameplay features.  
.

I have mostly done boring yet important things since my first post, like polishing the universe generation and province code.  

Now i am creating the gui engine, i have done some progress, i think i will have something to show in 1 week or less.




I will spam youre top screen explaining you how to efficienly exploit lazy workers swines, and make lot of profits  .

PS: I'm looking for a text font for the user interface , i'm not really an expert in font so if you have one in mind that  fit with the game , please let me know  :) .
« Last Edit: December 02, 2013, 09:43:38 AM by Geoffroypi »
 My 4X game project
 

Offline Thiosk

  • Commodore
  • **********
  • Posts: 784
    • View Profile
Re: Developing a 4X
« Reply #7 on: December 03, 2013, 10:54:26 AM »
ACH you are doin it right.

I'm in a preplanning project design phase, and a lot of things you've implemented are exactly the types of things my colleagues and I want to build software prototypes to do.

 

Offline coco146

  • Registered
  • Sub-Lieutenant
  • ******
  • Posts: 136
    • View Profile
Re: Developing a 4X
« Reply #8 on: December 05, 2013, 09:15:36 PM »
Very interesting indeed!  I do wish you luck with this!
 

Offline Geoffroypi

  • Moderator
  • Chief Petty Officer
  • *****
  • Posts: 44
    • View Profile
Re: Developing a 4X
« Reply #9 on: December 06, 2013, 05:35:02 PM »
thank you both  :) .

I had to deal with real life stuff , i just have gotten back to work today, so there isn't so much visible progress.

I'm continuing coding the gui, and i'm quite satisfied with the ui so far , and it isn't that painful to code . (i was literaly dreaded by that part)
for now windows, buttons, tables, and "another type of widget i don't know the name" are implemented  (see the picture), windows are draggable.

here  an exemple :



At terms i want to make a ui similar to eve's . Eve online is one of the few game that are very ui-heavy, its ui is visualy simple yet it looks good and is efficient at showing large chunks of data. 

 My 4X game project
 

Offline MarcAFK

  • Vice Admiral
  • **********
  • Posts: 1729
  • Thanked: 61 times
  • ...it's so simple an idiot could have devised it..
    • View Profile
Re: Developing a 4X
« Reply #10 on: December 07, 2013, 02:52:52 AM »
Looking good, I like the resource types you have there, it's got a nice realistic flavour going for it, also if you need playtesters I'll be glad to jump in, my french is horrid conversationally but your interface looks clean enough to be workable.
" Why is this godforsaken hellhole worth dying for? "
". . .  We know nothing about them, their language, their history or what they look like.  But we can assume this.  They stand for everything we don't stand for.  Also they told me you guys look like dorks. "
"Stop exploding, you cowards.  "
 

Offline Geoffroypi

  • Moderator
  • Chief Petty Officer
  • *****
  • Posts: 44
    • View Profile
Re: Developing a 4X
« Reply #11 on: December 09, 2013, 02:34:12 PM »
Quote
Looking good, I like the resource types you have there, it's got a nice realistic flavour going for it, also if you need playtesters I'll be glad to jump in, my french is horrid conversationally but your interface looks clean enough to be workable.

No problem, you'll be warned when i'll need testers, concerning the language don't worry , i won't release anything without a full english translation included.

Anyway i've done some work on the compagny scale economy. Company are a bit more aware of macro economy , (they don't rush at the smell of immediate profit anymore), the local market is less volatil . it means that civilian and company capital isn't anymore spoiled by the regular bankruptcy.

Because i'm talking about industry here a word about it :

PPU : ( Production Per Unit(factory))   is basically driven by the PPU MAX ( Production Per Unit MAX) the man-power factor the material factor and the raw material factor.

Man-power factor : there is 7 type of employees with their respective base salaries , the man-power factor is calculated given the employment market, each ressource needs a diferent amount of employees . Each employement factor are inter-dependents so it is important to have qualified workers if their are needed, or the productivity will drop.

Material factor : Is the availability of machines and intermediate products(like fertilizer for farms). Even when the factory is already constructed it "consums" machines (replacing the old and broken ones)

Those 2 factors above determine the PPUMAX (which depends on the PPUB ( Base Production Per Unit) )  PPU MAX is needed before so that the factory will consum the correct amount of raw materials.

Raw material factor: the final factor which is the amount of raw material(s) available , it multiplies with the PPU MAX providing the PPU .

That is how (basically) the productivity works .



On top  of that their is finance for each industries ,
expenses  depends on workers salaries, materials and raw materials expenses, fixed expenses, special taxes, operational expenses and others ponctual expenses.
Profits is the  sales income - the expenses above - corporate taxes ( based on gross profit).
Profit goes to the respective industrie capital , loss are deducted from capital .
Capital per industrial unit is important as it determine the general health of the said industrial sector , the ability to invest in new factories, the liquid assets and (very important) the ability to resist market fluctuation.
Bankrupty is directy affected by capital, but before the factory goes into bankruptcy , the latter will 'sleep' if loss are too big : production will drop to 0 as material and raw materials expenses and workers salaries will decrease a lot this gives time to the factory to support bad market , employment and supplying situation.

When an indutrial sector has fallen to 0 factories, it can restarted if projected profit and demand is good enough thanks to the civilian capital ( which involve the propensity to save for each citizen class). Nothing is lost , a fraction goes to taxes a fraction into buying goods, and another fration to civilian capital.

When an factory is constructed it usualy consums construiction stones(concrete), iron and machineries. for an industrial particul accelerator ( it produces anti-matter) it is slightly diferent construction materials.



Oh and taxes of course there is taxes , for now there are corporate taxe, income taxe, and the 'citizens taxe' (it is a fixed taxe on all people) , the economy is directly affected by taxes not just because of the  companies , but also the citizens (their consumption depends on their salaries , and their propensity to save).  




Now i will work on subsidues along with mines , mining sector is quite special as it will support all the heavy industries, factories buildings and ships building (abondance and availability generation is already implemented and is taken in account).
Even if the you have a very good mineral availability , you need at least millions of people , a healthy industrie or an international demand to make a mine sell most of its stock.
For exemple in my 500 000 habitants province, the iron availability is 0.5 , if a mine is built here , it will produces (with 100 % man-power and 100% machines) 108 000 Tonnes of iron per month, unless you force every citizen to eat iron at dinner , my mine will never sell all its stock , price will fall and the mine will close destroying a portion of the civilian capital by  the same time. The mine in my exemple would spend 4 800 000 $ for its employees + 1 600 000 $ for mining machineries and  700 000 $ on fixed expense  that makes a total expense of  7 100 000 $ / month , the profitability threshold is then 7 100 000/ 108 000 = 64.74$ per tons if everything is sold .

If as a province governor you want iron for the industries or for your ships, you will be able to make contract  or subsidues with iron mining corporations and other industrial sectors.

Contracts will create a virtual demand of the chosen ressource , prices will be fixed ,  it will be regular or ponctual. Ressource paid will go to the state stockpile , that you are free to sell to the civilian stockpile.

Subisidues :
On capital : it will be ponctual, it simply adds capital to the industry sector to make it survive or help it develop.
On sales : it is the bonus for each sales , virtually raising the selling market price .
On production : the bonus for each tons/unit produced.

About abondance and availability :  There is a base availability/abondance for each minerals * planete  availability/abondance.
When abondance drop to 0 , you will still be able to produce but the availability will drop as well , making harder for mines to be profitable.
Abondance just represents the amount of relatively rich deposits . it's just like real world.

What i am going to work  next is intermediate corporations, (it is just partially implemented for now) with
social services
Transport services
R&D  & scientifics services
Ingeneering and technicals services
Wholesales
Proximity trade
hypermarket
Raw materials extraction
Manufactures & workshops

They work slightly diferently from the factories .
-Some will influence factories productivity
-create employement just like factories (done).
-Will have same financial layout as factories(done).
-Raw material extraction & manufacture will be much much much less productive than factories and mines but it will require a lot less machines to work.

The goal in implementing intermediate companies and by adding a new layer to the economy is to make the employment and the goods market more stable and diversified .For exemple workshops and raw materials extraction companies will be polyvalent at producing needed goods at low demand , will be able to change their production depending on the market but will never be as competitive as mines and factories for large trades. Intermediates companies will be a good starter for emerging industries and will fill the gaps even in prosperous industries.  

I didn't mention in my previous post , but suggestions are welcomed , if you have ideas that would make the economy better . please go on , i prefer to have suggestion at this stage of development than after everything is implemented and debugged. It can be something you have always wanted to see in a game , a suggestion concerning the UI , goods you 'd like to trade in the game ,  taxes  ect ...  
« Last Edit: December 09, 2013, 03:11:29 PM by Geoffroypi »
 My 4X game project
 

Offline MarcAFK

  • Vice Admiral
  • **********
  • Posts: 1729
  • Thanked: 61 times
  • ...it's so simple an idiot could have devised it..
    • View Profile
Re: Developing a 4X
« Reply #12 on: December 09, 2013, 09:44:09 PM »
Wow, I can see you're going to a lot of work to make a detailed economic and industrial simulation. Will there be computer controlled entities that also drive the economy, using resources and investing in infrastructure without your input? I'm imagining that the more complex you make your simulation the more you'll need to add self repairing mechanisms that attempt to make up for any shortcomings the player may make towards the economy.
For instance if i invest to much into mining production, perhaps the NPC controlled mines start closing due to low profitability, then investment is made into other industries due to the lower cost of minerals, also since i've built more mines there would be more demand for the resources mines need, like machines, so NPCs would invest in more capacity for machine production, also i'm assuming fuel and worker training and any other prerequisites you add to the game.

I'm thinking the real market works somewhat like this, but you need to be careful to not end up with too much automatic feedback causing a cascade failure and total economic collapse, though that happens in real life too, so perhaps it should be possible but the player needs plenty of warning and advice/information on how to fix it.
" Why is this godforsaken hellhole worth dying for? "
". . .  We know nothing about them, their language, their history or what they look like.  But we can assume this.  They stand for everything we don't stand for.  Also they told me you guys look like dorks. "
"Stop exploding, you cowards.  "
 

Offline Geoffroypi

  • Moderator
  • Chief Petty Officer
  • *****
  • Posts: 44
    • View Profile
Re: Developing a 4X
« Reply #13 on: December 09, 2013, 11:42:12 PM »
Quote
Wow, I can see you're going to a lot of work to make a detailed economic and industrial simulation. Will there be computer controlled entities that also drive the economy, using resources and investing in infrastructure without your input?
In fact the whole economy is automatised and each industries act as an independent computer controlled entity, if you are mentioning macro-economic entities , the government and its bureaucratie will indeed influence the economy .

Quote
I'm imagining that the more complex you make your simulation the more you'll need to add self repairing mechanisms that attempt to make up for any shortcomings the player may make towards the economy.
Quote
I'm thinking the real market works somewhat like this, but you need to be careful to not end up with too much automatic feedback causing a cascade failure and total economic collapse, though that happens in real life too, so perhaps it should be possible but the player needs plenty of warning and advice/information on how to fix it.

You are right, in fact 90 % of the work is to make  economical "safety valve", and to provide to the industries intelligence on the current and future global economical situation : it will hopefully prevent thoses cascade failure i have witnessed on previous versions of my economic simulation. It is important to keep simple things simple , and add complex algorithme far from the simple core or the complexity needlessly grows exponentialy. Today the economy works pretty well , it is smart enough to globally make durable profits, and to support market fluctuation by "sleeping", it makes previsions on profitabilty before investing ect...

Quote
For instance if i invest to much into mining production, perhaps the NPC controlled mines start closing due to low profitability, then investment is made into other industries due to the lower cost of minerals, also since i've built more mines there would be more demand for the resources mines need, like machines, so NPCs would invest in more capacity for machine production.

Mines won't suffers from your investment at the contrary as your investment are represented by the 3 types of subsidues, and contracts ( i just finished that by the way). For exemple iron mines replace 0.00002 mining machine / tons produced so a 108 000 PPU iron mines will spend for 2.18 mining machines each month which base cost is 1 600 000 $ . mecanically a demand of 2.18 mining machines is added, a mining machine factory might or not be built , if a factory is built it will create a material demand of industrial machines (0.0002/tonnes), a raw material demand for copper (0.08 tonnes/tonnes) iron (0.9 tonnes/tonnes)  and zinc (0.02 tonnes/tonnes) because a mining machine has a density of 2g/cm3 and volume/unit of 50M3 , it weight 100 tonnes so to produces 1 mining machine you will need 8 tonnes of copper, 90 tonnes of iron and 2 tonnes of zinc and eventually 0.02 unit of industrial machine.

Not to mention the jobs created (and the impact on goods consumption taxes and employment market):

unqualified worker : 0.29 / tonne
qualified worker    : 0.225 /tonne
technician           : 0.065 / tonne
employees          :  0.04 / tonne
ingineer             :  0.021 / tonne
manager             : 0.04/tonne

Special statuts (with special rules!)
entrepreneur            : 0.0025
shareholder/capitalist : 0.0008



« Last Edit: December 09, 2013, 11:52:02 PM by Geoffroypi »
 My 4X game project
 

Offline Geoffroypi

  • Moderator
  • Chief Petty Officer
  • *****
  • Posts: 44
    • View Profile
Re: Main Topic
« Reply #14 on: December 12, 2013, 09:45:02 PM »
Updated the development status topic (13/12/2013).

Pour les Français qui passent par là j'ai créé récemment un sujet sur Canard pc. Coin coin pour ceux qui arrivent de cpc  ;) .


EDIT :I posted a presentation of the project on BAY12 forum , if you want to check it out.
« Last Edit: December 13, 2013, 04:54:44 PM by Geoffroypi »
 My 4X game project
 

 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51