PAC maps: theory and practical

Started by teknotiss, December 03, 2014, 12:02:14 PM

Previous topic - Next topic

teknotiss

Quote from: stdout on January 04, 2015, 09:25:06 AM
Thisisnotasmile, when you're in colonial space, enter PlayAsCreeper in the "Text: " field and then click on "Apply Filters". That will return 16 of the 17 maps that have been published. The 17th is the one called "CreeperComeBack" and it doesn't include that tag.

As for those notifications, I disabled that long ago. from the main menu click on Settings and then under Misc check off the bottom option "Do not show game event notification tags"

search #PAC for mine dude! 8)
"Is God willing to prevent evil, but not able? Then he is not omnipotent.... Is he able, but not willing? Then he is malevolent.... Is he both able and willing? Then whence cometh evil?.... Is he neither able nor willing? Then why call him God?" --- Epicurus

Xeos

I have used a runner in my new map (THE DEVIOUS ARACHNID) as a logic gate - it isn't modified in anyway - it is how you play it normally in a conventional map and it i can see it being quite useful in a few ways if used as I have here.
The only trouble is that I cant get the map to declare victory at the moment with it in. :( I found this thread looking for a solution so thought I would mention it :)
A child of 5 could beat this map ... Go fetch a child of 5 !

Stave

Hello!

So I've been playing lots of PAC maps and enjoying the hell out of them, enough to start actually looking at the crpl scripts for the first time. So, to keep in mind where I'm coming from: my full time job is programming, so I know how programming works, but this is my first look at CRPL. So please, be nice if my ideas are stupid. I'm not even savvy enough yet to test and debug them myself.

Without further ado... my code ideas.

In Abraxis.crpl, if IsCreeperInRange works like I suspect, and if it doesn't cause significant lag, line 92 should use IsCreeperInRange(<-X <-Y 3) instead of GetCreeper(<-X <-Y). (Maybe that should be 1 and not 3?) Because units occupy a 3x3 space, not 1x1, checking only at the point causes severely obnoxious rebuild-flicker on incompletely-covered unit locations. Sadly there's no IsDigitalisInRange, and I think faking it with an x/y loop may be a bad idea.

You can safely add a "break" after line 108, as long as it only breaks you out of one level of do-loop. It doesn't matter how many enemies you find, whether you find one or 20, you're going to rebuild the nullifier.

Assuming "loop" works the same as "continue" in C and python: You can get rid of the "Rebuild" variable. Change line 112 to "loop", and remove the if check around lines 118-120.

Finally, what happens if you change the victory check to only happen every 10 frames? I can imagine that GetUnitsInRange(0 0 9999) is a seriously expensive operation since it pushes every remaining unit onto the stack, and doing it every frame just HAS to hurt, and hurt bad.

stewbasic

New template attached. I ended up rewriting a lot of the tower controls stuff, and added some requested features.
* E/R now cycle again. If multiple units are selected, they are all put into the same state.
* T splits support between selected emitters.
* "Vanilla" creeper units can be added without interfering with victory. They even get replaced by dummy images when the player wins so they doesn't notice their destruction (unless there's an inhibitor).
* Emitter and SporeTower unit limits can be set in Builder.crpl.

Quote from: Stave on January 24, 2015, 04:00:49 AM
In Abraxis.crpl, if IsCreeperInRange works like I suspect, and if it doesn't cause significant lag, line 92 should use IsCreeperInRange(<-X <-Y 3) instead of GetCreeper(<-X <-Y). (Maybe that should be 1 and not 3?) Because units occupy a 3x3 space, not 1x1, checking only at the point causes severely obnoxious rebuild-flicker on incompletely-covered unit locations. Sadly there's no IsDigitalisInRange, and I think faking it with an x/y loop may be a bad idea.

You can safely add a "break" after line 108, as long as it only breaks you out of one level of do-loop. It doesn't matter how many enemies you find, whether you find one or 20, you're going to rebuild the nullifier.

Assuming "loop" works the same as "continue" in C and python: You can get rid of the "Rebuild" variable. Change line 112 to "loop", and remove the if check around lines 118-120.

Finally, what happens if you change the victory check to only happen every 10 frames? I can imagine that GetUnitsInRange(0 0 9999) is a seriously expensive operation since it pushes every remaining unit onto the stack, and doing it every frame just HAS to hurt, and hurt bad.
Profiling Abraxis.crpl is next on my TODO list (the original version checked creeper on a 3x3 area and avoided the GetUnitsInRange(0 0 9999) as you say). Thanks for pointing out IsCreeperInRange; I wasn't aware of that. Unfortunately a lot of the "do loops" can't be broken out of without leaving extra stuff on the stack (although I think the stack might be emptied each frame, so maybe it's OK).

Hubs

stewbasic, if you have time you may want to look into the Terp bug (I consider it a bug, although some authors are using it as a map strategy). Basically if there is a terp on the map the terrain options become available and the PAC player can set terrain levels for the terp to then change. Even with normal controls diabled, it is still an option only if there is a terp on the map. I thought maybe GetCurrentBuildTab, but that doesn't look like it consides the terraform tab a build tab. More complex method would be to only have CRPL terps. Any thoughts?

stdout

I have a thought on this. It is within the canon of Creeper World that the Loki can and often do take control of human technology and corrupt it for their own use.

I feel that the creeper's use of human terps is perfectly in keeping with the lore of the creeper and I do not consider it a bug. It adds depth and gives another tool for map makers to use in their games.

stewbasic

Quote from: stdout on January 27, 2015, 05:59:18 PM
I have a thought on this. It is within the canon of Creeper World that the Loki can and often do take control of human technology and corrupt it for their own use.

I feel that the creeper's use of human terps is perfectly in keeping with the lore of the creeper and I do not consider it a bug. It adds depth and gives another tool for map makers to use in their games.
On the other hand a mapmaker may want a human terp without PAC interference. @Hubs I can't think of any other solution. A CRPL terp would be a pain to make... it doesn't look like any terp stuff (eg target terrain height) is exposed in CRPL.


Hubs

Quote from: stdout on January 27, 2015, 05:59:18 PM
I have a thought on this. It is within the canon of Creeper World that the Loki can and often do take control of human technology and corrupt it for their own use.

I feel that the creeper's use of human terps is perfectly in keeping with the lore of the creeper and I do not consider it a bug. It adds depth and gives another tool for map makers to use in their games.

Yeah, I guess you're right. Doesn't look like there is a way to prevent it anyway.

Xeos

#113
Quote from: stewbasic on January 25, 2015, 08:05:03 PM
New template attached. I ended up rewriting a lot of the tower controls stuff, and added some requested features.
* E/R now cycle again. If multiple units are selected, they are all put into the same state.
* T splits support between selected emitters.
* "Vanilla" creeper units can be added without interfering with victory. They even get replaced by dummy images when the player wins so they doesn't notice their destruction (unless there's an inhibitor).
* Emitter and SporeTower unit limits can be set in Builder.crpl.

Quote from: Stave on January 24, 2015, 04:00:49 AM
In Abraxis.crpl, if IsCreeperInRange works like I suspect, and if it doesn't cause significant lag, line 92 should use IsCreeperInRange(<-X <-Y 3) instead of GetCreeper(<-X <-Y). (Maybe that should be 1 and not 3?) Because units occupy a 3x3 space, not 1x1, checking only at the point causes severely obnoxious rebuild-flicker on incompletely-covered unit locations. Sadly there's no IsDigitalisInRange, and I think faking it with an x/y loop may be a bad idea.

You can safely add a "break" after line 108, as long as it only breaks you out of one level of do-loop. It doesn't matter how many enemies you find, whether you find one or 20, you're going to rebuild the nullifier.

Assuming "loop" works the same as "continue" in C and python: You can get rid of the "Rebuild" variable. Change line 112 to "loop", and remove the if check around lines 118-120.

Finally, what happens if you change the victory check to only happen every 10 frames? I can imagine that GetUnitsInRange(0 0 9999) is a seriously expensive operation since it pushes every remaining unit onto the stack, and doing it every frame just HAS to hurt, and hurt bad.
Profiling Abraxis.crpl is next on my TODO list (the original version checked creeper on a 3x3 area and avoided the GetUnitsInRange(0 0 9999) as you say). Thanks for pointing out IsCreeperInRange; I wasn't aware of that. Unfortunately a lot of the "do loops" can't be broken out of without leaving extra stuff on the stack (although I think the stack might be emptied each frame, so maybe it's OK).

Thanks for adding a feature I requested before (limiting spores). much appreciated as always :) but I have only just found this (could we have a dedicated thread with only updates with the first post in that thread having the latest template which someone can manage? ,maybe even use this thread and use the first post as the place to go for the latest patch/update?) - Just one thing though,  I have noticed that when I enter PAC mode, there is no text above the items in the PAC menu ( emitter spore etc) . but if I stop the map, edit it and just re-compile, then start it again,  the text appears. Not sure why this happens ?
A child of 5 could beat this map ... Go fetch a child of 5 !

Karsten75

ha! Over on the Steam forums a player asked (in German, nogal!) how to play PAC maps. I came here hoping to find some help, but this is mostly about how to make PAC maps.

If anyone can help the poor guy (level 0 on Steam, so not an experienced gamer) with some info, even just a link, it'd be nice. Post here if you don't want to post on Steam. English is OK, Google translate should suffice.

Here's the referenced question in both languages.

German (original)
Wie schon im Titel, ich habe keine Ahnung wie ich die Karten spielen kann, die man als Creep spielt. Ich kann nichts bauen und und auch nichts Aktivieren. Muß ja irgend eine Möglichkeit geben, oder sind das nur Karten zum anschauen?
Muß ich auf irgendetwas achten, oder beim Bau noch irgend welche Knöpfe drücken?
[close]

English via Google Translate
As in the title , I have no idea how to play the cards that you play as a creep . I can build anything and nothing and Activate. Must indeed any be a possibility or is it just to look at cards ?
Do I have to pay anything , or the construction nor press any buttons which ?
[close]

BTUx9

Quote from: Karsten75 on May 26, 2015, 10:24:24 AM
ha! Over on the Steam forums a player asked (in German, nogal!) how to play PAC maps. I came here hoping to find some help, but this is mostly about how to make PAC maps.

If anyone can help the poor guy (level 0 on Steam, so not an experienced gamer) with some info, even just a link, it'd be nice. Post here if you don't want to post on Steam. English is OK, Google translate should suffice.

Here's the referenced question in both languages.

German (original)
Wie schon im Titel, ich habe keine Ahnung wie ich die Karten spielen kann, die man als Creep spielt. Ich kann nichts bauen und und auch nichts Aktivieren. Muß ja irgend eine Möglichkeit geben, oder sind das nur Karten zum anschauen?
Muß ich auf irgendetwas achten, oder beim Bau noch irgend welche Knöpfe drücken?
[close]

English via Google Translate
As in the title , I have no idea how to play the cards that you play as a creep . I can build anything and nothing and Activate. Must indeed any be a possibility or is it just to look at cards ?
Do I have to pay anything , or the construction nor press any buttons which ?
[close]
Easiest way to learn may be to start by playing map #1492.
It has a basic tutorial

mzimmer74

I put together a basic explanation in English at http://knucklecracker.com/forums/index.php?topic=17572.msg124817#msg124817 that might help.  It's a bit outdated but should give enough information to get started.  I don't know German at all so not sure if it'd be any good for him.
Omnipotence doesn't mean the ability to do what is logically impossible. It's possible, therefore, for God to create beings with the kind of free will that can choose between good and evil, but he can't also force those creatures to choose good. If he forced their choice, it wouldn't be free.

mzimmer74

So I started feeling ambitious and put the guide I wrote on Steam.  At some point I might even feel energetic and add the new key mappings made since Hubs template.  I wouldn't mind another eye looking over it to make sure I didn't put something incorrect up.  Thanks.
Omnipotence doesn't mean the ability to do what is logically impossible. It's possible, therefore, for God to create beings with the kind of free will that can choose between good and evil, but he can't also force those creatures to choose good. If he forced their choice, it wouldn't be free.

teknotiss

bump... this should maybe be stickied!
"Is God willing to prevent evil, but not able? Then he is not omnipotent.... Is he able, but not willing? Then he is malevolent.... Is he both able and willing? Then whence cometh evil?.... Is he neither able nor willing? Then why call him God?" --- Epicurus