🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Tenative Tile Terrain Trio!

Published April 21, 2006
Advertisement
In previous iterations of MoE, I had a simple enum for tile types:
desert, tundra, forest, grassland, hill, mountain, etc...

This kinda sucked. It created a number of conditions in other code, which would then need to be edited if the tile type list changed [which I'd like to do eventually with expansions]. It also made forests far less common than they need to be, since wood source is a primary resource, rather than games like civilization or MoM that just give "production" from everywhere.

So for this iteration, I was considering splitting up the tile types into a terrain/elevation part, and a 'forest' part. While doodling on it today, I settled actually on three parts, since a number of parts are really independant, and I'd rather code around tile traits.

        public enum TerrainType {            //            // Flatland - Flat or slightly rolling solid land.            //            // Wetland - Flat land partially or fully submerged, largely unsuitable            //            for building.            //            // Hills - Highly rolling land, without sharp changes in elevation.            //            // Mountains - High elevation with sharp elevation changes and features.            //            // FreshwaterLake - A large inland body of water which is fresh.            //            // Shallows - Ocean nearby land with depths that support fish.            //            // Sea - Deep ocean.            //            Flatland,            Wetland,            Hills,            Mountains,            FreshwaterLake,            Shallows,            Sea        }        public enum FaunaType {            //            // Desert - No fauna supported, either a sand desert [in heat] or an icy            //           tundra.            //            // Grasses - Plain grasses, with a few spotty trees but not enough to even             //            build minor structures.            //            // SparseForest - Minor patches of trees. Not enough to impede movement,            //                 but enough to hide in, and provide wood for a few             //                 structures.            //            // DenseForest - Major forest. Trees impede movement, farming, and expansive            //                building. They do provide wood for large building projects.            //            Desert,            Grasses,            SparseForest,            DenseForest        }        public enum TemperatureRange {            //            // Polar - Area of Permafrost and/or perpetual snows.            //            // Cold - Shortened growing season, limited winter travel.            //            // Temperate - Cold winters, warm summers, full growing season.            //            // Warm - Mild winters, full growing season, no cold weather limitations.            //            // Tropic - warm winters, hot most of the year.            //            Polar,            Cold,            Temperate,            Warm,            Tropic        }


Tiles can then be combinations of these traits. Not a few will likely have identical effects [and textures], and I might just use this as traits for map generation and creation of a monolithic type enum; I'm not quite sure yet.


In other news, I got a callback on yesterday's interview already. The place and people seem very cool even if their finances and business are superficially suspect. The position itself would be a nice resume addition, so as long as the checks keep coming and their business practices don't drive me mad it seems nice. We'll see; these things are always a bit hit or miss until the offer letter shows.

[edit:]

Oh, and yay, NHL playoffs! Plus actual hockey playing for me tonight, usually a nice end to the week.
Previous Entry Swedish Fishmongers
Next Entry 2nd Interview Today
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement