Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Explosions past Force Arrows
New Topic New Poll Post Reply
Poster Message
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged

File: explosion.png (29.6 KB)
Downloaded 288 times.
License: Public Domain
icon Explosions past Force Arrows (+3)  
In certain cases, a bomb is able to penetrate a Force Arrow barrier, leading to unintuitive behavior. The requirements for this are as follows:
* The Force Arrow is on the same row or column as the bomb, but not directly on the bomb.
* The Force Arrow points in a direction perpendicular to its position from the bomb.

When these are met, the bomb is allowed to hit the square the Force Arrow is on, and expand from it, which is expected. But it can also still expand diagonally *against* the direction of the Force Arrow, which can lead to an example explosion as seen in the following image:


===

Now, unfortunately, I have no idea whether changing this would break anything, or how intentional this is, or what. It's fairly easy to fix, but unlike "Force Arrows under Bombs", it's not something new to 3.x. So whether it can or should be safely changed isn't clear. (We really need that delightful mutant spider someday.)

But I did feel it unintuitive enough to mention it here, so that even if it doesn't change, its effect is at least documented.

[Last edited by TFMurphy at 06-11-2008 01:08 AM]
06-11-2008 at 01:07 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Rank Points: 1842
Registered: 07-31-2005
IP: Logged
icon Re: Explosions past Force Arrows (0)  
Ew, that's very counterintuitive.

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
06-11-2008 at 04:41 AM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5058
Registered: 02-04-2003
IP: Logged
icon Re: Explosions past Force Arrows (0)  
Jatopian wrote:
Ew, that's very counterintuitive.
Ugh. Yes, this needs to be fixed, doesn't it. Normally, I'd say leave quirky logic as-is, but this is a bug that was only half-fixed in 3.1/3.2, so it definitely needs to be fixed for real. If any rooms end up broken as a result, I'd vote for tweaking them to compensate instead of living with this bug forever. TFMurphy, would you be willing to post a fix for this here?

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 06-14-2008 08:35 PM]
06-14-2008 at 08:34 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged
icon Re: Explosions past Force Arrows (+3)  
Well, as far as I can see, the fix would be the following in CDbRoom::ExpandExplosion:

wTileNo = GetFSquare(wX,wY);
for (UINT o = 0; o < ORIENTATION_COUNT; ++o)
{
	if (o == NO_ORIENTATION) continue;
	const int oX = nGetOX(o);
	const int oY = nGetOY(o);
	if ((oBlastX == 0 || (oBlastX * oX) > 0) &&
		 (oBlastY == 0 || (oBlastY * oY) > 0))
	{
		//Valid direction.  Check if arrow blocks it
		if (bIsArrow(wTileNo) && bIsArrowObstacle(wTileNo, o)) continue;
		//Otherwise, add to list.
		cs.Push(wX + oX, wY + oY);
	}
}


We should probably do something about the old fix (which was the addition of a Range 1 check after the BOMB_RADIUS check), but it can't just be outright removed - it's what's currently making sure Fegundo explosions obey the force arrows. Of course, if we let Fegundos have their own check in CPhoenix::Explode:

CDbRoom& room = *(this->pCurrentGame->pRoom);
UINT wTileNo = room.GetFSquare(this->wX,this->wY);
for (int y = -1; y <= 1; ++y)
	for (int x = -1; x <= 1; ++x)
	{
		//Make sure we obey Force Arrows
		if (bIsArrow(wTileNo) && bIsArrowObstacle(wTileNo,nGetO(x,y))) continue;
		this->pCurrentGame->pRoom->ExpandExplosion(CueEvents, coords, this->wX, this->wY,
				this->wX + x, this->wY + y, bombs, explosion);
	}


But that might be complicating the issue... unsure.

I've tested both changes quickly, and I'm not seeing any problems... though some things have a rather nasty way of hiding in rather complex interactions. The logic seems sound though.
06-14-2008 at 09:20 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 5058
Registered: 02-04-2003
IP: Logged
icon Re: Explosions past Force Arrows (0)  
TFMurphy wrote:
Well, as far as I can see, the fix would be the following in CDbRoom::ExpandExplosion:
Thanks. Added.
We should probably do something about the old fix (which was the addition of a Range 1 check after the BOMB_RADIUS check), but it can't just be outright removed - it's what's currently making sure Fegundo explosions obey the force arrows.
Hmm...yeah, since this check isn't needed for bomb explosions in general any more, I'd rather remove fegundo explosion logic to its own place. This looks good.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
06-14-2008 at 10:01 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Vike91
Level: Master Delver
Avatar
Rank Points: 231
Registered: 05-19-2007
IP: Logged
icon Re: Explosions past Force Arrows (0)  
mrimer wrote:
TFMurphy wrote:
Well, as far as I can see, the fix would be the following in CDbRoom::ExpandExplosion:
Thanks. Added.
We should probably do something about the old fix (which was the addition of a Range 1 check after the BOMB_RADIUS check), but it can't just be outright removed - it's what's currently making sure Fegundo explosions obey the force arrows.
Hmm...yeah, since this check isn't needed for bomb explosions in general any more, I'd rather remove fegundo explosion logic to its own place. This looks good.

Wow... That was quick... :-O

____________________________
The best way to predict the future is to create it.
06-14-2008 at 10:30 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Explosions past Force Arrows
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.