Tuesday, 22 July 2014

One Of Those Bugs

A good day of bug tweaks and fixes, but some 30 minutes before the end of my working day I hit one of those 5 minute bugs that turned into an hour, and then ate into the time I should have left the office. You get them from time to time, and it's always just one more quick code line change and you're finally done. Well in hindsight it was top ambitious to introduce physics weights and frictions and expect it not to screw up every other aspect of the physics system, and fail to achieve the original fix in the process. Phew!  Now 30 minutes past the hour, I've decided to cut my loses restore the functionality that was in before but keep the code that I will need to return to at some point. I think the bottom line is that setting the mass of the physics object AFTER the initial creation takes more than a single line of code, and the actual values involved are themselves a mixed bag. It seems I was scaling the dimensions of the object down, but in doing so the new smaller values when multiplied produced even smaller results, making the 'volume' measurement meaningless, and yet this value is being used to control the mass in the present physics objects. It is not supposed to work, but it is?!  I will need a fresh day and a fresh brain to think through this strangeness, but for now I am going to start the build, test, installer test, process which I should have started an hour ago and hopefully finish before too long.  Also the jump seems to have gotten itself broken in the last day or two as well, which is another odd thing. Was it me, or some other check in code?  We will see in time!

No pictures today as simply no time to do anything visual, it's all been deep dark code work, which does not make for great screen shots!  Often I continue coding while writing my blog, and in doing so I just discovered why the jump stopped working. It seems when you entirely switch the water off, the jump code was being skipped. I changed it to allow jump if you are above the water line OR if there is no water in the level, that is, you can be in a deep ravine that used to be under water but jumping is now allowed.

Hopefully the build will pass the quick test and we can get it out to the internal alpha testers to see if it's heading in the right direction, that is, once I've tested my own code, checked in the teams code and tested that too. Phew!!

No comments:

Post a Comment