The Assignment:
In Assignment 6, I added a new static function to my Mesh class, so that it can read information from customized mesh files and create mesh object accordingly.
The Results:
*Same as Assignment 5*
A Windows application that renders a square-shaped mesh in a window where both the camera and the mesh object are movable.
Control of the game: Hold W/A/S/D to move the camera up/left/down/right. Hold Q/E to move the camera forward/backward. Hold arrow keys to move the mesh up/left/down/right. Hold Ctrl key change the mesh of the game object.
The Game at the default state
When the Camera and the Object Moved
When the Mesh of the Game Object Changed
Advantages of Having Human-Readable Asset Files:
The biggest advantage in my opinion is that it is friendly to the users. For people not familiar with the engine project, they are still able to understand how the file works so that they can edit the existing files or even add new ones to get the desired result.
Even for the engineers who are working on the engine, they get the advantage of easier data processing, which potentially gives the data processing code better readability.
Mesh Files (.mmesh):
I used “.mmesh” (stands for my mesh) as the file extension of my mesh file format.
The format of a .mmesh file is basically a Lua table containing two Lua tables.
The vertexData table is a list of vertex data. Each element in the list is the information (position and color) of one vertex.
The vertexIndices table is an index array which holds the index references of vertices in a mesh.
Debugging Build Tools: