As a rule, I assume that there is a physical engine that will be portable. There would also be gaming systems such as health, inventory, NPC behavior, etc. Would be platform independent. Most likely, you will have to rewrite the rendering mechanism depending on which console the game is intended for. User interaction can be slightly rewritten due to the need to interact with another controller, which is likely to be available differently in each console.
In general, if the code interacts with the console API, rendering, vectorization, user interface, input, etc. must be rewritten. Basic code, such as physics, basic behavior, Ai, and stockpile management, doesn't really need to be rewritten.
So, at the end: If it depends on the equipment, it will need to be rewritten or reorganized.
source share