flackr / dungeon

A D&D based multiplayer role playing game.
13 stars 4 forks source link

Implement terrain types. #11

Open flackr opened 12 years ago

flackr commented 12 years ago

Summary

Terrain should have a type with it. For the present terrain should be one of:

This is definitely a larger piece of work and will eventually require a new UI section to edit details.

Implementation

We could have each square of the map have both a tile and a terrain type or we could define terrain types for tiles. Either approach should work fine although we may want to support loading large background images and just defining terrain types for each square later. Whichever approach we use we will still want tile types to have an automatic terrain type to avoid having to effectively draw a map twice.

This will require changing the format of the map generated initially in dungeon-common.js and saved out to files. The map save file should include all of the tile definitions as it does with textures currently.