Jump to content
  • Advertisement
  • entries
    359
  • comments
    237
  • views
    189175

Tenative Tile Terrain Trio!

Sign in to follow this  
Telastyn

69 views

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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!