Sunday, September 7, 2014


No matter how simple your game is, or how well you plan it. In any case it is 110% sure that there are several bugs included in your masterpiece. And fledgling game developer surely has more bugs than the experienced ones. :) Here are my thoughts of this matter.

Major and/or often occurring bugs are usually very easy to detect, and they are relatively easy to find from your code. You just need to find (or know) where certain functionality is located in your code and check the difference between desired and existing operation. Fixing the bug might not be so straightforward, but at least you know fairly well where the fault is.

But then there can be very nasty bugs that occur rarely or even randomly. Sometimes it is very hard to understand if some behavior is really a bug, if it can't be easily reproduced. And locating these bugs from your code is very difficult if you don't have clear idea where to look for them.

Luckily here are some ways to ease up bug hunting. I am using very often a method where variables likely to be related to the bug are simply printed on the screen continuously. Then it is possible to see how variables behave during the gameplay and that helps so resolve the problem. The method of implementing this approach is tool-dependent, but it should be possible no matter which gamedev environment your are using.

Game development tools migh also have different ways to ease up debugging. I have found out particularly useful the feature where collision boxes are made visible. Each collision can be seen visually during testing when that feature is on.

In general, debugging a game might require a large amount of creativity and ingenuity. There are some ready-made solutions available, and using them may make your life easier.


No comments:

Post a Comment