Knuckle Cracker

Creeper World 3 => Custom Map Discussion => Colonial Space Map Discussion => Topic started by: AutoPost on February 25, 2019, 02:16:24 PM

Title: Custom Map #7123: portal test. By: portalguy
Post by: AutoPost on February 25, 2019, 02:16:24 PM
This topic is for discussion of map #7123: portal test
(http://knucklecracker.com/creeperworld3/queryMaps.php?query=thumbnailid&id=7123)

Author: portalguy
Size: 128x84

Desc:
a small test of a portal concept, travel through portals to reach the power zone
Title: Re: Custom Map #7123: portal test. By: portalguy
Post by: Grabz on February 26, 2019, 11:07:38 AM
Hey there! This is a really cool map, but the mechanics could use a fair bit of improvement. I'll give you a few quick tips here, if you wish to create more maps in the future!

In powerzone.crpl, the 30 Delay is not necessary. I'm guessing it was added as lag prevention - the code it guards is very lightweight and does not need the limitation. I played the map a few times and I think I've reached the fastest possible time now, because getting a better score requires me to shave off a full second.
Calling Self 0 Destroy immediately returns out of the script, so instead of doing this:

CurrentCoords 2 1 FALSE TRUE FALSE IsCreeperInRange if
    30 Delay
    CurrentCoords 2 1 FALSE TRUE FALSE IsCreeperInRange if
        1 ->won
    endif
endif
<-won 1 eq if
    Self 0 Destroy
endif

You can just do this:

CurrentCoords 2 1 FALSE TRUE FALSE IsCreeperInRange if
    Self 0 Destroy
endif

Now users can measure their times in frames rather than seconds! :)
Yeah it runs every frame, but it's really not heavyweight code.

My main complaint is that a portal disappears under mouse, instead of continuing along its path. This is pretty frustrating in gameplay when trying to play quickly. A better solution might be to have the portal continue along its path infinitely until it either hits terrain or the map edge. This can be achieved by calculating a movement vector between current player position and the mouse click, and moving the unit alongside it.

If you actually happen to read this and you'd be interested in learning how to implement further improvements, I urge you to join the Knuckle Cracker Discord (https://discordapp.com/invite/knucklecracker) and asking there, or write a reply either here or in The Coder's Corner (https://knucklecracker.com/forums/index.php?board=25.0) board, and I'll be very happy to help you! Discord is preferable, but I understand if you don't use it.

Cheers!
Title: Re: Custom Map #7123: portal test. By: portalguy
Post by: cornucanis on February 27, 2019, 05:49:10 AM
Quote from: Grabz on February 26, 2019, 11:07:38 AM
I played the map a few times and I think I've reached the fastest possible time now

I beg to differ  ;)