Back to Space Fortress Overview
The whole game environment takes place over an array of cells. These cells are initially just a lot of dirt, but as they are mined and built up and modified, they become richer elements of the environment. Every cell contains a little information about the environment. Maybe a flyweight pattern would be useful for this to save on memory. For now, we're sloppy and can fix that later.
What follows are some possible cell types for the environment array and how they behave.
The cell can be empty! If it's empty, there is nothing there. It is a vacuum. Initially, the top few rows of the planet are empty. That's where you can see the background and where your ship lands and all of that.
Then there is dirt. A cell of dirt is solid. Most creatures can't walk through it, your ship can sit on it. "Dirt" is a very general term for a cell which can be dug out. A cell of dirt can have many qualities. For instance, a cell of sand can be easier to dig through than a cell of granite. They might be drawn differently, but they are still considered "dirt".
Some elements of a cell of dirt:
Since this game is all about modifying an asteroid. Dirt is going to get damamged. Damaged is a generic term for doing things to dirt that eventually make it disappear. The most obvious example is a miner. A miner comes along and drills away at a cell of dirt. After the cell can't take any more drilling, it disappears and the cell becomes no longer dirt. Qualities that deal with dirt damage are density and integrity.
Density is the strength of the dirt. The weaker the dirt, the faster it takes damage. The dirt's integrity is how much more damage it can take before being destroyed. So our little equation would be: New Integrity = Previous Integrity - (Force Applied * Density)
Dirt also drops stuff. When it becomes destroyed, it gets the option to produce an entity. Stuff it could drop include rubble, fancy rocks, ore, artifacts, or fossils. I think a good idea would be either to have each cell naturally have a set of possible drops (like 'granite' tends to drop rubble but 'clay' tends to clouds of dust) and have special drops sprinkled across the map. Like a section of the map could be rich in ore. So it grows in little veins. Or maybe an ancient city lived in this moon, so a patch of area is rich in artifacts.
An extra little bloat (there! using DF terminology now) would be to have the drops affected by the negative integrity of the tile. For instance, if your miner does 100 damage to a cell that can handle 75 damage, then we have an integrity of -25. It drops some rubble! If a small nuclear spacebomb does 10000 damage to a cell that can handle 75, we have an integrity of -9925. It drops a fine mist that disappears a moment later.
With a feature like that, we could introduce things like archaeologists. They can maybe sniff out how much damage a cell can take and or pick away at it very slowly. They might slowly bring the damage up to it's breaking point, and end up with an integrity of 0 or -1. If there was an alien iPod from a million years ago in the moon, it would drop. But a clumsy miner would have smushed it.