Announcement: Be excellent to each other.


Caravel Forum : DROD Boards : Bugs : Tarstuff glitch (Build 74)
New Topic New Poll Post Reply
Poster Message
Mazer
Level: Master Delver
Rank Points: 162
Registered: 04-08-2007
IP: Logged

File: tarstuff glitch.JPG (3.5 KB)
Downloaded 567 times.
License: Public Domain
icon Tarstuff glitch (+1)  
Just a cosmetic issue - look at the attached picture:


[Last edited by Mazer at 04-09-2008 02:59 PM]
04-09-2008 at 02:59 PM
View Profile Send Private Message to User Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 4365
Registered: 02-04-2003
IP: Logged
icon Re: Tarstuff glitch (0)  
quote:
Mazer wrote:
Just a cosmetic issue - look at the attached picture:

I think we just don't have a graphic to account for the situation where only the two north corners are dimpled since it's such a rare occurence. I agree it's a cosmetic issue, but I don't think Caravel plans on adding a set of new tarstuff tiles to handle all the pathological situations.

So, even though it's sub-optimal, I'm going to label this report as "not a bug" because it's the intended behavior.

____________________________
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 04-09-2008 04:42 PM]
04-09-2008 at 04:41 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
Mazer
Level: Master Delver
Rank Points: 162
Registered: 04-08-2007
IP: Logged
icon Re: Tarstuff glitch (0)  
quote:
So, even though it's sub-optimal, I'm going to label this report as "not a bug" because it's the intended behavior.
This intended behavior has a problem - in the picture, it looks like that the gel mother is attached to gel, when it isn't.
04-11-2008 at 10:20 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
Briareos
Level: Smitemaster
Avatar
Rank Points: 3515
Registered: 08-07-2005
IP: Logged
icon Re: Tarstuff glitch (0)  
quote:
Mazer wrote:
This intended behavior has a problem - in the picture, it looks like that the gel mother is attached to gel, when it isn't.

Yeah, if the 3x2 gel blob doesn't expand on the next spawn it probably should be drawn as if the mother wasn't there at all...


____________________________
"I'm not anti-anything, I'm anti-everything, it fits better." - Sole
R.I.P. Robert Feldhoff (1962-2009) :(
04-11-2008 at 11:45 AM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3023
Registered: 06-11-2007
IP: Logged
icon Re: Tarstuff glitch (+1)  
Before anything else is said, I'll also note the following things regarding Gel.

1) In Mazer's picture, the center counts as an inside corner, and is thus cuttable. Note that if you move the Gel Mother one square to the left or right, the resulting configuration is not cuttable.

2) The following Gel configuration is considered connected for growth, even though it doesn't look connected:

..GG          G = Gel
GGGG          M = Gel Mother (but not on Gel)
GGM.


Since the Gel Mother isn't on Gel herself, the two blobs aren't connected... but on Turn 30, the whole configuration will grow, not just the immediate squares around the mother.

===

The first consideration tells us that the Gel is considered "connected" in one way, and not in another (this is because in order to be considered connected in the Gel growing way, each piece must be connected on two adjacent sides). The second tells us that Gel Mothers not on gel still count as something that can connect gel.

Not sure how Mike wants to deal with those (if at all), but thought it best that these two edge cases were explicitly stated for this thread.
04-11-2008 at 12:40 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Jatopian
Level: Smitemaster
Avatar
Rank Points: 1841
Registered: 07-31-2005
IP: Logged
icon Re: Tarstuff glitch (0)  
Methinks the green check mark is a bit premature until TFMurphy's point is addressed.

____________________________
DROD has some really great music.
Make your pressure plates 3.0 style!
DROD architecture idea generator
04-15-2008 at 11:14 PM
View Profile Send Private Message to User Show all user's posts This architect's holds Quote Reply
Watcher
Level: Smitemaster
Avatar
Rank Points: 902
Registered: 02-04-2003
IP: Logged
icon Re: Tarstuff glitch (+3)  
Okay, here's a suggestion for how to resolve this:

A gel mother that is not on gel is not considered to be connected to anything. When gel grows, such an isolated mother creates gel on the square it's on, and on each of the eight surrounding squares.

A gel mother that is on gel is considered to be connected to each of the four orthogonally adjacent squares (if any of those squares contain gel). It is not directly connected to the four diagonally adjacent squares. For example, consider this configuration:

GG..
GG..
.M..
..GG
..GG


Here, the mother is connected to the upper gel blob, but not to the lower one. To make the connection clear, the square just above the mother should be drawn as an east edge, instead of as a southeast corner.

The motivation for these rules is that they're easy to display. A mother that is not on gel looks isolated, and cannot be depicted as being connected to adjacent squares of gel. On the other hand, a mother on gel often looks like it should be connected to the orthogonally adjacent squares -- for example, in the picture Mazer provided. Note that it'll look sort-of connected even if the tile below the mother is redrawn as a north edge.

In the case where a mother is orthogonally adjacent to a corner square (under the current graphics rules) it doesn't really look connected, although the gel pieces do touch at a point. You could decide that it's not connected in this case. However, I think this is a needless complication, especially since it's easy to redraw the corner as an edge square, thus making the connection clear.

Finally, there's the diagonally adjacent squares. In most cases, the mother will be connected to these through an orthogonally adjacent square. The only exception is this situation:

M.
.G


Here, the gel square must be either a northwest corner, which doesn't look connected, or a mother on gel, in which case it doesn't matter whether the squares are connected. Hence, the rule should be that the mother isn't connected to this square. Note that even if the northwest corner is redrawn as an interior gel tile, it doesn't really look connected to the mother, since the squares only touch at a single point.

One thing regarding cuttability needs to be mentioned. Under this suggestion, you can have a situation like this:

MGG
.GG


Here, the gel square next to the mother is depicted as a north edge, but it looks like an inner corner to the southwest. It's not immediately clear whether this square should be cuttable. My suggestion is that it should not be -- for simplicity, squares drawn as edges or corners are not cuttable, but all others are.

____________________________
Today the refrigerator, tomorrow the world!
05-01-2008 at 12:25 AM
View Profile Send Private Message to User Show all user's posts Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 4365
Registered: 02-04-2003
IP: Logged

File: gel_notConnected.JPG (4.5 KB)
Downloaded 328 times.
License: Public Domain
icon Re: Tarstuff glitch (0)  
Thanks, everyone, for the observations and suggestions.

I don't want to change gel connectivity rules, but there are two issues here needing fixing:

1) Gel appears to be connected to an adjacent unstable gel tile where a gel mother is. This is a bug, and I've fixed it so stable gel components do not appear to be connected to adjacent yet unconnected gel tiles:



2) Gel was cuttable when it has gel on four sides, even if these gel tiles are not connected. This is also a bug and I've fixed it so that gel tiles are cuttable only if the gel on all four sides of the stabbed piece is connected.

These fixes will be in build 75.

____________________________
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 05-01-2008 05:42 PM]
05-01-2008 at 05:40 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
Tim
Level: Smitemaster
Avatar
Rank Points: 1976
Registered: 08-07-2004
IP: Logged
icon Re: Tarstuff glitch (+1)  
quote:
mrimer wrote:
1) Gel appears to be connected to an adjacent unstable gel tile where a gel mother is. This is a bug, and I've fixed it so stable gel components do not appear to be connected to adjacent yet unconnected gel tiles:



Can I ask a small question? Has this behaviour changed for tar as well? i.e. if this was tar, it was previously not possible to cut the square directly south of the mother. Will this fix change this behaviour?

____________________________
The best way to lose customers is to let little kids running loose on a forum with too many mod points.

[Last edited by Tim at 05-01-2008 06:16 PM]
05-01-2008 at 06:15 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: 4365
Registered: 02-04-2003
IP: Logged
icon Re: Tarstuff glitch (0)  
quote:
Tim wrote:
quote:
mrimer wrote:
1) Gel appears to be connected to an adjacent unstable gel tile where a gel mother is. This is a bug, and I've fixed it so stable gel components do not appear to be connected to adjacent yet unconnected gel tiles:



Can I ask a small question? Has this behaviour changed for tar as well? i.e. if this was tar, it was previously not possible to cut the square directly south of the mother. Will this fix change this behaviour?
Oh, no, I made this change to gel only. I didn't realize the other tar types had these same issues. I've fixed all tar types now.

____________________________
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.
05-01-2008 at 06:29 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
Jutt
Level: Smitemaster
Avatar
Rank Points: 861
Registered: 06-29-2007
IP: Logged
icon Re: Tarstuff glitch (0)  
quote:
mrimer wrote:
2) Gel was cuttable when it has gel on four sides, even if these gel tiles are not connected. This is also a bug and I've fixed it so that gel tiles are cuttable only if the gel on all four sides of the stabbed piece is connected.

Reading this, I realized that a square of gel on the inside of a blob actually would be cuttable according to these rules. Normally such square would not be reachable with a sword, but sworded NPC's can acually stand on gel and cut aforementioned squares. It actually works on build 54 and is clearly unintended, so it might be worth checking if it still occurs with the new logic.

I admit though, it's not a bug likely ever to happen in practice.

____________________________
Holds: An Architects Audition, Artful Architecture, Salamander, Elusive Exhibitions, Leftover Levels, Six Times Six
Collaborative: Way Forward, Advanced Concepts 2
Styles/Mods: Basalt, Sandstone, Garden, Clock using game elements
05-01-2008 at 10:31 PM
View Profile Send Private Message to User Send Email to User Visit Homepage Show all user's posts High Scores This architect's holds Quote Reply
TFMurphy
Level: Smitemaster
Rank Points: 3023
Registered: 06-11-2007
IP: Logged
icon Re: Tarstuff glitch (+1)  
If we're making sure that Gel Mothers in positions where they should be unconnected actually look *and* act as if unconnected, then I still think we should prevent Gel Mothers that are *not* on Gel from allowing connected growth for that turn. To me, it feels very unintuitive, especially given how it looks in-game.

Changing this would only affect rooms that have deliberately placed Gel Mothers without Gel on them, and only before the first spawn, and only in the types of configurations I mentioned earlier.

===

The reason why this happens is that when Gel grows, all Gel Mothers that do not have Gel under them have some Gel added... but this is done before the connected Gel is checked.

I believe the following code would make it such that Gel Mothers require Gel under them before spawn in order to properly connect Gel:

Within GrowTar subroutine in DbRooms.cpp
Original code deleted - see Edit

The change seems to work okay in my test system (although admittedly, it's Build 56, since that's the last source code release I have).

EDIT: Ouch, false alarm. Sorry, give me a few more minutes - I realised one situation where the above wouldn't work. We can't add gel under the mother until *all* Gel Mothers have been checked. I'll have some new code up in a few minutes.

EDIT 2: Okay, reorganised the code so that the new gel is added afterwards - since Tar/Mud Mother's creation of tarstuff under them was in the right place, I merged it into that as well.

while (pMonster)
{
	if (pMonster->bAlive)
	{
		bMotherIsAlive = true;

		//Ensure gel is under each aware gel mother now.
		if (bGel && GetTSquare(pMonster->wX, pMonster->wY) != wTarType)
		{
			Plot(pMonster->wX, pMonster->wY, wTarType);
			++this->wTarLeft;
			ASSERT(GetTSquare(pMonster->wX, pMonster->wY) == wTarType);
		}

		//If a gel Mother doesn't have gel under them, then ignore this mother for now
		//Only grow gel contiguously from existing mothers.  Skip redundancies.
		if (bGel && GetTSquare(pMonster->wX, pMonster->wY) == wTarType && !contiguousGel.has(pMonster->wX, pMonster->wY))
		{
			CCoordSet tiles;
			GetTarConnectedComponent(pMonster->wX, pMonster->wY, tiles);
			contiguousGel += tiles;
		}
	}
	pMonster = DYN_CAST(CMonster*, CAttachableObject*,
				CueEvents.GetNextPrivateData());
}
if (!bMotherIsAlive) return;

//Ensure tarstuff is under each tar/mud/gel mother now, aware of the player or not.
if (!bGel)
{
for (pMonster = this->pFirstMonster; pMonster; pMonster = pMonster->pNext)
{
	if (pMonster->wType == wMotherType && GetTSquare(pMonster->wX, pMonster->wY) != wTarType)
	{
		Plot(pMonster->wX, pMonster->wY, wTarType);
		++this->wTarLeft;
		ASSERT(GetTSquare(pMonster->wX, pMonster->wY) == wTarType);
			
		//Make sure gel under gel mothers is ready to grow
		if (bGel && !contiguousGel.has(pMonster->wX, pMonster->wY))
			contiguousGel.insert(pMonster->wX, pMonster->wY);
	}
}
}


[Last edited by TFMurphy at 05-02-2008 12:35 AM]
05-02-2008 at 12:12 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: 4365
Registered: 02-04-2003
IP: Logged
icon Re: Tarstuff glitch (0)  
quote:
TFMurphy wrote:
I still think we should prevent Gel Mothers that are *not* on Gel from allowing connected growth for that turn. To me, it feels very unintuitive, especially given how it looks in-game.

Changing this would only affect rooms that have deliberately placed Gel Mothers without Gel on them, and only before the first spawn, and only in the types of configurations I mentioned earlier.
Yeah, I was eyeing this code when I made the above fixes. I agree this should be done too. Thanks for the code. Fixed for build 76.

____________________________
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 05-02-2008 02:09 PM]
05-02-2008 at 12:22 AM
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: 3023
Registered: 06-11-2007
IP: Logged

File: GelExample.JPG (4.9 KB)
Downloaded 251 times.
License: Public Domain
icon Re: Tarstuff glitch (0)  
Sorry about that - Build 76 got the old code in which had the mistake I made: the configuration in the picture attached, where the left gel mother is placed before the right gel mother, will cause the left blob to grow on first spawn, even though it starts unconnected before the spawn.


This is due to the current order that gel is placed. The new code I added in my previous post avoids this issue.

Apologies for the trouble.

[Last edited by TFMurphy at 05-02-2008 12:45 AM]
05-02-2008 at 12:43 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: 4365
Registered: 02-04-2003
IP: Logged
icon Re: Tarstuff glitch (0)  
Not a problem. Thanks for repairing it. Please check build 77 for correct behavior.

____________________________
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.
05-02-2008 at 02:09 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
calamarain
Level: Smitemaster
Avatar
Rank Points: 933
Registered: 03-25-2007
IP: Logged
icon Re: Tarstuff glitch (0)  
quote:
mrimer wrote:
Not a problem. Thanks for repairing it. Please check build 77 for correct behavior.
So Build 77 is the release candidate currently?

____________________________
My Holds
Click here to view the secret text

05-02-2008 at 02:28 PM
View Profile Send Private Message to User Send Email to User Show all user's posts This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 4365
Registered: 02-04-2003
IP: Logged
icon Re: Tarstuff glitch (0)  
quote:
calamarain wrote:
quote:
mrimer wrote:
Not a problem. Thanks for repairing it. Please check build 77 for correct behavior.
So Build 77 is the release candidate currently?
That's correct. I've just uploaded it.

____________________________
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.
05-02-2008 at 02:28 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: 3023
Registered: 06-11-2007
IP: Logged
icon Re: Tarstuff glitch (0)  
Was staring at the code and found a few more problems with regards to invisibility: I had Gel Mothers ready to grow even if they can't detect the player, just so long as *one* Gel Mother can detect you. Also, even without that, Gel is now being placed under unaware Gel Mothers - while this makes sense for Tar and Mud, it doesn't for Gel, and I now think that's why the two routines were seperated in the first place.

The way to fix this, I think, is to remove Gel again from the Gel-under-Mother creation routine:
//Ensure tarstuff is under each tar/mud mother now, aware of the player or not.
for (pMonster = this->pFirstMonster; pMonster; pMonster = pMonster->pNext)
{

...

	if (bGel && !contiguousGel.has(pMonster->wX, pMonster->wY))
		contiguousGel.insert(pMonster->wX, pMonster->wY);
}


...and modify the previous part of the routine like so:
CCoordSet newGel;

...

while (pMonster)
{
	if (pMonster->bAlive)
	{
		bMotherIsAlive = true;

		//Only grow gel contiguously from existing mothers.  Skip redundancies.
		if (bGel)
		{
			//If a gel Mother doesn't have gel under them, then flag the square to be revisited later
			if (GetTSquare(pMonster->wX, pMonster->wY) != wTarType)
				newGel.insert(pMonster->wX, pMonster->wY);
			else if (!contiguousGel.has(pMonster->wX, pMonster->wY)) {
				CCoordSet tiles;
				GetTarConnectedComponent(pMonster->wX, pMonster->wY, tiles);
				contiguousGel += tiles;
			}
		}
	}
	pMonster = DYN_CAST(CMonster*, CAttachableObject*,
				CueEvents.GetNextPrivateData());
}
if (!bMotherIsAlive) return;

//Revisit aware Gel Mothers that are not on Gel to add them to growth and place Gel under them
if (bGel)
{
	for (CCoordSet::const_iterator tile=newGel.begin(); tile!=newGel.end(); ++tile)
	{
		Plot(tile->wX, tile->wY, wTarType);
		++this->wTarLeft;
		ASSERT(GetTSquare(tile->wX, tile->wY) == wTarType);
		contiguousGel.insert(tile->wX, tile->wY);
	}
}


===

Third time's the charm, right? ^_^; I'm hoping this is the last issue with this - it's proving quite resilient.

[Last edited by mrimer at 05-03-2008 03:40 PM]
05-02-2008 at 06:33 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: 4365
Registered: 02-04-2003
IP: Logged
icon Re: Tarstuff glitch (0)  
Okay, so if I understood your changes correctly, the current code should look like this, right?
Click here to view the secret text
This is in build 78.

____________________________
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 05-03-2008 03:41 PM]
05-03-2008 at 03:38 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
New Topic New Poll Post Reply
Caravel Forum : DROD Boards : Bugs : Tarstuff glitch (Build 74)
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.