**XCOM 2 Collection on iOS (2020)** # What Is It? I was a graphics programmer on the iOS port of XCOM 2 at Feral Interactive. I joined the project towards the latter half so most of my work was on fixing bugs and helping to get it shipped. The port used Apple's Metal API. ![Gamplay trailer](https://www.youtube.com/watch?v=xYxnh3CbuBg) # Graphics Work The game was heavily memory constrained and a lot of the optimisation work was done to reduce memory usage. I utilised Feral's existing ASTC encoding library and implemented runtime ASTC compression of textures that were dynamically generated at runtime by particular features of the game. The challenging part of this task was fully understanding the game code that was being modified and testing to make sure every edge case was covered. This optimisation ended up saving between 800KB and 1.5MB per texture. This was a nice win when we were fighting for every last megabyte. I also fixed a large amount of graphics bugs that usually manifested themselves as visual corruption. I used Xcode's frame capture and GPU debugging tools extensively to track down and fix problems relating to rare threading issues, edge cases in our optimisations, overflow in shaders and depth value inconsistencies between passes. # Other Work I fixed multiple threading bugs that were not graphics related, including deadlocks and race conditions.