While plodding along in the production of AetherFall, I’ve been working quite a bit using the game’s internal editor to start piecing together the levels. Instead of wasting my time cobbling an overly complicated GUI together for something the player will never see, I took the easy way out. Fore example, if I’m placing a bit of scenery and want to scale it, I hold down the S key on the keyboard and scroll up on the mouse scrollwheel. In the editor, the scroll wheel does the lion’s share of everything that isn’t simple dragging and dropping.
Only, for some reason, things wouldn’t always work how I wanted them. Continuing on with the scaling example, whenever I’d scroll up it would make scenery smaller instead of larger. “Oh,” I thought to myself, “I put ++ where I wanted –.” (In the C, C++, and C# programming languages these increase and decrease a value by one increment respectively.) So I switched them around and went on my way. Still, I seemed to be making this mistake an awful lot whenever I added new features to the editor. Every time I’d hold the key to alter something, scrolling up would decrease the value while scrolling down would increase it. “Oh bother, I’ve done it again.” And so I would go to fix it each time. But even for me, I seemed to be slipping up an awful lot.
It wasn’t until today, some weeks after getting the first parts of the editor together, that I realized why I was making the same mistake over and over again. Put simply, I wasn’t making a mistake at all, at least not in the code for the editor. After skimming through the code for handling the mouse my true mistake became clear: I’d coded the game to signal scrolling up on the scrollwheel as scrolling down and vice versa. 🙁