This entry was posted on Friday, February 10th, 2012 at 3:43 am and is filed under Traipse-Dev. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
I’ve thought long and hard about how I will be making the effects appear after I made the change to the map and I am still not 100% sure how I will apply them. In this post I will go over what my goals are and how I plan on attempting the new effects.
The Fog of War and The Unseen / Unsent Policy
First and foremost. There will be no Fog of War. I’m sorry. I feel this is a deprecated system since it is too easy to work around. The Fog of War will be replaced with light and darkness effects. Images the player cannot see will not be sent to their clients or will be removed from their clients maps. Their IDs will be ‘serialized’ when unseen, and ‘de-serialized’ when seen, allowing the maps to have synchronized IDs for images (and other objects). While a user with some code skill-craft may find a work around for images that have been ‘de-serialized’, they will still see a real surprise when it is first ‘de-serialized’ … so I am not going to try and prevent crafty users from modifying that part.
The leve of darkness will be an overlay similar to the Fog of War. I will most likely create a QImage that I can use to fill the “shape” of objects, such as a building or a hallway, and then set its opacity based on the level of darkness. When light enters the area the layer will be clipped away and objects that exist in that area will be ‘de-serialized’ and sent to clients.
Circular And Sharp Effects
For the best interest of development speed I will start with a circular design for light effects. I am currently expecting to grab a QRegion from objects near the light effect and when it reaches, say a wall line that someone drew in, it will stop and create a clip region to remove from the darkness layer. At least that is what I hope for.
After I get the effects back up and running I will create the option to have ‘Sharp’ lines for the effects. The sharp lines will follow the lines of the grid, just like light would on a game map you have at a table.
No Real Layer
The effects layer wont have a layer for itself Effects can operate on the Miniatures and Background layer so there is no need for a new layer. I think adding a new layer for effects would create a convoluted the Map Tool Box. Instead, general options for the effects layer will be handled by the grid, and effect will then handle its own effects.
this is a short post and over the head of some understanding. Sorry.