Featured image of post Game Engine II Assignment06

Game Engine II Assignment06

The details of assignment 06 for eae6320.

Gif of My Game

Honeycam 2024-10-04 00-37-48

Advantages of Human-readable Asset Files

  • Creators can easily make formatting changes in the later stages;
  • Readers can quickly understand the file structure and what each section represents;
  • People who need to use this type of file can easily write code to retrieve its contents;

Mesh Files

Here is an example of my lua structure

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
return
{
vertex = 
{
{ -0.4, -0.4, 0.0 },
{  0.4, -0.4, 0.0 },
{  0.4,  0.4, 0.0 },
{ -0.4,  0.4, 0.0 },
},
index  = 
{
	0, 1, 2,
    0, 2, 3,
},
}

The reason I do it in this way is that it is a highly readable structure. By using keywords like “vertex”, the reader would quickly understand the usage of each block.

Screenshot of Debugging

image-20241004010018023

Game Sample

Download and have a try: MyGame

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus