Today’s post shows a screen shot of the process of building up a swamp on Dinosaur Island. The dark blue area is salt water. The alternating brown and yellow bands are sandy and swampy areas. This process was automated by using a “flood fill” algorithm that is now built into the Dinosaur Island program.
This is the first peek behind the scenes where you can see how we are building Dinosaur Island. This will be either really cool, or really boring, so hang on. If you’re a nerd at heart and want to learn how these types of programs are written then today’s post is for you. If this is the kind of thing that bores you to tears you should probably go check out the Dinosaurs in the News section; lots of cool stuff there.
We have been writing M&S (Modeling & Simulation) programs since the mid 1980s. M&S programs are used to model very complex environments and behaviors. For many years we have been working on high-end wargames and emergency disaster simulations for the U.S. Department of Defense, DARPA and other government organizations. While Dinosaur Island doesn’t seem like an M&S program, it really is. In fact, we are modeling Dinosaur Island in greater detail than any of the programs that we’ve done in the past.
For every square meter of Dinosaur Island we need to know:
- The elevation (in meters).
- The type of terrain (swamp, forest, fresh water, etc.).
- The vegetation (every plant and where it is in its life cycle).
- Any dinosaurs (or considering their size, any parts of dinosaurs in this particular square meter).
This, obviously, is a lot of data. So, one of the first tasks in creating a very large M&S project like Dinosaur Island is to first create the tools that facilitate entering all this data. In the picture at the top of today’s post is a screen shot of the Dinosaur Island editing software. This allows us to read in bitmap files (BMPs) that are 2,000 x 2,000 pixels, convert them to height maps and use the data to display the resulting landscape. Next, we can start adding different terrain types (in the above picture, we’ve just added the salt water and fresh water areas on the island).
We traditionally make these editors available to the users (that’s you) to create their own models and environments. How would you like to make your own Dinosaur Island?