Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  Doors in SG  (Read 2155 times)

0 Members and 0 Guests are viewing this topic.

Nobbit

« on: 15, December 2015, 20:24:20 »
Hi, i just died and was teeported back to SG. I realized that before enterin a room, the door was open, as soon as i enter the door step, it closes, i go through the door back and forward and after a while, it opens (it is the same time as it is usually opened and then closes automatically). Crazy, isn't it? that applies for bank and smith, other doors work fine.
Good luck
nobbit
nobbit
former collector of cursed rings
nowadays collector of cursed things

A dwarf, who fights with a sword does also like diluted beer (dwarvish saying)

smacky

« Reply #1 on: 15, December 2015, 20:24:20 »
This is likely due to an arch change I made the other day.

I'll have a go myself, but to clarify: the door shuts while you are on the square? When you enter the square does the door open or remain closed?

smacky

« Reply #2 on: 15, December 2015, 20:24:20 »
Got it. The animation/direction for doors works in a slightly strange way (so we can have double doors like the church). I broke this balance.

So those door (prob others too in the same orientation) are actually fine; they're just drawn with the wrong face so they look open/closed when they're closed/open.

Just need to think a bit how to best fix things on both 0.10.6 and 7.

smacky

« Reply #3 on: 15, December 2015, 20:26:34 »
Just to note that this is known and I'll fix tomorrow.

myths

« Reply #4 on: 16, December 2015, 09:10:51 »
Good Morning Smacky,
I know you said that you will fix this in the morning and it is a known problem.
The reason I am posting this and including a picture is because I am on main and the double doors at the church in SH are now both opening by themselves when I pass near them and do not pass through them. In fact, when I went to use the door on the right it remained closed but the door on the left opened - I was still able to pass through the closed right door.
Now, after I left the entrance both doors have opened and remain open, I am attaching a screen shot.
Last note: I have never had this happen before which the reason for the post.
Myths  :-*
My retirement approaches...like the Grim Reaper

smacky

« Reply #5 on: 16, December 2015, 15:58:14 »
Yup, same thing. Those doors are actually closed (which is why the squares are black). But the faces are orientated wrong so closed looks open, open looks closed.

The issue is doors use direction in a non-standard way.

Because of the iso view doors, when closed, are always on the lower left or lower right edge of a square. Which should mean direction 5 or 3.

It's standard practice to default to direction 5 in the arch so this is what I did. However...

Doors can be hinged on the left or right, which is how we get double doors. So we use 1 and 7 too to complement 5 and 3. Or we would do it this way if logic was involved.

In fact the two versions on the  lower left edge are 1 and 7 and the teo on the lower right are 3 and 5. The default is 1.

So the faces are:

251-0

Directions 2, 4, 6, and 8 aren't really used. Inn the .anim these just duplicate the 'real' 1, 3, 5, and 7 values:

253-1

Note also that doors are either fully closed (frame 1) or fully open (frame 2). Using frames in this way means doors can't be animated.

For 0.10.7 I propose we keep closed doors as the illogical directions 1 and 7, 3 and 5 (means maps do not need updating)  but instead of toggling the frame to show closed/open we change direction. So 1, 3, 5, 7 are closed, 2, 4, 6, 8 are open. This allows animated doors (closed/open is still a binary system but while in either state the door can be animated--ie, a flickering fire door, glinting ice door, rippling water door, throbbing flesh door, etc.

More to come on practicalities of how to do it but that's the basic idea.

smacky

« Reply #6 on: 17, December 2015, 16:14:23 »
A wider issue is what backwards compatibility actually means and how the DaiVersion works.

DaiVersion is x.y.z. Clients with different z to the server should be able to connect so long as x.y is  the same. Eg, 0.10.6 client can connect to 0.10.7 server, and vice versa. There may be minor issues but basically you can play.

That's really the only backwards compatibility we care about. Ideally 6 and 7 (and all 0.10.z) work fine with the same maps and arches. But that ideal mustn't block development.

I wrote the reboot scripts with this possibility in mind. They need a  tweak but basically I'll make a complete copy of an older revision of trunk/arch to main/arch.

If anyone adds new arches, changes faces, etc, commit to both trunk and main.

smacky

« Reply #7 on: 18, December 2015, 16:41:28 »
Done. Sorry chellyk, I think I scared you off!

_people_

« Reply #8 on: 22, May 2016, 06:54:35 »
I've just changed the code to work as Smacky describes 3 posts up. Direction is now used to specify whether or not doors are open.

This does require arch, anim, and image changes. It will also require a few map changes in places where double-doors are used, because previously double-doors were pretty much given an arbitrary direction. I'll make sure it's all changed for 0.10.7.
-- _people_ :)

Joe

« Reply #9 on: 13, August 2019, 04:40:30 »
Yup, same thing. Those doors are actually closed (which is why the squares are black). But the faces are orientated wrong so closed looks open, open looks closed.

The issue is doors use direction in a non-standard way.

Because of the iso view doors, when closed, are always on the lower left or lower right edge of a square. Which should mean direction 5 or 3.

It's standard practice to default to direction 5 in the arch so this is what I did. However...

Doors can be hinged on the left or right, which is how we get double doors. So we use 1 and 7 too to complement 5 and 3. Or we would do it this way if logic was involved.

In fact the two versions on the  lower left edge are 1 and 7 and the teo on the lower right are 3 and 5. The default is 1.

So the faces are:

(Attachment Link)

Directions 2, 4, 6, and 8 aren't really used. Inn the .anim these just duplicate the 'real' 1, 3, 5, and 7 values:

(Attachment Link)

Note also that doors are either fully closed (frame 1) or fully open (frame 2). Using frames in this way means doors can't be animated.

For 0.10.7 I propose we keep closed doors as the illogical directions 1 and 7, 3 and 5 (means maps do not need updating)  but instead of toggling the frame to show closed/open we change direction. So 1, 3, 5, 7 are closed, 2, 4, 6, 8 are open. This allows animated doors (closed/open is still a binary system but while in either state the door can be animated--ie, a flickering fire door, glinting ice door, rippling water door, throbbing flesh door, etc.

More to come on practicalities of how to do it but that's the basic idea.

So I noticed when I reworked the door images I may have named them wrong.  I've updated exactly to how you have shown in the images, but now the doors are even worse.  Not sure what @_people_ did to fix this. 
Whoever said "Out of sight, out of mind" never had a spider disappear in their bedroom.

Joe

« Reply #10 on: 13, August 2019, 19:23:54 »
Ah I think I've got it.  I'll switch .112 to .111 and vice versa.  Just needed a good nights sleep and a super sized cup of coffee.  :P
Whoever said "Out of sight, out of mind" never had a spider disappear in their bedroom.

smacky

« Reply #11 on: 13, August 2019, 21:30:45 »
That always helps. But also, 2 points: remember I wrote 'I propose ...', and remember I wrote that nearly 4 years ago ... ;)

I do have the code for that proposal around here somewhere but for now just make whatever arch/map changes you need to get main working right.

Joe

« Reply #12 on: 14, August 2019, 01:36:25 »
Fixed and working properly.
Whoever said "Out of sight, out of mind" never had a spider disappear in their bedroom.

_people_

« Reply #13 on: 14, August 2019, 03:37:50 »
I've just changed the code to work as Smacky describes 3 posts up. Direction is now used to specify whether or not doors are open.

This does require arch, anim, and image changes. It will also require a few map changes in places where double-doors are used, because previously double-doors were pretty much given an arbitrary direction. I'll make sure it's all changed for 0.10.7.

AFAIK everything was "working" as described with the exception of a handful of doors which needed to be adjusted on the map. I think the diagonal directions (as displayed in the bottom-left of the editor) represent shut and the horizontal/vertical directions represent open.
-- _people_ :)

Joe

« Reply #14 on: 14, August 2019, 04:12:34 »
Yes it was working until I mucked it up.  ;)  Fixed now along with the maps.
Whoever said "Out of sight, out of mind" never had a spider disappear in their bedroom.

Tags:
 

Related Topics

  Subject / Started by Replies Last post
Locked doors

Started by Pippen Maps

2 Replies
2127 Views
Last post 21, February 2005, 21:17:31
by Pippen
doors

Started by zaurbock Maps

8 Replies
2824 Views
Last post 16, July 2008, 20:02:02
by zaurbock
0 Replies
376 Views
Last post 12, December 2015, 23:41:24
by smacky
6 Replies
2439 Views
Last post 08, July 2016, 12:15:53
by smacky
0 Replies
47 Views
Last post 01, February 2022, 23:27:30
by Dolfo