Page 1 of 1
Directional Bitmaps
Posted: Sat Mar 23, 2013 11:51 am
by Ser Xav
Can DSB display bitmaps for objects dependent on view direction? For example, like the DM2 CROSS_1 object (it's called FLOORITEM_CROSS_1 in RTC).
Ie, If a bitmap is seen whilst the party faces north:
FLOOR_DECOR_FRONT0_N
FLOOR_DECOR_FRONT1_N
FLOOR_DECOR_FRONT2_N
FLOOR_DECOR_FRONT3_N
If a bitmap is seen whilst the party faces east:
FLOOR_DECOR_FRONT0_E
FLOOR_DECOR_FRONT1_E
FLOOR_DECOR_FRONT2_E
FLOOR_DECOR_FRONT3_E
And for side views:
FLOOR_DECOR_SIDE0_N....
FLOOR_DECOR_SIDE0_E....
etc
Sorry if I missed this in the wiki. Thanks

Re: Directional Bitmaps
Posted: Sat Mar 23, 2013 7:07 pm
by Sophia
DSB accomplishes the same result through different means.
The viewangle property of an archetype specifies the direction(s) that it's visible from. This can either be a single direction, or a table containing booleans for all four directions, e.g., { true, false, true, false } would only be visible when looking north/south.
By creating objects that are only visible from certain directions and overlapping them on a tile, you can create the appearance of an object that looks different from different directions. The process of spawning the "sub-objects" can be automated, too, of course; look at the dm2 table for an example. I'd be happy to help you write some code to automate this task, as well, if needed.
Re: Directional Bitmaps
Posted: Sun Mar 24, 2013 8:52 am
by Ser Xav
Hi Sophia, thanks for your response. What would be very useful is a simple example of the code implementation, explaining how the viewangle property works within the archetype. Am not quite sure I fully understand where it goes and how it's configured. Many thanks.
Re: Directional Bitmaps
Posted: Sun Mar 24, 2013 12:34 pm
by Gambit37
Check the DM2 table in the test dungeon, that's a clear example.
You place one table in ESB, and the engine will automatically spawn the one that's viewed from the other angle.
Re: Directional Bitmaps
Posted: Sun Mar 24, 2013 12:50 pm
by Ser Xav
Oh, apologies, I didn't see the DM2 table in ESB test dungeon.... will study it. Thanks.
