Wednesday, March 29, 2006

Town generation

The town generators taken a clumsy step forward but it's still needs a little polish at the base level. Also I haven't even started on buildings, infact it's taken one and half days to knock the first item off my to-do list, it seemed so simple as well ...

Metadata is still non-existant for the city, and I'm happy to ignore it for now. It will be needed later but it's a bit too scary for me to have a go at yet. Nest up is building generation which I think with be certain kinds of exciting box for now ... though it would be cool to grow buildings in a fractal way like using the Koch one for walls.

The priority is getting towns out of the console into the world of loving 2D textures.

EDIT: A little later

I'm now onto building generation.
I want to know a couple of things but basically when I'm in a building, or something is in building. This means the building needs some type of region data.

(I could just mark things in when they pass through one of the doors but what about teleporting and that type of thing - region intersection is best.)

It would be boring world if all my buildings where square blocks, therefore I need to generate the buidling region in some sort of bounding polygon. I'm guess this is pretty easy and I'll just have some the scurries around the inner outline of the building and marks points where it has to change direction, and there's the polygon.

As for the buildings themselves... how to create interesting buildings? I thought maybe sometype of growth.


###
# -> # # -> ... continued growth and deletion of it's self.
###


A cellular automata approach I guess. Or I could slap together premade parts like circles and squares.

Also I thought of throwing out four or points, that must land some certain distance apart and then, join those points up with lines. That could give some interesting buildings.

EDIT:

Also partial tests seem to me, the most logical place to put unit tests. What them in big #ifdebug and forget - access to all the private methods, so they can easily be tested to without having to make everything protected, if your going to inherit from the class, or worse internal or public. Currently my tests are in totally seperate but I don't think they will be for long.
Post a Comment