DigitalLibrarian / VS2013Projects

DF/CDDA inspired content driven simulator
1 stars 0 forks source link

Graphical Tile-based UI #31

Open DigitalLibrarian opened 8 years ago

DigitalLibrarian commented 8 years ago

This is a placeholder. Come up with a plan for graphics.

Must be able to work on any simulation mechanics from a console driver. (separation) Must have a tile setting solution as flexible as cataclysm and dwarf fortress Must be possible to write new guis easily reusing the existing tileset resources. Want to be able to curate and persist the tilesets separately from the application (artist extensibility) Some form of 3d visualization must conceivably be possible (future experiment).

Probably go with a windows forms experiment for the first real graphical driver.

DigitalLibrarian commented 8 years ago

How Cataclysm does it

The cataclysm dark days ahead tool chain for tilesets looks pretty cool.

Wiki Tile set editor

Looks like cata just exposes labeled objects to the rendering system and that rendering system uses the labels to find the tiles from the exported databases created by the above tool chain.

There is also a hierarchy of names which hooks into game-semantic categories of sprite. For instance, if a new kind of monster is added that there is no tile for, there might be a "monster" tile defined that can be used. This allows for a kind of future proofing and forward customization on the part of artists.

On top of that it does a few UI tricks, like showing a chevron on top a tile that has many items in it.

This would tie into a broader content system, but might be worth some looking at for view model inspiration. The application itself doesn't look like it has much that is reusable.

CataModder C# WinForms on GitHub

DigitalLibrarian commented 8 years ago

How DF does it

Dwarf Fortress exposes an integer (index into code page) for each sprite. Those integers are then mapped to tile images with coloring hints. In terms of symbol information, Code Page 437 is the entire range of output from the dwarf fortress system itself.

It seems that some higher level model is exposed to the rendering engine that might be used according to different configurable rules. For instance, if a dwarf is legendary in a skill, it flashes blue every other frame (in the phoebus tileset).

DF's Graphic sets for creatures is the trick that is used for phoebus. Looks like a highly specific and semantic language. There are tons of graphics packs on the DF wiki.

The wiki doesn't say so, but I'm sure there is a categorical fallback system as described for cataclysm dda,

DigitalLibrarian commented 8 years ago

Slightly off topic but here is a Bitmasking example for painting tiles

DigitalLibrarian commented 8 years ago

Depending on how the MonoGame experiment #46 goes, this might be done in familiar territory.

It would pretty easy to do the z level transparency effect, but better than df.