Skip to content

February 1st, 2015

February 1st, 2015 published on

Starting to make progress on actually putting the new map system together. Still very early. A fair amount of the time consumed was due to building a feature more thoroughly than initially expected. Technically this feature was problematic in the last iteration, instead of properly integrating item drop offs in the new system I was just using the same system as several iterations ago. This meant item drop offs worked in a way that was very confusing for testers, but was close enough that it was an easy thing to delay doing properly. With the advent of the new system being so dependent on pass-by actions, it became necessary to integrate them correctly. Had to pull out the old code, make it capable of working in multiple places, etc. End result is we can finally have node actions that demand gold or items to use them, and quest drop offs can be done as a pass by.

The other big thing of the week is a bit more technical. Around 7 months ago after a driver update, lines between tiles in the game started appearing for me. There was no logical reason in the code for these lines to be appearing, and I figured maybe it was just a problem with the new drivers. Months past, and the issue persisted in every new driver update. Looking for answers online didn’t lead to much since I had assumed it was an issue tied specifically to the newer drivers. This week I finally set my foot down and decided I was going to get this thing fixed. After a whole lot of fiddling it became clear that the issue behaved differently depending on two factors: when you change the resolution of the window from its starting resolution, and when you use decimals in sprite positions. After I boiled it down to symptoms it finally became possible to look up solutions online. Apparently when dealing with floating point positions video cards can blur the edges of things to create a smoother movement effect. This is useful for moving objects, but terrible when triggered on static things like my map tiles. Even removing decimal positions for these static objects isn’t enough to fix it since it can also be triggered by things like having the screen size coordinates not match the texture coordinates (which occurs by resizing the display window). Different cards deal with the rounding in different ways, too, presumably the driver update made my AMD card start to deal with it in a slightly different way. The solution in the end is to add exactly .375 to these static object’s positions to force the rounding to occur in a specific way between all cards. Programming, huh.