New Beginnings

Dave and I have started working together on Earthsim.

We have started with a clean slate and are writing pretty much everything from scratch. But times have changed, there is so much open source out there that we can base many components on existing technologies. This leaves us clear to focus on just the pieces we want to specialize on.

We have already set out some of our goals for the game and what the engine needs to do:

  • Simulate an 80km square tile of landscape at 16k x 16k resolution.
  • Simulate over a million plants & trees for the 80km square down to centimeter accuracy.

Above is our first screenshot from getting the first rendering prototype drawing a test landscape. Dave is building out the DirectX parts of the engine while I work on the model for how all our plants and trees grow.

Storing such large data sets at high performance needs real-time data compression. This done using hierarchical grids running at multiple resolutions that divide a world up into successively smaller cells that each have their own sub coordinate systems.

These sub-coordinate systems let us store plant and creature positions relative to their closest grid cell.

This storage model allows those positions to be stored with far fewer bits of data than would be required in the floating point or large integer numbers that would normally be used to store a position over a big section of landscape.

Here is the design I just finished for our simulation grids. This shows all the different grid resolutions we are using to model and simulate our ecosystem.

Earthsim Grids

These grids also enable the algorithms to be more easily multi threaded for many core parallel performance, as well as enabling us to precisely tune the code so that all data fits by design into first and second level CPU caches over a complete data processing loop. This removes the requirement of the CPU to fetch new data from main memory until a given cell’s work is complete and sent back out of the cache to main memory.

We want all performance critical code to be running in this fashion so performance is gated on first of second level cache speed rather than main memory speed.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s