Revolutionary-Games / Thrive

The main repository for the development of the evolution game Thrive.
https://revolutionarygamesstudio.com/
Other
2.76k stars 493 forks source link

Add the planet generator to the game #872

Open hhyyrylainen opened 4 years ago

hhyyrylainen commented 4 years ago

There is a prototype: https://github.com/Revolutionary-Games/thrive-prototypes/blob/master/Planetary_Model/planet_generator2.h that should be modified to fit into the game and put in. There are some style stuff and probably some script bindings needed.

hhyyrylainen commented 4 years ago

Copying a comment from discord:

I think the planet generator isn't like a microbe stage specific thing. So maybe a new sub folder like src/simulation/planet_generator.h would be the best place.

For where to construct the planet object: I think that if the GUI can tweak the parameters then it needs to work like so: GUI calls native function event updateNewGamePlanetDetails in ThriveGame, which fires an event after generating the planet maybe something line PlanetDetailsUpdated which the GUI listens to and updates waht it shows. Then when new game is started the planet details object is sent to the AngelScript patch generator (this needs adding reference counting and script bindings for the planet objects etc.) which then uses the properties when creating the map. The planet details object should also be probably stored in the created map.

hhyyrylainen commented 4 years ago

Removing from the next release as this is not being actively worked on currently.

hhyyrylainen commented 4 years ago

The code needs porting from C++ to C#, the code is on this branch: https://github.com/Revolutionary-Games/Thrive/tree/add_planet_generator