Mooses2k / SecretHistories

First-person stealth/combat roguelite
Other
14 stars 11 forks source link

RigidBody doors fixes (Godot 4 required) #17

Open Mooses2k opened 3 years ago

Mooses2k commented 3 years ago

Do at same time as #375

TYPES OF DOORS

wooden door (single- or double-tile, single door or double-doors)- open, open & stuck (spiked), closed, closed & stuck, closed & locked, closed & locked & stuck, closed & barred, partially destroyed (here's Johnny), destroyed (kick has chance to increase break state per strike, if barred, can only be burned down, which should probably take a long time and smoke up the whole dungeon to strongly discourage it)

metal gate (single- or double-tile, single gate) - open, closed, closed & locked, broken & hanging by one hinge, broken & lying on ground (only explosives or some monsters can damage)

solid metal door with eye slot (single- or double-tile, single door or double-doors) - open, closed, closed & locked, closed & barred (indestructible in any state)

HOW THEY WORK

Some doors start stuck. If locked and have key, open. If stuck, do damage to door; enemies will try only break door locked or stuck doors if chasing someone keys to chests and doors (tiny items) can be found in environment and on cultists, and used automatically to lock or unlock a door with a tap of interact key.

Doors, also have an open w broken latch state

Padlock as separate item on gates, can be closed again

Only a few different keys and a skeleton key item

Historical background: "The favored key for casket locks was a pipe key. The bit (the specially shaped end of a key) had to fit the turning mechanism, but the hollow shank also had to fit a pin, for extra security. Hollow shanks and pins could be made square, hexagonal, or any other non-round shape. Doors usually used solid keys, and sometimes the lock permitted access from both sides of the door, so the same key could lock in or out. Doors in Norman castles typically had dead bolts, which had to be turned a full turn since the key was directly sliding the bolt. Lock technology always presumed some kind of human guard. Locks might be smashed, as could the chest itself, but this would make noise. Most locks could be picked with skill and determination; they couldn’t really keep thieves out, but they could slow them down. Extra-secure caskets were reinforced with iron bands and had multiple locks. Even if one could be picked, the next ones might be harder or the guard might come on his rounds and catch a thief. Late medieval lock technology became very complicated and specialized, for those who could afford to pay for custom work. The finest locks had no visible keyhole; the owner of the chest knew where to press a spring that popped a slide back, exposing the hole. The spring, slides, and holes were all concealed with fancy carving or painting, of course. In the best work, there might be several layers of security like this, in addition to a custom-made lock with only one key. Eventually, locks were better than the wooden doors and boxes they guarded."

https://en.m.wikipedia.org/wiki/Warded_lock

DOOR PSYCHOLOGY

when you move through an area, do you keep the doors open or closed? Faster retreat, but more noise spread and someone may creep up behind you. Closed doors can be heard opening - to your detriment or benefit. Doors are typically found closed, so one that's opened may invite investigation. This could be used to lure someone into a trap.

Check out The Last of Us: Part 2 for its doors

Half life Alyx realistic doors and bars

Mythic Underworld style, enemies can open stuck doors automatically unless doors are spiked.

breaking hinges, latch, or door should be separate options

TODO

WHAT'S LEFT:

Mooses2k commented 1 year ago

can now kick door 5 times to cause it to disappear :)