Page 1 of 1
Context Free Fight
Posted: Thu Sep 29, 2005 8:30 am
by momo
I've been thinking about a new way of sharing and learning context free code.
It's a game where players modify other's people code, we best see an example:
player 1 starts the game with this code:
Code: Select all
startshape START
rule START {
CIRCLE { }
}
Then player 2 continues editing this code and adding new things:
Code: Select all
startshape START
rule START {
CIRCLE { }
CIRCLE { s 0.9 b 1 }
START { s 0.8 }
}
Then a new player edits again the code:
Code: Select all
startshape START
rule START {
F_CIRCLES { }
START { y 1 r 5 s 0.9 }
}
rule F_CIRCLES {
CIRCLE { }
CIRCLE { s 0.9 b 1 }
F_CIRCLES { s 0.8 }
}
Then player 4 adds color to it, etc...
Just a game, there's no winer but i think it could be fun and we can learn a lot about context free. What do you think about it?
Posted: Thu Sep 29, 2005 3:23 pm
by fbo
so:
Code: Select all
startshape START
rule START {
F_CIRCLES { }
F_TRIANGLES {}
START { y 1 r 5 s 0.9 }
}
rule F_CIRCLES {
CIRCLE { }
CIRCLE { s 0.9 b 1 }
F_CIRCLES { s 0.8 }
}
rule F_TRIANGLES {
TRIANGLE {}
TRIANGLE {s 0.9 b 1 }
F_TRIANGLES { s 0.8 }
}
Posted: Thu Sep 29, 2005 4:57 pm
by aaronstj
Me next, me next!
Code: Select all
startshape START
rule START {
SPIRAL{}
SPIRAL { r 120 }
SPIRAL { r 240 }
}
rule SPIRAL {
F_CIRCLES { }
F_TRIANGLES {}
SPIRAL { y 1 r 5 s 0.9 }
}
rule SPIRAL .05 {
START {}
}
rule F_CIRCLES {
CIRCLE { }
CIRCLE { s 0.9 b 1 }
F_CIRCLES { s 0.5 }
}
rule F_TRIANGLES {
TRIANGLE {}
TRIANGLE {s 0.9 b 1 }
F_TRIANGLES { s 0.5 }
}
Time for someone to add color, methinks.
Color it is...
Posted: Fri Sep 30, 2005 12:15 am
by Bargonaut
Code: Select all
startshape START
rule START {
SPIRAL{}
SPIRAL { r 120 }
SPIRAL { r 240 }
}
rule SPIRAL {
F_CIRCLES { }
F_TRIANGLES {}
SPIRAL { y 1 r 5 s 0.9 }
}
rule SPIRAL .05 {
START {}
}
rule F_CIRCLES {
CIRCLE { hue 220 sat 0.9 b 0.33 }
CIRCLE { s 0.9 hue 220 sat 0.25 b 1 }
F_CIRCLES { s 0.5 }
}
rule F_TRIANGLES {
TRIANGLE { hue 0 sat 0.9 b 0.33 }
TRIANGLE { s 0.9 hue 0 sat 0.5 b 1 }
F_TRIANGLES { s 0.5 }
}
Posted: Fri Sep 30, 2005 12:51 am
by momo
I moved the triangles out of the circles, and replaced the circles with squares.
Then i added a rotation in the F_TRIANGLES and F_SQUARES rules.
who's the next one?
Code: Select all
startshape START
rule START {
SPIRAL{}
SPIRAL { r 120 }
SPIRAL { r 240 }
}
rule SPIRAL {
F_SQUARES { }
F_TRIANGLES { x 0.5 y 0.5 r 45 }
SPIRAL { y 1 r 25 s 0.9 }
}
rule SPIRAL 0.022 {
START { flip 90 hue 50}
}
rule F_SQUARES {
SQUARE { hue 220 sat 0.9 b 0.33 }
SQUARE { s 0.9 hue 220 sat 0.25 b 1 }
F_SQUARES { s 0.8 r 5}
}
rule F_TRIANGLES {
TRIANGLE { hue 10 sat 0.9 b 0.33 }
TRIANGLE { s 0.9 hue 10 sat 0.5 b 1 }
F_TRIANGLES { s 0.8 r 5 }
}
I'll take another turn
Posted: Fri Sep 30, 2005 11:42 am
by Bargonaut
I thought it could use a little alpha blending.
So, how do we know when it's done?
Code: Select all
startshape START
background {
hue 66 sat 0.4 b 0.5
}
rule START {
SPIRAL{}
SPIRAL { r 120 }
SPIRAL { r 240 }
}
rule SPIRAL {
F_SQUARES { }
F_TRIANGLES { x 0.5 y 0.5 r 45 }
SPIRAL { y 1 r 25 s 0.9 }
}
rule SPIRAL 0.022 {
START { flip 90 hue 50}
}
rule F_SQUARES {
SQUARE { x 0.1 y 0.1
alpha -0.33 hue 250 sat 0.7 b 0.8 }
SQUARE { hue 220 sat 0.9 b 0.33 }
SQUARE { s 0.9 hue 220 sat 0.25 b 1 }
F_SQUARES { s 0.8 r 5 }
}
rule F_TRIANGLES {
TRIANGLE { x 0.1 y 0.1
alpha -0.33 hue 20 sat 0.7 b 0.8 }
TRIANGLE { hue 10 sat 0.9 b 0.33 }
TRIANGLE { s 0.9 hue 10 sat 0.5 b 1 }
F_TRIANGLES { s 0.8 r 5 }
}
Re: I'll take another turn
Posted: Fri Sep 30, 2005 11:59 am
by momo
Bargonaut wrote:I thought it could use a little alpha blending.
So, how do we know when it's done?
well, we don't know when it's done. I think it will be done when nobody else wants to continue editing it, or we feel it's good enought
Anyway, i think i'm going to look into this one a little more.
In the future, if we want to play it again, it should be a good idea to set a limit or just allow one edit for user if there are a lot.
Posted: Fri Sep 30, 2005 12:20 pm
by momo
Some rotations:
Code: Select all
startshape START
background {
hue 66 sat 0.4 b 0.5
}
rule START {
SPIRAL{}
SPIRAL { r 120 }
SPIRAL { r 240 }
}
rule SPIRAL {
F_SQUARES { }
F_TRIANGLES { x 0.5 y 0.5 r 45 }
SPIRAL { y 1 r 47 s 0.9 }
}
rule F_SQUARES {
SQUARE { x 0.1 y 0.1 alpha -0.33 hue 250 sat 0.7 b 0.8 }
SQUARE { hue 220 sat 0.9 b 0.33 }
SQUARE { s 0.99 0.2 b 1 sat 0.9 }
F_SQUARES { s 0.2 r 10 hue 30}
}
rule F_TRIANGLES {
TRIANGLE { x 0.1 y 0.1
alpha -0.33 hue 20 sat 0.7 b 0.8 }
TRIANGLE { s 2 0.5 hue 10 sat 0.9 b 0.33 }
TRIANGLE { s 1.9 0.4 sat 0.8 b 1 }
F_TRIANGLES { s 0.8 0.9 r 45 hue 5}
}
Posted: Fri Sep 30, 2005 1:46 pm
by Bargonaut
OK, then this will be my last turn. It's just so hard to resist another tweak...
Just a little tighter scaling, introduces some internal spirals.
Code: Select all
startshape START
background {
hue 66 sat 0.4 b 0.5
}
rule START {
SPIRAL{}
SPIRAL { r 120 }
SPIRAL { r 240 }
}
rule SPIRAL {
F_SQUARES { }
F_TRIANGLES { x 0.5 y 0.5 r 45 }
SPIRAL { y 1 r 47 s 0.975 } // scale a bit tighter
}
rule F_SQUARES {
SQUARE { x 0.1 y 0.1 alpha -0.33 hue 250 sat 0.7 b 0.8 }
SQUARE { hue 220 sat 0.9 b 0.33 }
SQUARE { s 0.99 0.2 b 1 sat 0.9 }
F_SQUARES { s 0.2 r 10 hue 30}
}
rule F_TRIANGLES {
TRIANGLE { x 0.1 y 0.1
alpha -0.33 hue 20 sat 0.7 b 0.8 }
TRIANGLE { s 2 0.5 hue 10 sat 0.9 b 0.33 }
TRIANGLE { s 1.9 0.4 sat 0.8 b 1 }
F_TRIANGLES { s 0.8 0.9 r 45 hue 5}
}
How about...
Posted: Fri Sep 30, 2005 1:50 pm
by Bargonaut
To make it more of a competitive "fight", we could end the game with a poll for the best variation. The winner will have the result posted to close the thread.
Posted: Fri Sep 30, 2005 3:01 pm
by momo
yeah, i like the idea, but i think we could start with more complex files, it's more interesting than starting with a simple cirlce.
Posted: Sat Oct 01, 2005 10:57 pm
by UglyPuppy
here's my rendition...
startshape START
background {
hue 235 sat 0.05 b .1
}
rule START {
SPIRAL{}
SPIRAL {y -1.5 x 1.4 r 90 s 1.2 .84}
SPIRAL { r 240}
START {y 7 x -7.5 r 90 s .6 hue -5}
START {y 7 x 7.5 r -90 s .6 hue -5}
}
rule SPIRAL {
F_SQUARES { }
F_TRIANGLES { x 0.5 y 0.5 r 45 }
SPIRAL { y 3 r 47 s 0.975 } // scale a bit tighter
}
rule F_SQUARES {
KNARLF { x 0.1 y 0.1 s .5 alpha -0.63 hue 250 sat 0.7 b 0.4 }
SQUARE { hue 220 sat 0.9 b 0.43 }
KNARLF { s 0.99 0.2 alpha -0.75 b 1 sat 0.9 hue 160 b .5}
F_SQUARES { s 0.2 r 10 hue 30}
}
rule F_TRIANGLES {
TRIANGLE { x 0.1 y 0.1
alpha -0.33 hue 20 sat 0.7 b 0.8 s 1.5}
TRIANGLE { s 2 0.5 hue 10 sat 0.9 b 0.33}
TRIANGLE { s 1.9 0.4 sat 0.8 b 1 s 1.5 }
F_TRIANGLES { s 0.8 0.9 r 45 hue 5}
}
rule KNARL {
SQUARE {}
KNARL {x 1 r 17.5 s .95}
}
rule KNARL {
SQUARE {}
KNARL {x 1 r -17.5 s .94}
}
rule KNARLF {
KNARL {}
KNARL {flip 90}
}
Posted: Mon Oct 03, 2005 1:25 am
by momo
crazy, i like the blue curves in the background.