use a special vertex shader for the floor that does not include the dynamic uniform buffer
This adds a new, second, vertex shader for the floor, as it has different requirements than the one used for drawing models.
Ramblings about hobbyist game development
use a special vertex shader for the floor that does not include the dynamic uniform buffer
This adds a new, second, vertex shader for the floor, as it has different requirements than the one used for drawing models.
fix the tile manager ctor and fully initialise the floor. the renderer does not use that data yet.
Once again, comes as advertised, getting closer and closer to actually draw the floor.
– add state hash calculation to the floor class
– automatically come up with new ids in the tile manager
– initialise the floor a little further (WiP)
This actually implements the floor hash calculation so updates can be detected by the renderer. Also, similar to the ObjectManager, the TileManager now dynamically adds new TileType IDs when adding new tile data.
As a proof-of-concept the GameState now manually adds the first tile type (which is called floor) so that the rest of the code can properly initialise (looking at you, renderer).
make the Floor class more complete (WiP)
This adds a new set of (safe) setters to the getters of the previous commit. It also adds a still empty state hash updating function.
get elevation by tile WiP
This commit adds some functions to safely get the elevation of the height map at a given tile (coordinate).
expose the whole tile manager through the floor class
Well.. yes. As it says on the label.
– add the tilemanager (WiP)
– bring the renderer closer to actually rendering the floor (WiP)
– experiment with smart pointers a bit (WiP)
Adding the concept of a TileManager (similar to the TextureManager) which in turn manages TileTypes. The floor class is extended to know which logical tile is of which tile type, on top of the raw height map data.
As also mentioned the support on the renderer for the new floor concept is being further fleshed out.
Lastly, some references and raw pointers have been replaced by smart pointers (std::unique_ptr/shared_ptr).
WiP: Add the concept of a floor (that includes a heightmap + tile logic)
This adds the “floor”, which is fancy way to say “wrapper around a height map”. Additionally to that, the floor can also, similar to the model manager, return vertex data which then in turn can be used by the renderer.
This commit also included a lot of (boilerplate) code being added to the renderer in order to draw the floor/height map.
– implement rotation towards current movement target
– implement zooming in and out within a certain range
This commit is more or less self-explanatory. Things rotate. You can zoom. Works as advertised.
add rudimentary change of positions and rotation
Building on the previous work of the object state updates, this properly introduces the concepts of logical tile position (as opposed to geometrical position) and rotation.
Furthermore, objects now also have a current speed can bet set to move to a target tile. At this phase, that means rotating towards it and then moving directly in that direction, no pathfinding is involved.
The result can be seen in the video below.