theInsomniacGameMaker

View Original

If It Ain't Broke, Make It Perfect

For our 4th Project and Portfolio class we had to make a 3D scene in DirectX. We had learnt only a little bit about DirectX up till now. Though we did have a FBX model loader implemented. Everyone in the class was using the that FBX loader. The FBX loader was in just one ‘cpp’ file.It was not segregated and not setup up for for multiple file use. When the class started I decided to take out time and clean the FBX loader. I segregated the code into a ‘'header’ and ‘cpp’ file and I made it modular for reusability. First I was a little hesitant because I knew it will take a significant amount of time and in that time I could work on another feature. I also knew that moving code around code really mess up the code base and it will take a lot of time to fix it.

I dove into it regardless. It took me a while to figure out the kinks and problems, but I had successfully made the FBX loader usable in my project. At the end of the class I had broken the record for the number of features ever implemented. I didn’t realize how crucial cleaning up that code would be, but having a 3D model loading gave me a head start and allowed me focus on features like Normal Mapping and Render to Texture.

I learnt a lot of techniques in that class and at this moment programming using the DirectX API is my favorite thing. Just a little extra effort gave me a head start and proved crucial for my project.