add possibility to toggle wall draw height
Finally one can see what happens behind those high walls.
Ramblings about hobbyist game development
add possibility to toggle wall draw height
Finally one can see what happens behind those high walls.
– implement support to render wall tiles into the renderer
– fix up the generation of wall model data
Adds all the boilerplate code to render walls to the renderer. This also includes fragment and vertex shaders. The world becomes decidedly more three dimensional now.
more refactoring, renamed floor to tile(s) in the renderer
This makes the “floor” term disappear completely.
rename the floor to world, as it more aptly describes what it is used for now
The Floor is dead, long live the World. Rename the entire class and all its references.
– finish the code to create the wall vertex data
– fix and make the logic dealing with the internal data representation more readable
– add more comments
This finishes up the first iteration of the wall vertex generation. It also adds new enums that were raw integer value before.
The internal data had some logical overlapping problems before, as setting putting a wall on a tiles BOTTOM position implicitly also put a tile on the TOP position of the neighbouring tile. A simple mapping to fix these problems was introduced:
– use fewer magic values
– start writing of wall vertices/indices (still very much WiP)
– some more comments
As it says. The newly generated vertex data is not used by the renderer yet. Turns out it is more complicated to generate wall vertex data in comparison to simple tiles.
fix drawing after re-setting floor dimensions, improve debugging output, style changes
Does the above and also adds the implementation of the aforementioned WallManager – the file was apparently not staged to be added in the previous commit. Similar to the TileManager it is intended to keep a state of all the walls that exist. This change also includes a WallType, similar to TileTypes that define basic properties like a name and file path to the texture selected. The WallManager adds two additional dimensions though that the tiles do not care about:
By default a single WallType (“blank”) is defined which sports a concrete texture. Internally, when a wall is being added we merely add this default type on both sides (see above) to the wall data. If the wall is being removed the value is set back to 0. Assigning a new WallType (or in gameplay speech) putting a new wallpaper on a wall means resetting it to 0.
enforce the right texture sizes when loading tile data and make the tile manager a little less verbose
That is what it does, but it also adds the beginnings of the wall (as in the vertical counter-parts to floor tiles) book-keeping code (no renderer code yet) to the Floor class. What that means is more detailed are functions for getting vertex data (non-functional), calculating a wall state hash and references to the yet almost empty WallManager.
The wisdom of this is more than questionable and it will in all likelihood get moved elsewhere.
simplify CMakeLists.txt
Does it what it says. But it’s also doing some minor code re-formatting. Nothing to write home or blog about though.
WiP approach to get real y values for objects on non-even planes
Tries to do a better job at determing good elevation for objects that cross non-even planes (tiles).