I started the project only when I changed my new company as a client, and the engine was using ogre. It was so happy that I could study ogre at work.
The first step is to make the terrain editor.
Using Qt as the interface, MFC completely abandons it ~~~
For the time being, I only focus on ogre.Code, The QT interface is thrown to the team members and then combined.
Because it is a fixed-angle 2D/2.5D game
If you do not consider the level of detail (not the page), you only care about the number of textures on the surface. A terrain can contain hundreds of pixmaps for puzzles.
The idea is that the terrain is partially self-rewritten without mesh and manualobject. Ogre provides the factory mode to generate various objects.
Implement the terrain tile to inherit the movableobject, and set the rendering queue to determine the Rendering sequence. And provide various functions for the terrain,
For example, terrain detection and box trimming
Similar to tianlong, to achieve multi-textures, grid is used to store grid data, and terraindata is used to store the data of the entire terrain.
It also provides serialization functions to save and read binary files.
Tile can be divided into tileeditable and tileoptimzied. They inherit Tile
The tile that can be edited is mainly used for the editor, while the optimized tile is used for the client.
~~~ The terrain section has basically been completed, and other objects in the scenario have not yet been done. The prototype of terrain editing can be completed years ago ~~~