6 ms·
Brilliant. It shows how your code is never encapsulated enough. You think physics should apply to all agents in your game and you think climbing a ladder is tri
by choeger 7y ago
Brilliant. It shows how your code is never encapsulated enough. You think physics should apply to all agents in your game and you think climbing a ladder is trivial and then someone thinks they can easily stop all NPCs from starting new Interactions. Boom.
In that particular case, what would be your favorite fix. I tend to say that the second step of climbing a ladder should probably not count as a new interaction.
- gpm 7y agoI'm not sure I understand why NPCs are prevented from interacting with the environment while you're talking... given that gameplay isn't stopped. Seems like an arbitrary decision that might lead to other surprising behavior too... e.g. talking to someone else to interrupt an NPC performing a scripted action.
- lilyball 7y agoProbably because interacting with the environment could cause environmental changes that might affect you. For example, if you're standing in a doorway talking to someone and an NPC wants to close the door, it could close in between you and the NPC you're talking to.
- driverdan 7y agoWhich would make for some funny game clips. That kind of emergent behavior is great.
- umvi 7y agoI seem to remember a fallout clip where the character is trying to have a conversation with the NPC but then a monster is also attacking the NPC or something and the NPC is just oblivious. Kind of breaks the immersion when you are having a normal conversation and the NPC is taking mortal wounds at the same time. It would be hard to make believable interactions when unexpected environmental side effects can happen at any time
- umvi 7y agoFound it! https://youtu.be/R1AWIEs18Os?t=14 https://youtu.be/R1AWIEs18Os?t=14
- jccooper 7y agoAt first I figured the physical solution, not being able to climb higher than the ladder in any case, would seem to be a reasonable one. And you probably want to do that. But that might somehow end up with characters stuck on a ladder if the dismount event never fires for some reason, so making the ladder a single event and\or exempting the dismount from the "blockable furniture actions" list, should also be done. They should probably also consider adding fall damage as part of the considerations in invulnerable mode.
- mjevans 7y agoInteractions should be atomic. Unexpected outcomes in a state machine should be rejected (and probably errors logged if in dev mode). Edit (additionally): If they can't be made atomic, make the transitions timed, with expiration, never allow deadlocks to occur and always branch to a fail-safe state. Players will tolerate things like the uncontrollable NPC getting pinched off screen and respawning, even with a comical animation if it's that kind of game; they hate a blind referee ruining things for no perceivable reason.
- gpm 7y agoI don't think I agree with this if you mean climbing ladders should be atomic... what if I save/load the game while someone is in the middle of climbing one? What if the level changes somehow unloading them? What if a level designer wants someone to start on a ladder?
- mjevans 7y agoIn the case of Outer Worlds, I don't recall having seen any ladders where it would be unsafe to pick started or finished and snap to those states over the save. In the case of another game where someone's actually making progress up a very large structure, I can't think of any game offhand where saving in such a state has actually been allowed. However allowing a save there by necessity triggers the edited version of my statement which includes a timed state transition and safe aborts for failures in state change. Such a save would also include the current state of progression as well as the remaining limit for the timer.
- NoodleIncident 7y agoI don't know if "encapsulation" is the right word, but the "undamageable" state should definitely have included fall damage. No point in having more than one way to reduce health points, damage is damage.
- vvanders 7y agoI think you're giving a bit too much credit to game logic codebases. They generally move at a pretty fast pace and change often(due to the iterative nature of what's "fun"). I don't think I saw a single unit test until I was well out of the game industry.
- Filligree 7y agoMy go-to exception for this has always been Factorio. They have not only unit tests, but integration tests, regression tests, fuzzers, performance regression tests, .... Their blog regularly goes into details about how it all works. It's very much worth reading.
- hhmc 7y agoSure, but you have to acknowledge that factorio is incredibly amenable to those types of tests -- in a way that most games aren't.
- Filligree 7y agoTrue, but that's not really an excuse for having none at all.
- worldsayshi 7y agoIt seems to me if the physics engine and whatnot is deterministic I don't see why it wouldn't be possible to record input sequences and keep those and their effects as regression tests.
- 7y ago
- lazyjones 7y ago> what would be your favorite fix Not letting companions fall to their death, ever... Bethesda hasn't fixed these bugs in 5 years.
- raldi 7y agoThey weren’t companions at the time of their death, just regular NPCs. What would you do instead?
- lazyjones 7y agoWell, don't let NPCs fall to their death if they are potential companions. These problems arise when a game engine starts as a generic physics simulation and various restrictions/rules mandated by gameplay design are added as an afterthought.
- raldi 7y agoWhat should happen if you knock a potential-companion-but-current-enemy off a cliff in the middle of a battle?
- gmueckl 7y agoThis may sound a bit silly, but depending on the story needs, these can potentially be completely separate entities. That way you wouldn't need to create a weird crossover entity that switches between friendly and enemy AI components etc.
- raldi 7y agoBut then when you kill a potential companion it wouldn’t cancel their quest.
- imtringued 7y agoHow do you start a quest with a dead entity?
- ArchReaper 7y ago> I tend to say that the second step of climbing a ladder should probably not count as a new interaction. That might make sense when you view it through this specific lens, but that design decision allowed them to save character positions on ladders and make 'getting on' and 'getting off' be separate 'things' - just off the top of my head. The '2 interactions' method actually makes the most sense in the context of their game engine - it's the same way getting 'on' or 'off' a chair works. Their fix of just allowing interactions is probably the most correct option. That is essentially toggling a setting, as opposed to re-engineering how ladder mechanics work. Games are complicated.
- Danieru 7y agoGood chance the dual "furniture" is because "sitting in furniture" triggers a separate animation cycle. Then through root-motion animation the NPCs are climbing. Getting on switches NPCs to the climb animation set. Getting off the later swaps NPCs back to regular animation set. Altogether an elegant solution for managing what is otherwise a special case.
- rags2riches 7y agoBit of defensive programming would be a ceiling for the climbing action when it starts.
- im3w1l 7y agoMy philosophy is that an important simple invariant shouldn't be maintained through the emergent behavior of a complex system. If companions should be unkillable, then don't count on eliminating all sources of potential damage. Really make them unkillable. A ladder shouldn't ever take someone higher than the ladder goes so if some guy attempts to climb higher than the ladder goes, then freeze them in place or make them climb in place. Since these shouldn't trigger, crash the game if in dev mode, and if in prod mode check whether player allows telemetrics and if so phone home. Those are the failsafe fixes. Finally fix the root cause here by special casing that getting off a ladder during interaction is allowed.