Its the lead-up to finals week, and I haven’t gotten a lot of time to spend on the game, what with my mathematics and engineering classes really picking up steam and utterly swamping me. However, I have been able to switch our game from the staggered isometric view that we’d been using to diamond isometric projection. For those not familiar with this terminology, here’s the difference:
Ignoring the fact that I’ve lazily pulled these images off of Google Images, and so they have a different format and style, the main difference between these two projection methods is that staggered is rectangular in overall shape, creating a flatter image with less obvious depth, while diamond is in the shape of a diamond, a skewed square.
More importantly, however, in the staggered isometric coordinate system adjacent tiles (either diagonally or orthogonally adjacent) are actually not adjacent in their coordinates when projected on a flat map. Moreover, there is no consistant line of coordinates where all the tiles where x=0 are on one row, even a zig-zagging row. Instead, coordinates are strangely grouped in twos throughout the map. In fact, many visually adjacent tiles have both coordinates changed going into another visually adjacent tile, making it very difficult to programmatically match up what the player is seeing with how the AIs and algorithms see the map. Meanwhile, diamond isometric is far more regular— all the tiles that are visually adjacent are also adjacent in coordinates, both diagonally and orthogonally, and everything is organized in simple rows. This makes actually seeing how the program sees the map from the player side much, much easier.
The reason we decided to make the switch now was because I was trying to debug an issue where the AI couldn’t pathfind to places that looked obviously reachable to me, and I eventually realized that the internal coordinate system didn’t match up at all with what was being show to me as a player, graphically. Moreover, the drawing and unit conversion code was complicated by several orders of magnitude to adhere to the staggered isometric system as it was so I made an executive decision to make the switch, with no small amount of “I told you so” on my part— the idea to use staggered isometric was Will’s idea. As it turns out, however, he’d been rendering the graphics in diamond isometric projection anyway, so the annoying seams between tiles we’d been dealing with for a long time went away as well.
I’ve mostly completed the switch to diamond isometric, some minor testing and such is all that’s left. On a side note, I’ve actually switched from a MacBook Pro 2017 15″ to a Dell XPS 13 9370 Developer Edition (with maxed out specs). The reason for this is that I’ve really been feeling the limits of MacOS as a longtime Linux user, and was ready to return to the Linux world, especially seeing as how its improved since 2012. Yes, I’ve lost 2″ of screen space and a discrete GPU but I’ve gained a better screen,a faster CPU, a more developer-friendly and flexable operating system, a touch screen, a better keyboard, and most importantly, a longer-lasting battery (I was getting barely an hour of battery life with the MacBook vs 12 hours of heavy programming on the Dell). I’ve never needed a discrete GPU, honestly, and if I do need one an eGPU is totally doable with Fedora 29 (the Linux distro I’m running). I’ve heavily customized my GNOME Shell installation, even editing the CSS of the window manager and GTK theme, and I’m very happy with how everything worked out. HiDPI support is amazing, and everything just worked out of the box, including the touch screen!
In order to get the game to run on my very HiDPI laptop screen, the game now supports HiDPI and GUI scaling out of the box, and it will automatically adjust and detect the DPI of any screen its run on.