Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!






biomes test...

Posted by BGB, 29 July 2013 · 489 views

went and added biomes:


Well, a few updates:
Biomes have now basically been implemented;
The engine now has (essentially) infinite terrain (regions and chunks are generated as-needed, and regions are unloaded as the player moves too far away).

As the player travels further away from the origin, new regions will be created automatically, and more of the math has been cleaned up to better avoid floating point precision issues (coordinates are region-relative, ...).

Also fixed some issues with the "reference origin" system being broken (where the reference-origin system basically handles larger coordinate spaces by having everything in the scene be represented relative to a movable origin point).

The boundary walls are still enabled for now, where these walls basically surround a 1km^2 starting area. These may or may not be disabled later.

Biome types currently are stored per-chunk, and things like colors use quadratic interpolation between chunks.

Currently, there are grass, water, and sun-light colors for each biome, and the grass and leaves textures have been partly desaturated (to allow color modulation to be more effective).


so, yeah, basically each region is drawn translated by RegionOrigin-ReferenceOrigin, and things like camera and entity positions are also relative to the reference origin, ...

I had implemented it a while ago, but it wasn't really well maintained partly because previously memory use and bugs kept the player mostly confined to a reasonably small space (bounded by walls).

recently, more work is going into basically cleaning up some of these issues, trying to reduce memory use, and hopefully getting around to things like working some on improving performance, ... (terrain handling stuff is currently fairly expensive regarding CPU cycles...).

or such...




PARTNERS