[CRPL] Understanding how the Creeper flows. Weird Observations.

Started by Vanguard, October 15, 2013, 08:50:15 AM

Previous topic - Next topic

Vanguard

Edit: Regarding the creeper creation with flowrates >1 I already found this topic: http://knucklecracker.com/forums/index.php?topic=14343.0, so consider my question to this answered. So I am only left with question 3 at the end of this text.

Hello everybody.

New to this forum, been a long time lurker. Played CW1 evermore and CW2 Academy flash games until my eyes bled and now I am proud owner of my own copy of CW3. :)

Sooo, I have been tinkering around a lot the last few nights with the Map Editor.

I thought it´d be nifty to have the following conditions on a map:

1) Fly zone inhibitor protecting an emitter.
1.1) Modifying this no fly zone to destroy any turrets.
2) Need to bring a certain amount of Anti Creeper to said emitter for bogus story reasons.
2.1) A Zone outside the flyinhibitor, where you can bomb-dump any AC to make it flow to the emitter.

Some tinkering

Now, sounds like a sounds idea so far. Would make for an alternative gameplay compared to the usual assault and destroy. With a bit of scripting involved it sounds definitively doable, but I ran into the following problem:

After dumping TONS of Anti Creeper ( roughly 20 to 30 K Ore ) on said island to flow down to the emitter, I realized standard creeper flowrate sort of causes a "stalemate" between my pile of anti creeper and the pile of creeper from the emitter.

imagine this distribution of creeper. negative amounts indicate anti Creeper, just like in the game. ( Island in table format ) E is the Emitter, B is the place where I dropped my bombs.





-80-100B -120
VoidVoid-4
VoidVoid4
E 605040

So, in short, the amount of anticreeper, no matter how much I dumped on there, could NOT pressure forwards into the creeper zone. The "flow" came to a halt in a contested zone and both piles just continued to grow bigger.

So, I decided to have a look at CRPL. Nice! "SetCreeperFlowRate" ( or something ) seemed like a charm. After some fails with CRPL I scripted something like


once
SetCreeperFlowRate(0.6)
SetCreeperFlowRateonDigitalis(1)
endonce


and attached it to a CRPLcore entitiy. Worked. Creeper behaved much more "fluidlike". I wanted the whole volume of the Anticreeper much behave like water, almost flattening itself due to gravity and pressure. I even ended setting the Flowrate to 1 for both creeperflowrates. But all my tinkering ended with the same results. A "contested" zone where NO AMOUNT OF ANTICREEPER DUMPED changed anything about it.

Conclusion so far: Creeper/Anticreeper neutralization rates would need to be higher to allow this sort of map and cannot be set by CRPL. The amount of neutralization happening is a direct function of the amount of creeper/AC connection in any given area, but inherently unaffected by how much AC/creeper is in contact. Only the "connected space" seems to count. Neither pressure nor amount of AC/creeper present matters.

So, what happens essentially is that when the "size" of the area connected between AC/creeper is not big enough to neutralize the incoming flow, there will be a contested zone which will just continue to grow, neither creeper nor AC advancing. it seems the "nuetralization rate" is a static value for any given mapspace.

Conclusion in regards to flowrates: increasing the flowrates makes the piles more "flat" as opposed to the mountain-style they tend to assume and they expand much faster. But it does not affect the neutralization rates.

Question: Can anybody confirm this? Has anybody found a way to influence the neutralization rates between creeper and AC?

More tinkering
So this drove me nuts. I didn´t want to throw away my fabulous map idea so readily. So I went where no variable has gone before. :P


once
SetCreeperFlowRate(4)
endonce


Now the real fun begins. You see, all the emitters had delays on them, but I fired a spore with anticreeper onto the map, to watch the flowrate with values greater than 1 and what happened made me go a bit insane. I knew I shouldn´t have set the variable to greater than 1.  :-[

Upon contact of the spore with the ground, the Anticreeper flew past the map, nearly instantly flattening itself over the whole level it landed on. But it looked like there was light-blue anticreeper and dark-blue anti-creeper in a checkboard pattern spread across the level.

Dark-blue anti-creeper? What is this madness. ???

Pausing the game I inspected the grid presented to me and what I saw was this:





-0.168.23-016
8.23-0.168.23
-0.168.23-0.16

Yupp, that´s right folks! The ANTI CREEPER Spore blasted apart SO FAST it created CREEPER. And more fascinating: Neither the creeper NOR the ANTI CREEPER interacted in anyway with each other.  :o

Madness! Blasphemy!
Madness?
THIS... IS... CREEPER!


So, where am I going with this? I don´t know.

This is part rant, part science report, part question.

1) What did I do wrong, if anything? ( obv. setting creeper flow rates > 1 is baaad )
2) Is this behaviour intended? If not, why is the maximum amount of creeper flowrate not limited?
3) How can the neutralization rates be changed to allow for the idea I had for my map to work?

Edit: I am currently not at my PC. So I sadly cannot upload the map, but will make sure to do so later for you fine folks to take a look at it, IF YOU LIKE.

Grauniad

Quote from: Vanguard on October 15, 2013, 08:50:15 AM

1) What did I do wrong, if anything? ( obv. setting creeper flow rates > 1 is baaad )
2) Is this behaviour intended? If not, why is the maximum amount of creeper flowrate not limited?
3) How can the neutralization rates be changed to allow for the idea I had for my map to work?


1. Nothing.

2. Virgil had it limited. You can thank ThePenguin for demanding to explore an alternate universe.

3. It's working just as it should. The rate of flow into a cell is governed by the density of the cells around it. The result of each cell is the arithmetic result of values in the cell. There is thus no "neutralization rate".   In fact, I do not understand your "neutralization rate" at all. Did you want 1 anti-creeper to destroy more than 1 Creeper?  Given the facts, it can't happen.

You can use things like wind or flow rate to govern how fast the creeper propagates, and in what direction, but other than that you are limited to waiting it out.
Based in your diagram, I'd say that if you could keep up the anti-creeper, it would eventually overwhelm the creeper. "Watching paint dry" is a term that comes to mind. :)

Note that if either Creeper or anti-creeper should exceed |500|, it will spill over into the void.
A goodnight to all and to all a good night - Goodnight Moon

Tistel

Hi you can try to use the not yet documented function SetFieldCell to create a field that push the Anti Creaper towards the emitter.

it creats a local field that pushes the creeper (like a shield or a sprayer collecting AC)

SetFieldCell take six parameters
the two first is the cell cordinate
the next two is the force on the Creeper (first vertical then horizontal)
and the two last paramters is the force on the Anti Creaper

example:

once
 MapHeight 0 do
    MapWidth 0 do
     SetFieldCell(I J -100000 0 100000 0)
   loop
 loop
endonce

create a field covering the hole map that push Anit Creaper down/south and Creaper upp/north.

Vanguard

Thanks for all your replies. And sorry for not being crystal clear on what I want to achieve in the first place. I still struggle with my expressional abilities in this language.

@ Grauniad: Negative. 1 to 1 is fine. What I am talking about is that the "reaction speed" when it comes to Creeper/Anti Creeper Reactions.

Left to it´s own devices, both creeper and Anti Creeper behave "sluggish" and not "aggressive". If there are low amounts of creeper, then all is fine. But with the amounts of creeper I want to include in my map(s) ( I love that stuff.  ;D ), they are not killing each other fast enough to actually make one of them being able to "push" itself forward even if it has the superior numbers.

@ Tistel: Aha. That´s probably also how wind in CW3 is set. Thank you for digging that up for me, I will try that now. *rushes of to the Map Editor*

I will later post more, when I have tested all my options.

Thank you again for being so kind as to help me out here. The next beer in a pub where we meet will be on me.  ;)

Grauniad

Lately everyone talks about creeper/AC as if it is a fluid or liquid. The actual algorithms are modeled on heat transfer. SO think of it like that and the flow rates make a lot more sense.

Your map scenario will  work - eventually, just as soon as the AC in the adjacent cells build up to be stronger and can push more into the cell than can flow in from the creeper side. It's just not fast.
A goodnight to all and to all a good night - Goodnight Moon

pawel345

Well the algorithm for diffusion and heat transfer are similar so that's the reason for confusion I guess :P that and the BLUE CREEPER by default.

Vanguard

Oh, I have heard it mentioned somewhere it was based on the diffussion of heat in metal or something and it works for the game, no complaints there.

And this is EXACTLY why I want to find out IF these properties CAN be modified to model different diffusion models. And in what way that can be done.

What I also "sort of envision" is to have a "cube spread" model. It could work this way: Creeper is absolutely static UNTIL a cell is filled to a certain value. Let´s say 25. And UNTIL this cell is filled to this value, the creeper won´t spread. It would sort of model the freezing of humidity and accumulation of ice thereof.

I am running late today, so I will put more work in my map before I ask more questions, which I feel need to be more precise and advanced at this point.

So, good night to everybody in my timezone. :)

thepenguin

Quote from: Grauniad on October 15, 2013, 10:12:18 AM
2. Virgil had it limited. You can thank ThePenguin for demanding to explore an alternate universe.
I have had the chance for quite a bit of gameplay with large constants, and it's quite fun.  The only effective way of combatting the onflux of creeper is with shields.  blasters are ineffectual at best, and at worst actually create creeper.  Bombers are histerical to see, and most weapons beyond that are useless.

EDIT: I think this may be with a negative creeper flow constant instead.
We have become the creeper...