Door button offsets

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: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Door button offsets

Post by Gambit37 »

In trying to fix DMs weird perspective on doors and door frames, I've discovered that the door button X offsets seem to have no effect on the left side door button: they don't seem to be rendered at all in that position?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Door button offsets

Post by Sophia »

This is by design. Anything with the "DOORBUTTON" renderer_hack won't be drawn on the left side at all.

The reason can be seen if you disable the renderer_hack: DSB tries to draw flooritems symmetrically, because that is normally desired, so the left side doorbutton will show up on the left side of the doorframe, which just looks wrong and weird. With anything resembling the standard wallset, the button is obscured by the wall, so just not drawing it was the easiest answer.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Door button offsets

Post by Gambit37 »

Ok. Is there any way around it? I've corrected what I think is broken perspective on door frames which means that door buttons should be visible in those positions.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Door button offsets

Post by Gambit37 »

Hmm, on second thoughts I need to revisit my entire wallset. It seems I based it off DM 3.x which tried to correct the perspective. But of course I forgot that DSB is based off the 2.x versions. I'm going to have to redo a lot of stuff. :cry:
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Door button offsets

Post by Sophia »

DSB can take unmodified DM 2.x wallsets (compatible with CSBwin) but the most commonly used DSB walls are actually RTC-style combination wallsets that are, strictly speaking, neither DM 2.x nor DM 3.x. They have the perspective of 2.x but are broken into pieces, and also have the bricks arranged so that wall buttons don't appear on a seam between bricks.

The big problem with using 3.x style walls in DSB is wallitems on the far walls. They simply aren't displayed in 2.x, while in 3.x they have procedurally generated "stretched" bitmaps that look fine with the default wallitems on the default DM walls but will probably look like crap with custom walls and wallitems. The DSB renderer is already enough of a mess I don't really feel like delving into this, either, to be honest.

Anyway, you could always just use a separate doorframe with the button already included as part of the image. That's probably what I'd do.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Door button offsets

Post by Gambit37 »

I realised right after I posted that I could just precompose the button on the frame. I've not had time to try yet... Are door frames flipped between left and right? Can I use the same frame for left/center/right or do I need to do something clever?

By the way, one of the reasons my stuff looks worse is because I tried to fix the missing bricks problem, so my walls have a lot of extra seams which are much less forgiving when getting everything to line up.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Door button offsets

Post by Gambit37 »

Is there a parameter like "side_far_alt" that I can apply to the doorframe so that I can specify a non-flipped bitmap? I vaguely remember you might have added this capability to flooritems but I can't find any examples of it. Otherwise, I'm not sure how to solve this as the door frames are also flipped, so pre-composing the button doesn't help.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Door button offsets

Post by Gambit37 »

These would seem to be the parameters I need, but they do nothing for floorflats or flooruprights. Are these just for wallitems?

Code: Select all

other_side
other_side_med
other_side_far
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Door button offsets

Post by Sophia »

For the moment they only work with wallitems. For 0.78 I'll make them work with the two types of flooritems as well.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Door button offsets

Post by Gambit37 »

Ah great, thank you! :)
Post Reply