Yet again I find myself working on so many things at once, that I couldn't get a new stable and finished build. So new features/changelog:
- Implemented basic INI file settings. C# uses XMLs more and I might migrate to XML, but now there is an INI file in the game folder that holds a lot of common settings. A lot of the in game variables are now loaded from the INI so I can tweak the game settings without recompiling the game. Also, the INI is hot-loadable, so you can edit it and the game can pick up the changes without reload.
- Light and material information are now stored in more advanced classes, that know how to talk with the shaders and get their parameters from INI files.
- Worked on world scale in order to give the world its final and consistent scale.
- Implemented ray-casting picking. Using it I created an experimental system for placing items in world without having to drop them from heights. You want to have item placement as smooth as possible Imagine that you are decorating a shelf and placing a bowl on it an this causes everything to be blown away, like sometimes they do in Oblivion/Skyrim. Not cool :). The placement algorithm also tries to place items only on relatively smooth and horizontal surfaces, so you don't end up with placements that immediately get changed by gravity. So you can't place a barrel vertically on a wall. The system is far too finicky at the moment of writing, sometimes refusing apparently smooth surfaces, other times placing items on a much too highly inclined surface. There is also now an extraordinarily ugly cross-hair for better spacial awareness when placing objects.
- Take a look at this terrain:
Hmm, it seem to be using a single texture. Which is actually quite a good result. There are no obviously repeating patterns thanks to the shader I talked about a while ago. But why is it only using a single texture? Well I updated terrain to support custom texturing, so the texture of a zone is no longer tied to its height. Sure, I'll use this setup for initial terrain, but then you can change it. Using the cross-hair, I wrote hello on the terrain with grass:
The resolution of the terrain is not that great and texturing is tied to the resolution, so here is how the "H" looks from close up:
I think I did these screen shots without normal mapping, but normal mapping still works.
- Terrain editing. Because of the low resolution of the terrain, I am yet to find a good algorithm to smoothly edit the terrain, but it is still doable:
You can also reduce the height of it: