From Streaming Day 11

    1. How to make code cross platform
      1. Using preprocessor and Compile Time Pound Define
        1. Not legible, for both users and creators.
        2. It assumes that the control flow of your program is shared on all platforms that you will ever ship on.
      2. Using a virtual abstract layer to eliminate the difference between different operating systems, so that the actual game code can call one single unified layer to finish all the operations.
      3. Instead of the platform layer being a series services to the game, we consider the game as services to the operating system to produce the graphics and sound to play the game.
    2. Unity Build: Only have one conceptional translation unit.
      1. No need to have a complex build system.
      2. Fast.
    3. While doing including, put as much your code before platform specific headers as possible, so that you can make sure your code is will isolated from platform code.

Leave a comment