0% found this document useful (0 votes)
39 views

Assignment13 Writeup

The document summarizes progress made on a snake game assignment. It includes screenshots of the game with updated snake and cockroach textures. It also discusses changes made to support multiple textures by loading texture file names from a material file and handling missing textures. The code to extract material data from the binary file is shown. Remaining tasks are listed like adding a score system and pickup mechanics.

Uploaded by

api-309107767
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views

Assignment13 Writeup

The document summarizes progress made on a snake game assignment. It includes screenshots of the game with updated snake and cockroach textures. It also discusses changes made to support multiple textures by loading texture file names from a material file and handling missing textures. The code to extract material data from the binary file is shown. Remaining tasks are listed like adding a score system and pickup mechanics.

Uploaded by

api-309107767
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Assignment 13

Below is the screenshot from my game when it loads up with textures-

As we can see I have updated the snake body with a texture and also the snake has a cockroach
object to eat now.

Show an example of a human-readable material file with a color image specified

Above is my material file with the texture for the cockroach. If we needed to support multiple
textures for our game, I would have texture as an array of texture paths (lua table).

Show the binary version of the same material file (a screenshot from a hex editor is fine if it's
readable)

Tell us what changes you had to make to deal with having two paths (the effect path and the
texture path)
I had to extract the texture file name from the lua file. Once that is done I had to also change the
extension for the file to .dds also in case there is no texture found I used the default.dds texture.

Tell us what changes you would have to make if you had to support more than one texture
I would just add the new texture in a similar way as the old one. However there would now be
two default.dds textures in the file if there is no texture found. i.e only the texture that is found
would be present. Since I will be extracting the texture files in the same order as I am entering
them, this shouldnt be a problem.

Show us the run-time C++ code that extracts the material data from the binary file

I am using the above code. I just use the strlen() function to get the string length and add 1 to it
for the null terminator, then I advance my all_data pointer by that amount so I can access the
next string.

State of my project1. Added many new textures.


2. Added a cockroach mesh which will be used in the game as a pickup to increase the
snakes body length.
3. Snake movement mechanics done.

Left to doAdding a score system. Adding a pickup system, adding UI for score. Randomly spawning the
cockroach so the snake can pick it up. Also if possible I want to rotate the camera so I can get a
better 3D perspective.

I originally started with red for both the snake head and the snake body. Now I made two
materials to make the head darker and the body lighter. As seen above it is working.

Tell us what progress you have made on your final project game
Not yet sorry. This assignment took a long time.

You might also like