Note how the world is divided into a semi-regular grid of chunks; There is no requirement for me to have these chunks aligned to any particular shape, or even that they are a regular size. I could stagger the chunks in a honeycomb structure, or a dodecahedron, or any other 3d arrangement I choose. The jagged edges you see will be outside the visible region of the level, for example I could have a 1km viewing distance and load all sections within 1.128 kilometers to avoid any of these jagged edges being visible.
Furthermore, I can spawn the renderable node of any object which has a mesh available, into the world, and calculate its dependencies as per the chunks of level. This provides a few opportunities;
1) I can have a "brush" system for geometry that is repeated, for example, there may be several thousand lamp-posts.
2) I can have dynamic objects in the scene, such as things which the player may use to whack zombies, held within a database. These may use the same meshes as dynamic objects, allowing me to have a larger and more detailed world, with not all objects physically active.
3) Every time a new section of the world is revealed, the database can be queried for dynamic objects that occur within that section of the world. These objects can then be spawned and moved around, and their dependencies (meshes, materials etc) will be dealt with too.
Here is an image of a bunch of "anti zombie safety sticks" among other objects being spawned in mid air.
Thus far, they do not move and are not affected by gravity, since there is no physics system as yet. I've not totally decided which physics system I should use. I have experience with Newton and Bullet, both of which are suitible. However, I've also considered PhysX and havok since its far easier with these engines to make and calibrate vehicle physics. Any insight into this would be appreciated.
Tommorrow, I'm going to lay the foundation of the "world logic" system. This will have two things that I've not done before, but are important to any game developer;
First is a database of object prototypes and their properties; I'll talk about the version of the factory pattern that I've come up with for dealing with this. I hope to have the "factory" for dynamic objects (im calling them "Things" at their most abstract level) loading from an SQLite database that I've created.
Tomorrows exercise: using SQLite, load the "Thing" prototypes from the database into a map of