Wednesday, November 16, 2011

The bug

Blam these pesky bugs! I'm ATM wrestling quite ferociously with one of them in my current game project. It seems that it's no trivial manner to move everything on the screen just right so that it appears that the player is going past everything else instead of vice/versa. This is a fairly standard game programming thing, usually called scrolling. I've never had any trouble with it before, but there is just something about this time that makes the thing more error prone. I may choose to go with SFML's built in 'view' class, but we will see how this pans out.

School is making a killing off me at the same time, so hacking through this bug might be a bit difficult. I'm considering coming back to it later, and starting on some other part of Infiltrator. Perhaps a break will give me a useful new perspective.



  1. How is this coming?

    It often helps me to write out a detailed description of the bug, including: 1) the specific expected behavior ("X *should* happen..."); 2) narrowing it down to a list of repeatable steps which consistently reproduce the unexpected behavior; and, 3) the specific UNexpected behavior ("Y happens instead.")

    Also, I know you do your development with eclipse... do you make extensive use of the debugger? Narrowing the behavior down to a file, function, and eventually even a line number can be monumentally helpful.

    With all the books they have on coding, you'd think they'd talk a little bit more about debugging, since it's like 75% of the process.... unfortunately, I've only been able to find 1 or 2, and I can't tell you if either of them are any good because they're so expensive. ;P

  2. Right now I'm looking at one where an XML parser gets out an XML tag but when I look at what's between the opening and closing tags, the parser thinks there's nothing there (null) when I know for a fact there is. Its really frustrating.

  3. @Abraham

    I make extensive use of straight gdb, it does not seem interested in cooperating with Eclipse. I know which FIVE lines of code the bug is in.

    I'm trying the route of bending the 'view' class into place with my engine ATM, and that's about 50% done.