Knuckle Cracker

Creeper World 3 => Custom Map Discussion => Colonial Space Map Discussion => Topic started by: AutoPost on April 29, 2014, 08:59:08 PM

Title: Custom Map #514: CrazyTerrain. By: Atrex
Post by: AutoPost on April 29, 2014, 08:59:08 PM
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.
Title: Re: Custom Map #514: CrazyTerrain. By: Atrex
Post by: Atrex on April 29, 2014, 09:05:16 PM
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

Title: Re: Custom Map #514: CrazyTerrain. By: Atrex
Post by: Vanguard on April 30, 2014, 06:00:15 AM
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
Title: Re: Custom Map #514: CrazyTerrain. By: Atrex
Post by: warren on May 03, 2014, 07:01:15 AM
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