This topic is for discussion of map #514: CrazyTerrain
(http://knucklecracker.com/creeperworld3/queryMaps.php?query=thumbnailid&id=514)
Author: Atrex
Size: 162x162
Desc:
This map is not as difficult as it seems. For the people that don't want to figure it out on their own, there is a message artifact that explains what is strange about this map.
Making the creeper flow uphill was accomplished by giving every cell a terrain override level of 11-the terrain level. Terps don't affect creeper flow because constantly updating every cell's override level makes the game run very slowly.
# CrazyTerrain.crpl
# Created on: 4/28/2014 9:16:09 PM
# ------------------------------------------
#Make the effective terrain level opposite the actual
#There is probably no practical use for this
#Running continuously allows for terp modification, but really slows down the game
$Stretch:1
Once
MapWidth 0 do
MapHeight 0 do
I J 11 I J GetTerrain sub <-Stretch mul SetTerrainOverride
loop
loop
endonce
Fantastic use of the override. NEver though about doing that. :o
Will copy your trick into my book. ::)
Going to play that map now. ;D
Edit: PLayed. Liked. A Lot! Fantastic use of scripting, because simple yet effective in how it changes the way the game is played. Well done. :D
Quote from: Atrex on April 29, 2014, 09:05:16 PM
Terps don't affect creeper flow because constantly updating every cell's override level makes the game run very slowly.
Have you considered slowing the terp watching to prevent lag?
once
0 ->column
endonce
MapHeight 0 do
<-column I 11 <-column I GetTerrain sub <-Stretch mul SetTerrainOverride
loop
<-column 1 add MapWidth mod ->column
Edit:
also, if getting is faster than setting, adding an if may speed things up.
11 J I GetTerrain sub <-Stretch mul dup ->temp
J I GetTerrainOverride neq if
J I <-temp SetTerrainOverride