Game Development Community

dev|Pro Game Development Curriculum

Hello, Goodbye, Israel, and LSystems

by Chris Calef · 03/12/2008 (11:53 am) · 10 comments

www.hardreality.org/blog/images/Jerusalem_rooftops_2.jpg
Well, hi again, everybody! Turns out it's been eleven months since my last blog. I know, it hasn't even been a year yet, but I'm just gonna go ahead and post something anyway. I'm turning over a new leaf. And I have had quite a bit going on recently. For one thing, I quit working at Garage Games and returned to Joyfully Independent!! Don't worry, though, there's warm fuzzy feelings all around, it's all good. (More below.)

Be warned, This Blog Is Image Heavy.

www.hardreality.org/blog/images/Jerusalem_wall_3.jpg
As you may have guessed, I just came back from Israel a little while ago.

www.hardreality.org/blog/images/Haifa_buildings_3.jpg
It was a really cool trip, and I had a fantastic time. I highly recommend anyone who can to check it out at least once in your life. I'm not especially religious, at least not in any way that orients on a particular piece of territory, but the history there is deep and wide and comes screaming right on up to the present in a way that few places do. In a way it almost feels like Israel represents the crux of the whole world's problems, like if things could somehow get fixed there, then there might be hope for everybody.

;www.hardreality.org/blog/images/Jerusalem_kids_with_guns.jpg
Unfortunately, that doesn't seem to be the direction things are going, at least not this month. They've been taking rockets from Gaza in the Israeli town of Sderot for quite a while, and while I was there the Israeli government cut back electricity to the entire Gaza Strip, and I hear things have escalated quite a bit since then. Unfortunately, I didn't leave with any brilliant ideas for making everybody happy.

www.hardreality.org/blog/images/Jaffa_3.jpg
But damn, the story's been going on for a long time over there! Above is a segment of an Egyptian wall that is three thousand years old. You can see that they were made of mud, as they were kind of plastic when they laid them together. As far as I know, that wall right there could very well have been made by Hebrew slaves mixing straw and mud just like in the Bible stories.

www.hardreality.org/blog/images/Jaffa_2.jpg
You can't go up to the three thousand year old walls, but the two thousand year old wall above is open for anybody to drop their backpack on and hang out for a while. I stayed there quite a while, just soaking it up.

www.hardreality.org/blog/images/Masada_5.jpg
I got a chance to visit the Masada, on the Dead Sea, where the Hebrew Zealots took their last stand against the Romans, somewhere around the year 30 AD, after fractious infighting in Jerusalem wherein they proclaimed that real Jews had to fight the Romans right now, and everybody else was a wimp and a compromiser. They fought each other, and then the Romans came in and crushed them all.

www.hardreality.org/blog/images/Masada_2.jpg
Can't quite put my finger on it, but something about that story just feels familiar somehow.

The crazy thing about the above picture, actually, is that the building doesn't even date from the Masada's heyday. It's a Byzantine church from six centuries later. It's fourteen hundred years old, and the people who used it were already camping out in six hundred year old ruins. That's what I call history.

Here's what the place looked like when it was new.

www.hardreality.org/blog/images/Masada_4.jpg
Here's a Roman camp, one of the eight that surrounded the whole plateau for three years. Still sitting right there, two thousand years later.

www.hardreality.org/blog/images/Masada_3.jpg
If you're interested, you can check out more of my pictures here. It's kind of weird, the first image there is actually a link to a sub-gallery, but if you keep clicking around you'll figure it out.

My trip was fun as hell, but it actually wasn't all vacation. I was there as an official representative of Garage Games, on a secret mission involving these guys. More on that later.

www.hardreality.org/blog/images/Jaffa_5.jpg
This sort of brings me to the really big news of this blog, for anybody who's still with me. A few weeks ago, I took a giant leap from safe and employed back to crazy sketchy who-the-hell-knows-what's-gonna-happen-next INDIE!!!

(Hence, the "Goodbye" section of the title.) It's not really a goodbye, of course, but I said goodbye to working in the Garage Games office anyway. It was a great ride, I learned a hell of a lot and had an awful lot of fun and met a whole bunch of really cool people who will be friends for a long time, but the time had to come sooner or later where I jump out and start working on the game titles and projects I've had running through my head for the last ten years. The time is now, now is the time, and the move is made. For anyone interested, I'm officially available for contract jobs, I'm busy but if it's an interesting project that oughta get done, I can probably work it in, feel free to get in touch with me at chris dot calef, at gmail dot com. I love to work with dts models, converting and tweaking and applying physics and AI; and I can occasionally be persuaded to do other things too.

www.hardreality.org/blog/images/Haifa_bay.jpg
Now, some people who are STILL reading this might be curious about that last bit of the title.

Turns out, I've been grinding away at a side project that makes my life a living hell, but occasionally pops out something interesting. I finally got it up to the level of making a few screenshots, at least.

www.hardreality.org/blog/images/LSys05.380.jpg
What it is is a perversion of an old freeware LSystems application called LParser by Laurens Lapre. I've had that program for years, played with it a lot, and thought it was really cool. Meanwhile, I was also working on a system for spitting out simple DTS models based on connected bodypart primitives read in from a script. I designed it way back when in order to have a means for testing physics on a number of different body types. At the time I was using ODE. Eventually, I hooked it up to dtsSDK so I could use it the models in Torque.

www.hardreality.org/blog/images/dragon_3.jpg
The above model was based on a cfg file that looks something like this:
0 Pelvis ; Pattern_X ; null ;0;(0.0,0.0,0.0);(90.0,0.0,0.0);5.0;10.0;-0.0;0.0;-0.0;0.0;(0.0,0.0,0.0);0.0;0.0;3;0.0;3.0;
1 Spine1 ; Pattern_X ; null ;0;(0.0,0.0,10.0);(0.0,0.0,0.0);5.0;12.0;-0.1;0.1;-0.1;0.1;(0.0,0.0,0.0);0.0;0.0;3;15.0;3.0;
2 Spine2 ; Pattern_X ; null ;1;(0.0,0.0,12.0);(0.0,0.0,0.0);5.8;14.0;-0.1;0.1;-0.1;0.1;(0.0,0.0,0.0);0.0;0.0;3;15.0;3.0;
3 Spine3 ; Pattern_X ; null ;2;(0.0,0.0,14.0);(0.0,0.0,0.0);7.5;10.0;-0.1;0.1;-0.1;0.1;(0.0,0.0,0.0);0.0;0.0;3;15.0;3.0;

4 Neck1  ; Pattern_X ; null ;3;(0.0,0.0,10.0);(0.0,0.0,0.0);3.0;6.0;-0.2;0.1;-0.1;0.1;(0.0,0.0,0.0);0.0;0.0;3;8.0;3.0;
5 Neck2  ; Pattern_X ; null ;4;(0.0,0.0,6.0);(0.0,0.0,0.0);3.0;5.0;-0.2;0.1;-0.1;0.1;(0.0,0.0,0.0);0.0;0.0;3;8.0;3.0;
6 Neck3  ; Pattern_X ; null ;5;(0.0,0.0,5.0);(0.0,0.0,0.0);2.5;4.0;-0.2;0.1;-0.1;0.1;(0.0,0.0,0.0);0.0;0.0;3;8.0;3.0;
7 Neck4  ; Pattern_X ; null ;6;(0.0,0.0,4.0);(0.0,0.0,0.0);2.0;4.0;-0.2;0.1;-0.1;0.1;(0.0,0.0,0.0);0.0;0.0;3;8.0;3.0;
8 Neck5  ; Pattern_X ; null ;7;(0.0,0.0,4.0);(0.0,0.0,0.0);1.8;4.0;-0.2;0.1;-0.1;0.1;(0.0,0.0,0.0);0.0;0.0;3;8.0;3.0;

It goes on, but I snipped it for readability. The point is, you write this text file by hand and then feed it into the system, and it spits out geometry. It's programmer art with a capital P, but my intent was to produce something rapidly that could get finishing touches from an artist, but would already have all the bones hooked up and the general shape working. Either that, or just use it as is in a cartoony game with lower art standards than your average FPS. Anyway, that project is still happening when I get time to work on it, but somewhere along the way I decided it would be a hoot to hook it up to LParser.

www.hardreality.org/blog/images/LSys03C.266.jpg
Turns out it _was_ a hoot, as well as a big pain in the butt. I spent two weeks immediately after leaving Garage Games flailing around in the transforms jungle, dealing with things that looked like this:

www.hardreality.org/blog/images/lparser_angles2.400.jpg
But, I finally got at least the first level of branching to more or less work, under a variety of different configurations.

www.hardreality.org/blog/images/LSys03.380.jpgHere's the code for the above model, I hope all the brackets and quotes work out all right:
# --- L-System Parser/Mutator --- Lj Lapre --------------
6
10
30
j[p][o]
j=FF
p=''^^Fp
o=''&&Fo
@
www.hardreality.org/blog/images/LSys07B.380.jpg
# --- L-System Parser/Mutator --- Lj Lapre --------------
6
10
30
j[''u]>>['u]>>>[u]>>>['u]>>>[''u]
j=F'F
u='''^^Fu
@
www.hardreality.org/blog/images/LSys03D.227.jpg
# --- L-System Parser/Mutator --- Lj Lapre --------------
2
10
30
j[p][o]''F[p][o]''F[p][o]''F[p][o]''F[p][o]''F[p][o]''F[p][o]
j=F'F
p='''^^^Fp
o='''&&&Fo
@
www.hardreality.org/blog/images/LSys05A.380.jpg
The complexity is limited by a crash bug right now, which I haven't tracked down yet, and I have big problems when I try to branch out into a second level. Still obviously a work in progress, but I thought some people out there might be interested. I recently became aware of one other LSystems project in Torque, which is also very interesting, but mine is actually geared more toward making creatures, giant bugs, and weird tentacled monsters than trees, which is the "normal" use of LSystems.

Oh yeah, and the other reason I'm doing it is, it plugs directly into my physics system:

www.hardreality.org/blog/images/LParser03.gif
But that's a whole other story, and is also beset with killer bugs at this point. Stay tuned for updates, I'll be posting again when things get farther along, but I figured I might as well spill the beans on it anyway. I haven't figured out the final end product for this one yet, but if you're interested, drop me a line and maybe you can bump it up on my priority list.

In the meantime, I'm back to work. Thanks for listening!

Chris

#1
03/12/2008 (12:36 pm)
That is seriously cool! The trip wasn't bad either ;)
#2
03/12/2008 (12:55 pm)
Very awesome blog.
#3
03/12/2008 (1:22 pm)
That chip AI Seek is coming out with is incredible. Thanks for the heads up on that!!!
#4
03/12/2008 (2:17 pm)
Tentacle trees? please, please... 8-)

Masada: If I'm not wrong, Hebrew decided to suicide rather than surrender, hence Romans never won that battle.
#5
03/12/2008 (2:30 pm)
@Stephan: Yeah, you're right actually, there were 267 Zealots left when they reached the end of the road and all killed themselves (except for a couple of women and a few kids who weren't into the whole suicide pact thing, and hid instead.) Technically though, all but one avoided committing suicide for purposes of not offending God, by drawing straws and having ten poor guys have to kill all their friends, then one dude had to kill the other nine, and then he was the only one who had to actually commit suicide.

It definitely impressed the hell out of the Romans. Seems like kind of a stretch to say they didn't win, though; it only happened after they had built a ramp all the way up to the gates, hauled a seige tower up the 45 degree incline and smashed a hole in them. Crazy story all around though, hard to believe it all really happened. :-0
#6
03/12/2008 (2:37 pm)
@Chris: thanks for pointing out all the details to me.

Is there any difficulty into getting your code to a TGE version? I'm really looking for tentacle like trees. 8-)
#7
03/12/2008 (4:10 pm)
Yeah, there are difficulties. :-) Not so much getting them into TGE, as getting them running at all. But don't worry, I'm looking forward to tentacle trees too! Keep an eye out for my next blog.
#8
03/12/2008 (4:35 pm)
@Stephan - yes Chris is right, suicide is forbidden in judaism, so the 10 men were chosen by lottery to kill their own friends/family. These 900 men, women and children had held off the 10th Roman legion (about 10,000 troops) for over 3 years before the romans broke through the wall. They only chose the 'suicide' death in the end, because they refused to be turned into slaves.

And btw, if you ever get a chance to hike up the "snake path" to the mountain, it's brutal but well worth it. Great place to make your last stand.
#9
03/12/2008 (5:21 pm)
The snake path is awesome, it's a nice climb! I went up that way and then down around the long way, down the cliff and past the roman walls. Very cool place. (Lingering ghosts of violent conflict and death notwithstanding.) :-)
#10
03/13/2008 (10:29 pm)
Hey bud, great to see the progress.