A downloadable game

About the Assignment

This assignment is about creating a way to make my game interact with an external software. Using Maya to create the geometry files for our game.

Controls for movement

WASD – Move the Camera in respective direction

Q – Zoom in camera

E – Zoom out camera

Arrow Keys – Move the sphere in corresponding arrow direction

Screenshots


Screenshot of my game showing the white plane, a sphere and a torus

How I finished the assignment

I followed the same way as in the assignment description. First Installed the Maya and setup the necessary environment variables. Then hooked the given MayaGeometryExporter project to my project. I was able to create the plugin without any errors in the first attempt itself. I created a plane geometry and checked if its written to the geometry file in the way I wanted, it did. The rest of the assignment was easy, I created two more objects and updated AssetsToBuild Lua to build my new assets. The last part was to enable the depth buffering, this was easy once I read the cRenderState.h file. One thing I had difficult was setting the origin of an object in Maya to render it at the position I want in my game.

References and Dependencies of the MayaGeometryExporter

I haven’t added any references to the MayaGeometryExporter. I thought of adding the MayaGeometryExporter as a project dependency for BuildMyGameAssets but it didn’t make any sense coz it is not depending on it. To be honest, none of the projects in my game need a reference or dependency to MayaGeometryExporter. It is just an external plugin generator which we need to get stuff from Maya.

Unused data from Maya

I haven’t exported the normal, tangents to my geometry file. As to why, I didn’t find any reason to. If I’m not gonna use them, then I’m not gonna export them. If I want to export them in the future, I can make it happen by changing the code to accept these values too. For now, I wanted the Lua file to be simple, without any unused data.

 

Plug-in debugging



Screenshot of debugging the plugin

 

When I tried to load an object with too many vertices, it took a lot of time to load. And when I gave indices more than 65535(which is more than uint16 can hold), I was getting an error of read access violation, I store my number of indices in a uint16_t. I believe that’s the reason why it is happening. It worked fine when the number of indices is less than 65k. So I added an assert statement which checks if there is too many indices to draw. This way I’m preventing it to crash.

Download

Download
Download game here 303 kB

Leave a comment

Log in with itch.io to leave a comment.