PAC maps: theory and practical

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

Previous topic - Next topic

teknotiss

Hey dudes, since PAC maps are taking off a bit i thought we should have a thread for the discussion of how to make them, and what changes to the PAC scripts are desirable or necessary.
so here we are! ;)

this is a quote of the basics of PAC mapping.
Quote from: stdout on October 27, 2014, 08:42:29 PM
teknotiss, to switch between building modes click on the icon that's off in space over on the left. If it's not there, then add a cprl core and attach Temp.crpl to it. Save and reload and then the button will appear.

To make the nullifers, just build them as usual, making sure each one is in range of a PZ. When you're done, go into the map and advance one frame ("N").

Now find a nullifer that you're sure is going to get killed early. I always choose one near a live emitter. Mouse over that and on your keyboard press "G". That triggers the script that will save all the nullifer positions and will then remove them. When you see all the nullifiers disappear then you know it worked.

Here are the notes I copied from stewbasic (they have been edited by me slightly):

QuoteHere are the steps to finalize the map:
* Increment one frame to make sure all the scripts have run their "once" sections.
* Save to one of the slots, eg 3, in case you want to come back and make more changes.
* Put your mouse over the trigger unit and press G. This will cause Temp.crpl to record the trigger unit, record all of Abraxis's units, reset game time and destroy the nullifiers and itself.
* Save to another slot, eg 2.
* Zoom out so that the build tab doesn't end up in the thumbnail image.
* Go to edit mode and finalize the map.
* Copy WorldEditor/MapName/save-2.cw3 to Finalized/MapName/MapName.cw3 (replacing the existing file).
* Play the finalized map as usual.

Another note: I think you can't move the totems without changing things in CRPL. So you may notice in my PAC maps, the totems are always in the exact same place.  :)

If you have any trouble at all, feel free to send me the map that you've made and I'll look at it and troubleshoot problems and what-not. I can also finalize a map for you and send it back to you for you to check and submit to CS.
you can just use a previous players map to get going (i did!  ;)) and that quote should help.
feel free to ask me for clarity on it since i got it to work ok at least once.
but if hubs and stdout can collaborate on a better pre-finalising script that'd be really cool.

also it'd be nice if stdout or hubs could make a plain map (say 150x150 ish) with all the cores and their attached scripts laid out neatly (and visibly) for people like me to use a template.
feel free to post any questions or suggestions about PAC maps all you players only types, we want feedback on the mechanics from you too!
Hubs and stdout, please jump in here and deal with any coding questions, i hate coding so i don't want to have a headache while trying to explain the in's and out's.
cheers in advance dudes, and here's hoping there's lots of PAC maps to come! 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

J

I would prefer a much smaller template, because last time when I resized a PAC map the map became unplayable. Something like the standard map size or miniland map size would work for me (I simply don't have enough inspiration in one week to fill a huge 150x150 map, and I prefer to skip sluggish endgames). I hope the totems positions aren't hard-coded in the scripts to allow easy moving, but I can live with fixed totem positions.

stdout

I have a map here called "blank_slate" that is a modest sized map and it's what I use when I start a new PAC map. It is an old version, though, and doesn't include the new updates like the bertha fix and the emitter size fix.

I'll try to get it updated and then upload it here.

stdout

Alright, I just finished tidying up my blank slate PAC map. You'll find it attached below. Just load it up in your projects area and you'll see a fairly barebones PAC map ready for your changes. It has incorporated all the updates I've made to the PAC code.

With this blank slate, anyone should be able to create a PAC map with very little work. You don't have to change any CRPL code. Just edit and then follow the finalization procedures outlined above. Ideally Hubs or someone will take this blank slate and tidy it up further and make the finalization process much easier.

teknotiss

Quote from: J on December 03, 2014, 12:53:39 PM
I would prefer a much smaller template, because last time when I resized a PAC map the map became unplayable. Something like the standard map size or miniland map size would work for me (I simply don't have enough inspiration in one week to fill a huge 150x150 map, and I prefer to skip sluggish endgames). I hope the totems positions aren't hard-coded in the scripts to allow easy moving, but I can live with fixed totem positions.
really? cos i had no issues i could see so far in massively increasing one map and shrinking by a few cells another.
can you remember what happened? if we can replicate it we may be able to strengthen the code
fair enough on the size though ;), perhaps a few template maps? 50x, 100x, 125x, 150x, and 200x maybe? until we can work out if resizing is always going to be an issue that is

Quote from: stdout on December 03, 2014, 04:14:57 PM
Alright, I just finished tidying up my blank slate PAC map. You'll find it attached below. Just load it up in your projects area and you'll see a fairly barebones PAC map ready for your changes. It has incorporated all the updates I've made to the PAC code.

With this blank slate, anyone should be able to create a PAC map with very little work. You don't have to change any CRPL code. Just edit and then follow the finalization procedures outlined above. Ideally Hubs or someone will take this blank slate and tidy it up further and make the finalization process much easier.

cool cheers dude!
now if hubs can add in, and clearly label the new stuff (i don't want the AC dropper in my maps yet, but i do like it, so i want to be able to disable it simply, and i want the emitter size fix too!), i'll try resizing up and down that map and see if it breaks.
if not i'll do a few size's of template and attach all of them to the first post and presto we will have a newbie PAC mapper go to spot!
"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

stdout

Sizing the map up shouldn't be a problem. It's sizing it down that can be problematic. Cores can be trimmed away when the map gets smaller.

The blank slate map I included above it fairly small, should be fine for everyone's needs. You can make it bigger without problems. I don't know if it will work to move the totems.

teknotiss

Quote from: stdout on December 03, 2014, 04:33:34 PM
Sizing the map up shouldn't be a problem. It's sizing it down that can be problematic. Cores can be trimmed away when the map gets smaller.

The blank slate map I included above it fairly small, should be fine for everyone's needs. You can make it bigger without problems. I don't know if it will work to move the totems.

in that case having all the core's in the upper left corner should prevent sizing down, but if we just make the template quite small (50x50? ???) then it'll be fine to get bigger and i'm not sure we could make one smaller than 50x. a challenge for j or nextidea i guess?  ;)
"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

stdout

Having a small blank slate would be nice and I may give it a shot.

What I do when I want to make a small map, though, is I just use a small area of the overall map. My recent map (Texensis) is like that. The entire bottom half of the map is completely unused.

Hubs

I've had issues with resizing as we'll. a lot of the cores are outside of the map boundary and get trimmer or the app crashes. Stdout I noticed you had that giant void space at the bottom of your map but I'm pretty sure that slows the game down. Each frame it's going to check all that space for moving creeper and whatever other checks that are done on each cell. That's why larger maps are almost always lag heir than smaller. That's been my experience anyway.

Hubs

If anyone has any improvement ideas for PAC maps let's get those here as we'll. in my template map I want to capture any improvements we need so there there aren't a bunch of maps with different controls.

One I've seen already is right click to deselect.

stdout

Thanks for the info on map size impacting game lag. That makes a lot of sense and demonstrates the importance of getting a smaller map as a blank slate.

The right click deselect should be abandoned. It's used for panning and I don't think we should mess with that.

teknotiss

middle mouse to cancel would be good, but that's not as important as a simpler finalising process.
perhaps a core that says "press me before finalising" that we can click on once we've done the editing? that way it can run a frame, log all nullifier positions and set up for finalising (perhaps even finalise for us?)
"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

DestinyAtlantis

Different people have different custom controls. (I use right click for deselection and left the middle mouse button with panning, though i have never used it)

Cavemaniac

I often wonder what Virgil makes of all this.

He knew he was turning something loose when he gave us the keys to his castle by including CRPL - but I doubt he ever thought it would be so popular, or peoe would take it so far.

Play as Creeper?

A year ago I wouldn't have thought it was even possible!
Be yourself. Everyone else is already taken.

Hubs

I'm making headway on the new template. It will basically be a single core in the top right corner of the map with nothing else present. You can build up the human base as much as you want and map out the terrain. I'll have hot keys to place starting emitters and spore towers. Totems can be built anywhere. The code will pick up each one at the start of the game. You should be able to resize the map without issues because the map will be mostly empty.

As long as you don't unpause the game you'll be able to select units and change their settings such as Bertha auto target or cannon target digitalis only or AC sprayer release excess AC or fighter/bomber targeting. Once you unpause the game or increment a frame by pressing "N" the temporary core will create all of the other cores and delete itself. At that point the map will be perfectly playable as a PAC map. As long as you save in edit mode you can unpause, play test, then reload to adjust, and repeat. Finalizing a map should simply be to increment by 1 frame, save, and finalize.

I also got the nullifier stuff squared away and have optimized Abraxis by completely rewriting it. It did a check to see if units trying to be rebuilt are in range of a relay or collector. It's actually unnecessary because the building will just sit unbuilt until it can connect to the network and start getting packets. This should massively speed up the game because it took a lot of time to check for connections. You'll also be able to add in nullifiers very easily in the code and they should always work correctly as long as they are near a PZ. It also lets you add units to start building at the start of the game easily such as additional berthas or thors.

Let me know what you all think about that process (current PAC authors and prospective ones too!). Is that easy enough? You should be able to knock out a PAC map without using CRPL. And if you want to add extra CRPL scripts to the gameplay I'll have a really easy and clear way to do it.