Chaosforge Forum

DoomRL => Bug Reports => Topic started by: thrstein on May 25, 2011, 10:25

Title: [0.9.9.3 win] Spawned in a trap
Post by: thrstein on May 25, 2011, 10:25

Fire -- Choose target...                                                       
 You see : stone wall                                                           
                                                #======#                       
                                                #======#                       
                                                #======#                       
                                                #======#                       
                                                #======#                       
                                                #======#                       
                                                #======#                       
                                               ##======#                       
                                               #===@==##                       
                                               #======#                         
                                               #======#                         
                                               #======#                         
                                               #======#                         
                                               #======#                         
                                               #======#                         
                                               #======#                         
                                               #======#                         
                                               #====\=#                         
                                               #======#                         
                                               #======#                         
 Thor                       Armor : modified red armor [6/6] (80%) (P)         
 Health: 100% Exp:  6/94%   Weapon: modified assault shotgun (7d3) [5/8] (B1)   
 cautious                                                    Phobos Base  Lev10


I'm on Windows 7 64-bit, not sure if that changes anything. Tried shooting at random places on the wall until I ran out of rockets...

On an unrelated note, BBcode screenshots are neat :)
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: ParaSait on May 25, 2011, 10:58
Aha. That is probably a cave level with a very unfortunately positioned filled area. Am I rite?
(or well... unfortunately positioned river at least)
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: thrstein on May 25, 2011, 14:21
I wondered who made that bridge, and what they were on :P
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: raekuul on May 26, 2011, 06:38
They were on phase devices, duh!
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: Melon on May 27, 2011, 04:25
They were on phase devices, duh!

Too bad phase devices are only legal in Holland, Portugal and Czech Republic...
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: Silhar on May 27, 2011, 11:38
Too bad phase devices are only legal in Holland, Portugal and Czech Republic...

Also, Holland.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: Melon on May 30, 2011, 06:52
Also, Holland.
Yeah, and Holland too!
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: tehtmi on June 02, 2011, 19:23
To put this in perspective, I generated 10000 cave maps with vertical rivers.  75/10000 rivers were disconnected.

This is fixable but non-trivial.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: Deathwind on June 03, 2011, 14:15
The simplest answer would be to not spawn vertical rivers in caves.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: thelaptop on June 04, 2011, 08:57
To put this in perspective, I generated 10000 cave maps with vertical rivers.  75/10000 rivers were disconnected.

This is fixable but non-trivial.
Given the probability of this occurring, I'm kinda swinging towards the "uh, it sucks to be you" route of not fixing this.

Though in theory, coding in reachability tests would solve a lot of the very strange placement bugs that occur every now and then.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: Thexare on June 04, 2011, 11:50
Couldn't it be fixed by preventing someone from spawning on water or bridge tiles? They still might phase into the river, but that's the inherent risk of phase devices on cave maps.

If you wanted, you could even negate that with a Cave-specific level feeling, something like "You hear flowing water..." so people know not to phase if they can't see the river.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: AStranger on June 04, 2011, 15:51
Given the probability of this occurring, I'm kinda swinging towards the "uh, it sucks to be you" route of not fixing this.
Maybe I can change your mind. If 75 out of 10,000 were disconnected that means that 9925 were connected giving us a success rate of .9925, which may sound high but over time isn't actually very good. After 10 cave levels you have a 7.3% chance of generating a bad one (1 - .9925^10), after 25 there is a 17.2% chance and after you've seen 100 caves levels there is a 53% chance that you've gotten stuck at least once. I don't know how often cave levels are generated with vertical rivers or more to the point how many games you need to play to see 100 caves with vertical rivers, but I feel that I see them often enough that this is probably worth fixing.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: thelaptop on June 04, 2011, 23:09
I don't know how often cave levels are generated with vertical rivers or more to the point how many games you need to play to see 100 caves with vertical rivers, but I feel that I see them often enough that this is probably worth fixing.
Yeah, but you missed the second part.

There are other strange reachability bugs that we have that are fixed with weird hacks.  I did recommend an accept/reject approach towards level generation, using a reachability test as a measure of acceptance of a generated level.  It can be based on a few parameters, including existence of wall-busting equipment (and how many times it has to be used) and of course the number of indestructible walls etc.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: Deathwind on June 04, 2011, 23:12
That's only how often the level will have the disconnected river, how often you actually spawn in it is again only a small percent of those levels. As rare as it is I still say the easiest answer is just to not spawn rivers in caves.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: ZZ on June 05, 2011, 07:42
The reachability test in my opinion is the best solution of this one and many other layout bugs. It is not hard to write, it will not increase the level generation time significantly (and even if it does, much people think that the longer the level generates, the better level is), and it will definitely close all reachability questions. We can even adjust it for difficulty setting, like count lava/acid as impassable terrain on ITYTD.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: Ander Hammer on June 05, 2011, 08:06
Maybe I can change your mind.

That's how the numerical probability works, yes, but the chance of actually getting a cave level with a disconnected river after 10, 25, 100 caves remains under one percent; your luck doesn't change the more safe caves in a row you find.

Even the 50% chance of having landed one after 100 caves (assuming you've actually landed in the disconnected river without a way out) isn't very serious. I think it's still worth it to discuss the issue and make sure it just can't happen ever, as well as spawning ideas to tighten up some related bits of game.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: Thexare on June 05, 2011, 12:48
Frankly, that's the sort of RNG screwing I consider entirely unacceptable. There's no sort of skill that can get around that short of carrying a phase device and hoping for the best - remember that in several challenges, that's your only option; no rocket launchers in AoB, AoMr, AoSh, or AoPc, and you can't seriously count on Hellwave Packs nor should you have to waste one getting out of this situation.

And, not to repeatedly bring up my own idea, but it doesn't make any sense for staircases to start or end in rivers or on a bridge anyway - preventing that would prevent this and it'd be more logical than the current state anyway.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: Simon-v on June 05, 2011, 13:34
Not to mention all cave walls are indestructible, or at least were such last time i checked (which was probably about a month ago).
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: AStranger on June 05, 2011, 15:39
I'll admit that my analysis is actually just the percentages of seeing a cave level with a vertical river, the probability of getting stuck is actually much lower. I was in a hurry when posting and got ahead of myself.

Yeah, but you missed the second part.
Wait, now you expect me to be able to read? For some reason when you said 'not fix', I heard 'leave it in the game', not 'create reachability tests instead of fixing this one corner case'. I would still consider fixing this, but I'm the type that likes getting rid of bugs (shown by the last six months of my past job being spent solely refactoring/bug fixing) but in reality as long as the end user doesn't experience it, the underlying implementation doesn't matter to me.

That's how the numerical probability works, yes, but the chance of actually getting a cave level with a disconnected river after 10, 25, 100 caves remains under one percent; your luck doesn't change the more safe caves in a row you find.
My apologies, I never meant to imply that the probability changes if you are only ever looking at one level generation. My point was that even though 0.75% may not seem very likely, if you repeat that chance enough eventually the odds become stacked against you. Now I'm curious about the probability of getting stuck given you have a cave level. Probability states that I've most likely already seen a disconnected cave/river level, but without a computer map or a mob/me being generated in there I wouldn't know.

Frankly, that's the sort of RNG screwing I consider entirely unacceptable. There's no sort of skill that can get around that short of carrying a phase device and hoping for the best - remember that in several challenges, that's your only option; no rocket launchers in AoB, AoMr, AoSh, or AoPc, and you can't seriously count on Hellwave Packs nor should you have to waste one getting out of this situation.
This was pretty much what I was thinking. The probability was a more numbers oriented argument because I didn't think I'd be able to articulate this as well as you did.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: thelaptop on June 05, 2011, 19:52
Not to mention all cave walls are indestructible, or at least were such last time i checked (which was probably about a month ago).
Just tested it yesterday.  Only a Phase Device could save me that time.

Wait, now you expect me to be able to read? For some reason when you said 'not fix', I heard 'leave it in the game', not 'create reachability tests instead of fixing this one corner case'. I would still consider fixing this, but I'm the type that likes getting rid of bugs (shown by the last six months of my past job being spent solely refactoring/bug fixing) but in reality as long as the end user doesn't experience it, the underlying implementation doesn't matter to me.
Yeah, you were supposed to read the second line in my two-line/two-paragraph post.  Between fixing the underlying bug, which requires a lot of added dependency checks when generating each item, and just doing accept/reject tests, I'm going to think the latter is more useful.

Level generation doesn't take that long, does it?
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: AStranger on June 05, 2011, 21:15
Yeah, you were supposed to read the second line in my two-line/two-paragraph post.  Between fixing the underlying bug, which requires a lot of added dependency checks when generating each item, and just doing accept/reject tests, I'm going to think the latter is more useful.
Level generation doesn't take that long, does it?
It was a poor attempt at humor on my part. I agree that if you generate items/mobs on a disconnected level checking each time is a waste of energy, I had just assumed the bug happened during the level layout generation before item placement. Without knowing how things are it doesn't feel like much work to track a min/max column number while generating the cave and then placing the river within that range. Either way sanity checking the level after it's generated is still a good idea, but it can't hurt to cut out a failure if possible. It does make future additions smoother. I'm wasn't disagreeing with you, I just misunderstood you at first. Sorry about that.
Title: Re: [0.9.9.3 win] Spawned in a trap
Post by: thelaptop on June 06, 2011, 05:29
I'm wasn't disagreeing with you, I just misunderstood you at first. Sorry about that.
Don't worry about it.  No offense taken.  =D