(done) Specify med/far views for wallitems?

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

(done) Specify med/far views for wallitems?

Post by Gambit37 »

Wall-items always seem to be auto-scaled by the engine. But it doesn't always do a good job at.

Sometimes I'd like to override the auto-scaled med/far views and specify my own pre-drawn images.

Is this possible, and if not currently, would you consider adding it as a feature?
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Specify med/far views for wallitems?

Post by Sophia »

This shouldn't be very hard to add, so I'll add it.

In 0.70 you'll optionally be able to specify additional views for wallitems: front_med, front_far, side_med, and side_far, as well as other_side_med and other_side_far if you're using other_side views for asymmetric wallitems.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: (done) Specify med/far views for wallitems?

Post by Gambit37 »

Woo, thank you :) I'm still not sure how this will work with level tint shading / archetype shading, but I'll test it out when you're ready.
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: (done) Specify med/far views for wallitems?

Post by Sophia »

It was actually a very simple addition. DSB first looks for a bitmap for a given distance, and, if no bitmap exists, it then dynamically scales the base bitmap to create one. This was previously only used for flooritems, but all that is needed to make it work for wallitems is to add the configuration options to allow for statically scaled bitmaps.

As for your question, though, that's where things get interesting. Flooritems from the standard DM graphics set that have all of their bitmaps specified are pre-tinted, so DSB simply doesn't tint flooritems that haven't been dynamically scaled. This is a special exception in the code. Right now, wallitems have no such exception, so it would try to tint both static and dynamic wallitems. This may actually be what you want, but it's also inconsistent with how flooritems work, so I'm a little wary of doing it this way. Maybe another archetype option?
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: (done) Specify med/far views for wallitems?

Post by Gambit37 »

Yes, being able to pre-tint wall items and having a flag to tell DSB not to auto tint them would be perfect thanks.

Does this also mean I can specify different images for wallitems on left/center/right walls? It's always bugged me that alcoves show the same (wrong) perspective when shown on left/right walls and I'd like to fix that.
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: (done) Specify med/far views for wallitems?

Post by Sophia »

Right now, the engine will still display the default front view for a wallitem even if it's on the left-front or the right-front wall, because the "side" images are used to render the perspective views. I could maybe add some new images, though, depending on what you wanted to do... !
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: (done) Specify med/far views for wallitems?

Post by Gambit37 »

The main problem is the alcove: they are drawn with perspective that only works when viewed on a centre tile. To look good at left/right views, I'd prefer a variant that has better perspective for that tile:

Current (wrong) perspective:
Image

Preferred (right) perspective:
Image

I appreciate that to enable this might cause problems with drawing the alcove contents though? Would they still stick out beyond the edge of the new image?
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: (done) Specify med/far views for wallitems?

Post by Gambit37 »

A small thing I noticed with the new side_far and side_med views: the old near_side property now has an inconsistent name. Would it be possible to standardise it to side_near for consistency, or add an alias for it, so that either near_side or side_near will work?
User avatar
Sophia
Concise and Honest
Posts: 4239
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: (done) Specify med/far views for wallitems?

Post by Sophia »

I'll modify it to check for a side_near if near_side isn't found.
Post Reply