nstgeorge / VEKTA

A space exploration game created in Processing 3 with orbital mechanics
MIT License
1 stars 1 forks source link

Update dynamic terrain system #66

Open nstgeorge opened 3 years ago

nstgeorge commented 3 years ago

Short Description

I designed the temperature-reactive terrain system very quickly, and it's not very good. Let's update it with better coding practices and more terrain possibilities.

More Details

When I created the terrain system, I was working on the game for class and had a sprint due that night, so it's not very good. There are only a few terrain types which get switched out. @rvanasa suggested creating something like an AdaptableTerrain class that can hold a currentTerrain value or something similar, which I think is a good idea.

Related Ideas

If we're going to work on this, we might as well also add more dynamic terrain types! Please let me know if you have any ideas.

rvanasa commented 3 years ago

A few ideas for terrain components, just for brainstorming:

Maybe we could reverse the control flow so that a planet has a Terrain, which generates and maintains a list of Location objects. The LandingSite logic could then become a subclass of Location, which makes it possible to have different parts of a terrain react differently based on the planet's state. For instance, a settlement might become abandoned if the temperature rises, but other locations such as geysers or caves would still be available to visit within the terrain.

I'll have a go at making a JSON or XML configuration system for this, so that way we can have lots of flexibility without having to manually code each transition between terrain features.