Ok, first off, I just have to say my new all-time favorite recently discovered funny/witty/hilarious domain name of the week has got to be: RockPaperShotgun.com It doesn’t really matter what the site is, the name alone is entertaining enough – just plain hilarious.
Eskil Steenberg, an early contributor to the PicLens concept design team, is back in SF this week for GDC (Game Developers Conference) to demo his latest labor of love – a multiplayer online alternate reality named, aptly enough, Love.
The word “game” just doesn’t do it justice. In true Eskil fashion, Love has a visual look that is just plain otherworldly. Eerie. Mystical. Surreal. See for yourself:
The problem with screenshots is that they fall so far short of conveying the full sense of a living, breathing scene rendered in realtime. You can get a sense of Love’s impressionistic look from this photo, but you’re missing the dynamics of the scene in motion. Stuff is moving out there! Wisps of fog ever so subtlely curl and creep through the scene, between and around the objects in it. Dust motes bob in the air like a hayfever nightmare.
Love is impressionistic, a style quite alien to our visual cortices so conditioned by pixel-perfect glossy hard-edged graphics.
One of the core tricks Eskil uses to build such a rich and stylized environment (on the fly, at runtime) is the use of procedurally generated textures and geometry. Procedural functions basically work like this: take a little bit of data and a deterministic pseudo random number generator, run them through a transform function, and out pops a tree or forest or mountain to whatever level of detail you need. Change the initial data just a tiny bit, and the output will be completely different – still a tree from the tree function, but a tree with a completely different branch structure and shade canopy. Conversely, if the initial data is the same in multiple calls to a function, you’ll get exactly the same output each time -repeatibility based on initial conditions.
There are two observations here, two sides of the same coin:
- A little entropy goes a long way
- The complexity we see in the world around us isn’t nearly as chaotic as you might think.
This stuff is squarely in my old college stomping grounds: Chaos theory. Fractal iterative functions. Nonlinear dynamics. The spooky end of the math shelf.
For a 3d rendered environment, the repeatibility of procedural functions means that you don’t need to store millions of pixels of image data on disk to paint a scene. You only need a few initial data points and a little CPU time to generate millions of pixels of repeatable image data on demand.
That’s great for reducing the file size of your game – you need only a fraction of the prebuilt artwork required by traditional games. It’s also great for super low-budget one-man shows like Love – you don’t need a small army of an art department to produce the gigabytes of static art needed by traditional games. (The majority of the millions of dollars required to produce a typical 3D retail game these days is spent on content production – artwork and modeling, not software development)
Procedural generation is far from a new technique. I distinctly recall playing the space adventure game Starflight in high school for hours, days, weeks… months! on end, mapping out star systems, exploring planets, interacting with alien races… in short, exploring.
(Why was I mapping out all the systems? Because I received the game secondhand, and somebody forgot to include the printed starmap that came with the game. I was shocked to learn years later that the game came with a starmap. “But where’s the fun in knowing where everything is?!”)
Nearly a thousand unique star systems, each with up to eight planets, each planet with its own unique geography and terrain. All this and more in a game that shipped on two 360k floppy disks!
How’d they cram all that detail into less than 720k? Procedural terrain generators. There was only enough room on the floppies to store program code. However, that program code could serve dual purpose: code and data. The code could also serve as the input data to pump through the procedural generators. Start reading at byte 100 in the program file to generate planet Xan, start at byte 101 to generate planet Ypsilon, and they’ll look completely different.
Procedural texturing is nothing new but in Love Eskil has taken it to a high art.
Jim Rossignol wrote up his impressions of Eskil’s Love on RockPaperShotgun. Don’t miss the pants-wetting accolades in the comments gallery!