Jordan's Log: Week 3
- Jordan Sanderson
- Feb 21, 2017
- 2 min read
Throughout this week I’ve been reworking my design and code for my strategy game to suite my clients’ needs. I ditched the antibodies and instead worked on ways for the cells to fight back against the viruses. I personally think this is a much better design for my cells than my original, but the coding has been very spaghetti. I’m working with enums for my cells now as each one can evolve into many different types. Unfortunately, this leads to long if statements and very messy code. Also somewhere I’m getting stuck in an infinite loop which completely halts the game and has been hard to even find what is causing it. It would also be easier to debug it if it happened often, but it is very rare and completely random when it shows up. After completing the reprogramming, I realized that if I wanted to code something before the milestone build I would have to do something small that wouldn’t break the codebase when we joined if it didn’t work. I started coding shaders to suite my needs since Unity’s base shaders aren’t the best for what we are doing. Unity’s base shaders are made for modern console or pcs, far too expensive for our project. The mobile shaders use lighting and shadows, but don’t have both colors and texture. I also want only directional lighting for my scene specifically. I’ve written 2 working shaders so far, both have textures and colors but one has instancing. I’m trying to write one right now that only uses directional lighting, but the sample coding they have is very expensive and hard to piece apart. I’ve only written shaders in hlsl before while Unity by default uses NVidia CG, but uses a Unity wrapper. Learning not only NVidia’s coding, but Unity’s as well has been a pain, but I’m making progress. Well I’ve got a lot cut out for me next week, and that’s it for this one.
Comments