Wall decay time?

Started by Karsten75, March 18, 2010, 11:48:56 AM

Previous topic - Next topic

UpperKEES

Quote from: SPIFFEN on July 19, 2010, 09:52:28 AM
8 sides ?
An dice has 6 sides , and this games has 5 lvls of terrain ,
how can the creepers attack 8 sides ?

Corner cells containing creeper also count, making it a maximum of 8 to surround a single wall element.

When you look at it that way, a dice (in 3D) can be surrounded from 26 sides.

Quote from: SPIFFEN on July 19, 2010, 09:52:28 AM
And does terrain inflickt with the walls as long the creepers sourround the wall ?

Yes, it does. When a wall is located on elevation level 5, it might seem the creeper is toughing the wall when the surrounding elevation level is 1. The wall won't start decaying however until the creeper level has risen to elevation level 5 (and the creeper is really toughing the wall).
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

Karsten75

Quote from: SPIFFEN on July 19, 2010, 09:52:28 AM
Quote from: UpperKEES on July 17, 2010, 04:08:02 PM
While trying something 'new' I just discovered that a wall with an emitter on top (or underneath) does not decay at all, even when surrounded with creeper at all 8 sides. Is this a bug?

8 sides ?
An dice has 6 sides , and this games has 5 lvls of terrain ,
how can the creepers attack 8 sides ?

And does terrain inflickt with the walls as long the creepers sourround the wall ?

( Unless you ment 6 sides =P )

8 sides = 4 corners and 4 flat edges. The creeper contact with any/either of these count as one contact point for decay.

SPIFFEN

An 3d dice has 14 sides if you count the spike of the corner ,
or 30 if each spike has 3 spots =P
( If i are thinking right )

Anyway , this game is way to advanced for me to be best player ever =P
PLZ THINK ABOUT WHAT YOU CALL YOUR TOPIC ! It will make the search work better =)
My maps : http://knucklecracker.com/creeperworld/viewmaps.php?author=SPIFFEN
How to make links

UpperKEES

Quote from: SPIFFEN on July 19, 2010, 10:28:01 AM
An 3d dice has 14 sides if you count the spike of the corner ,
or 30 if each spike has 3 spots =P
( If i are thinking right )

Nope, because now you forget the 12 cubes just touching one of the edges, but not the sides. Think about it like this: when you need 8 squares to surround a square; how many cubes would you need to surround one cube? The answer is 3 layers of each 9 cubes, minus the center cube that you are surrounding (like Rubic's cube).
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

knucracker

Quote from: UpperKEES on July 19, 2010, 09:43:51 AM
This would mean that different code is executed by the game when a map has been saved with an older version of the map editor. I know this version number is stored with every map, so this could be possible. I'm not sure however why this particular piece of code is implemented differently, because you would expect the creeper flow to be similar for old and new maps.

Sounds strange doesn't it....  :)

There was a bug in the early releases of the game that made walls decay at different rates depends on the side they were touched on.  I fixed this bug in subsequent releases.  However, this was after some maps were already released.  I decided to keep the "bug" in the behavior for maps made with older map editors.  If I had not done this, some old maps would have been broken.  Sometimes, map authors would rely on the decay of walls at a fixed time.  If I fixed the bug, I would alter this behavior and therefore alter their maps.  Most importantly, this was true for the story maps.  The last thing I wanted to do was alter their behavior.

So, I kept the old wall decay code in place for the original maps and maps made with an old map editor.  New maps would get the corrected wall decay behavior.

UpperKEES

#20
Ah, that explains the difference between various versions. Thanks.

But what about the wall elements with an emitter on top (or underneath)? That was the question I actually liked to see answered....

Edit: Virgil confirmed that wall elements stacked with an emitter indeed work as described above.
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

Xirema

Quote from: virgilw on July 19, 2010, 02:17:06 PM
Quote from: UpperKEES on July 19, 2010, 09:43:51 AM
This would mean that different code is executed by the game when a map has been saved with an older version of the map editor. I know this version number is stored with every map, so this could be possible. I'm not sure however why this particular piece of code is implemented differently, because you would expect the creeper flow to be similar for old and new maps.

Sounds strange doesn't it....  :)

There was a bug in the early releases of the game that made walls decay at different rates depends on the side they were touched on.  I fixed this bug in subsequent releases.  However, this was after some maps were already released.  I decided to keep the "bug" in the behavior for maps made with older map editors.  If I had not done this, some old maps would have been broken.  Sometimes, map authors would rely on the decay of walls at a fixed time.  If I fixed the bug, I would alter this behavior and therefore alter their maps.  Most importantly, this was true for the story maps.  The last thing I wanted to do was alter their behavior.

So, I kept the old wall decay code in place for the original maps and maps made with an old map editor.  New maps would get the corrected wall decay behavior.

This implies that the specific wall behavior is programmed into the map file? Or do map files have a code that signifies whether they are new or old?

I only ask because I want a way to dynamically set the decay rate for a wall.  :P

UpperKEES

The version number of the map editor is stored with the map file.

You won't be able to set the decay rate for a wall, because this is hard coded into the game and determined by the number of surrounding cells containing creeper.
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

UpperKEES

Quote from: mthw2vc on July 18, 2010, 11:39:11 AM
a wall on elevation 1 with 4 layers of creeper in it behaves in a similar way to a wall on elevation 5, with a few small differences that you will find yourself if you experiment a little.

I have created a map using these effects, thus introducing two 'new' types of emitters. Check it out here.
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview

UpperKEES

#24
For more info about wall decay times see here.

Quote from: UpperKEES on July 21, 2010, 03:33:25 AM
You won't be able to set the decay rate for a wall, because this is hard coded into the game and determined by the number of surrounding cells containing creeper.

It turns out you can! See here.
My CW1 maps: downloads - overview
My CW2 maps: downloads - overview