Thursday, April 06, 2006

Perfection is the Enemy of Completion

It's true. So why must perfection be so damn attractive?

I've been thinking a lot about Vyde despite the lack of blog posts. The problem is that I'm wrapped up in creating an elegant system that I'm losing interest in building a game around it.

This is a trend that's showing up a lot lately. I'm finding I have to keep myself in check lest I get lost in problems that I arguably create myself.

Most recently, in Vyde's design, I've been wrestling with something that most other game developers would probably find trivial: a tiling system. How do I want to represent the tiles that makeup Vyde's playfield? How do I want to generate random patterns? How do I want to persist generated maps to disk?

OK, so those are the simple problems. Then I stem off additional problems from those: should tiles be composable? Should I be able to zoom into a tile and have it generate its own innards in a pseudo-fractal fashion? Could such a system be used to allow the camera to zoom into the insects crawling along the cave walls, allowing the player to see how the insects dig?

How should I build the system that generates and connects parametric, randomized geographic features? Considering I want to be able to hand-craft special rooms and have the game consume them, and that I want to be able to apply "random" features as the game chooses, does that demand a common superclass? Assuming it does, do I need to come up with a "painting" paradigm that is analagous to the way you paint onto a Bitmap object using the Graphics class? Should I develop an "applicator" class that applies features from a factory into a region I specify?

How are regions connected? Do hand-crafted rooms need to have connector regions specified so that the random tunnel generator knows where to "connect" to the room? And how to I plug in different tunnel generation strategies into the generator? Is this a job for a factory pattern or a strategy pattern? Or both?

And if a room is placed on a seam between two sectors, is it the applicator class's job to figure out what to draw in one sector and what to draw in another?

And what happens if the room has some kind of special behavior attached to it? How do you reconcile the room being split into two pieces on the map if it spans multiple sectors? If the tiles are composable and every tile has its location specified as an offset from its parent tile's upper-left corner, then is a room really a subtile located at some offset from its parent? Does this demand variable-size sectors?

And if so, what are the implications of drawing graphics if their coordinate system is variable? If the world runs in all directions infinitely, how do you specify a coordinate system using finite numbers, and how can you nest coordintae systems to facilitate the zooming mentioned above? The "world tile" might have to be parented on-the-fly when the player crosses the edge of the last available tile...

Oh wait... how do you make a tiling system?


Blogger BlackTigerX said...

you are running into overengineering

4/07/2006 10:41:00 AM  

Post a Comment

<< Home