top of page

My views on Assignment 9

Game Screenshot

Capture.PNG

Human Readable Effect File

EffectLua.PNG
  • I decided to just store fragment and vertex paths, for now, later I think I might add other information if I want to make it more flexible for users.

Binary version of the Effect File

BinaryEffect.PNG

Explanation

  • The first two bytes are the size of the fragment shader path that I use to when I read the file while running the game. This helps me figure out where the vertex path starts.

  • The next two objects are the fragment and vertex paths.

  • I attach substring "data/" as a prefix to paths before writing to a binary file in order to avoid doing this at runtime.

    • Doing this will help reduce the runtime cost. That means my loading of binary files and creating effect will be faster, saving lot of runtime costs in case of larger systems.​

    • The disadvantage of this is having a larger binary file, which also can be an issue if I have more objects like shaders on a bigger effect file.

    • At this point, I couldn't think of any clear reason and I had to sacrifice one so I choose to go with this option.

How do I read the data at runtime

  • The following is the screenshot of code snippet which shows how I extract data at runtime.

read.PNG

Instructions to install and play

  • Unzip and run the exe file

  • Arrows to move the object

  • W S A D for camera movement and G H for zoom

  • Control and shift to switch player controller and shape of an object

bottom of page