I don't think there are any limits on size of CF code. Whatever it is, it is probably quite small in kilobytes compared to other things clogging the internet in general, or the server in particular.
The thing I would advise is to see if you find some way of using the capabilities of the CF language itself rather than the capabilities of your preprocessor. From looking at your designs (which I like) you have been thinking of them as a functional programmer: telling CF what to do to make each part of your carefully planned image. My approach often starts this way, with an idea of what the image will look like, but then I try to get by with as few rules as possible. ... and you need to be prepared to be pleasantly surprised when CF does something different!
Anyway, this is usually a puzzle that I enjoy solving.
There are a lot of tricks you can use to get variation: the main thing to make best use of is CF's in-built randomness, coming from its random selection of rules (as you have used). For instance, in your turf design, you have a whole pile of rules for coding different random curved blades of grass, which you have carefully encoded as splines.
Another way of getting a similar result is to use far fewer blades and to add some randomness to their geometry putting some "geometry modifiers" in the pipeline between your start rule and the actual drawing rules.
Here is a very quick proof of concept of this - a bit rough compared to yours, but I haven't spent much time tweaking.
Code: Select all
startshape crescentRow
background { h 140 sat 0.8 b -0.5 }
rule crescentRow { 100 * { x 0.04 } crescentBlade {} }
rule crescentBlade{ CB{}}
rule crescentBlade{ CB{ f 90} }
rule CB {CB{s 1 1.02}}
rule CB {CB{s 1 0.98}}
rule CB {CB{s 1.02 1}}
rule CB {CB{s 0.98 1}}
rule CB {CB{skew 1 0 }}
rule CB {CB{skew -1 0 }}
rule CB 0.1{payload{}}
rule payload{ONE{}}
rule payload{TWO{}}
rule payload{THREE{}}
rule ONE{
SQUARE { s 0.1 0.02 y .01}
ONE { y 0.01 s 0.98 r .2}
}
rule TWO{
SQUARE { s 0.1 0.02 y .01 }
TWO { y 0.01 s 0.98 r .3}
}
rule THREE{
SQUARE { s 0.1 0.02 y .01 }
THREE { y 0.01 s 0.98 r .4}
}
So I have only encoded three different blades, using simple spirals (using splines is also OK here, but IMO harder to get right), but these are not used directly. Instead they may first be flipped left/right, then scaled up and/or down a few times, skewed a bit left or right, before finally being drawn. The design "chicken & egg" used exactly this process. There are other ways of exploiting rules for randomness: have a look at the tutorials in the wiki for some ideas, and pull apart some gallery designs.
Regarding macro preprocessors, one of the things that can be a little tiresome in CF is to encode designs where many variations of the same rule are necessary (e.g. ONE, TWO, THREE above) or where there is one numeric constant that needs to be used in a few places. Both of these can be handled easily by a decent pre-processor. However, it could turn CF into a language which encourages you to list every item that is drawn, which would be a pity. If you have a good macro solution that takes the middle ground on this, maybe you could share it. Pull up a homepage on the documentation wiki and start explaining what you have done. If it is a really good preprocessor, we can lobby the devs to include it.