We really weren't dead! We were just refactoring our whole lives and game engines.
Soon I'll get the new engine up to the state that the old engine was in.
- PLANEWALK: Built in world testing tool (note: not world EDITOR, System's worlds are either generated from plain files that can be edited without special software, or from algorithms whose inputs can be altered without special software.)
- MODELVIEW: Built in model testing tool. View and test models in jar and out of jar; reload them as you tweak the settings and image files until you get the right look and feel.
- GENIE: Game Engine is an Emulator. Based on the way the game modules are programmed, the system functions somewhat like MAME or a console emulator. For instance, while working on a title, you can place links in the configuration menu to go to PLANEWALK and MODELVIEW (or any other tools you need, such as the upcoming ARENATEST.) You can also include multiple games in a package.
In general, the new engine is far more sane and better organized. The 'ip' directory fundamentally assumes you will start by creating a title driver (ip.gamename.GameName.java for example) that extends the Game class. You can then load it by passing the command to the init state title=GameName. I don't yet have the ability to find and include an external jar, partly because I want to have versioning more fixed before that point, and also I want to fix some points of the API more firmly so building modules doesn't require insane refactors just because I wanted to change some underlying behaviors in the main game I'm building.
I've moved over to 'sprites' instead of regular 3d models for objects. Regular 3d models are still possible, so long as the 3d model class properly interacts with the ModelController and implements the Model interface. I don't currently have a means to easily add new model types to the ModelFactory and I'm also trying to work out the degree of stasis for Model assets. In short that means, if there are fifty goblins are there fifty goblin models, or just one model asset with fifty instances of settings?
The latter is better but complicates models because you have to determine what parts of the model should be static and what should be hypostatic (i.e. specific to the individual instance.)
The biggest breakthrough is that System's world system should be flexible enough to be used in a variety of games, despite being 3d-grid based. Warping the grid or the points of the grid for individual blocks according to simple rulesets (in the block's geometry method) that result in VBO (vertex buffer) friendly geometry is easy.
By maintaining a central thesis that the 3d-grid world is superior we eliminate a lot of 'what-ifs' and guarantee that the world is as destructable/constructable as necessary according to the game.
While I have simple lighting created, I will not do as I did before and maintain an exhaustive list of what lights are at each point, with their direction. In any case, there is a relationship between the physics light class utility and the lightmap interface, however the lightmap interface is implemented is of less consequence than whether it works or not. I found that liquid light, which is light as a simple fluid-spreading automaton, has a lot of advantages and few problems.
- It automatically creates the feel of reflected light
- It is simple to regenerate from a given point without reference to the originating point
- Small tweaks can make it behave more 'realistically' without breaking the bank computationally.
The nickname I give this automata, which I believe is similar in concept to Minecraft's light, is Liquid Radiance.
Terrain generation has started with cave carving. Cave carving involves three elements:
If you play Minecraft you may know how subtle and quite advanced Notch's cave algorithm is. It is potentially the oldest part of the code (the game started as a cave test) and therefore has probably seen the largest number of tweaks. I can't vouch for that, but it does seem to have subtly improved over time.
Digging involves a start and end point, a noisy brush, and the ability to iterate in a fully arbitrary direction without recourse to mathematical rotations. I have a sort of rudimentary form of this, though it tends to fall apart at angles close to 45 degrees, requiring some secondary filler carving due to the fact that moving 1 x, 1 y and carving perpendicular to this causes you to miss almost exactly half the blocks you want to carve. In theory the solution is to always move a distance of 1 (rather than 1.44 as in the 45 degree case I've shown) and let the carved position be rounded so that at all angles you see a smooth expression of the chosen brush.
Rooms are simple; they usually have four orientations (more is possible) and may be nothing other than a 3d primitive combination with some noise.
Chain reaction is the trickiest part, where as in the case of all Cellular Automata, starting values have far wider possible ranges than useful ranges. Unlike Minecraft, generated caves and tunnels will have abstract properties that will allow the generation of navigational nodes and a control over growth that will permit a wider variety of expressions. In some cases, to get some types of caves in Minecraft you'd have to put the caving algorithm into 'unsafe' ranges where it might hit a point of infinite regress.
Not all caves carved will be separate entities, some tunnels or rooms may be common to more than one system.