I’m developing a game that ideally would be released to multiple platforms, starting by desktop (Windows, Mac, Linux) and then porting to mobile (iOS and Android) and finally to consoles if the opportunity arises.
Given that there’s custom logic like different input methods between desktop, mobile and console and also each one might have their own specific way of presenting things like menus or even their own monetization options or whatever, how would I best handle this?
So far I’ve got three ideas:
- Identify the current platform and execute logic based on that
- Create platform specific branches in my VCS and make the changes on them to avoid having useless code and blueprints logic
- Finish one platform first (ie PC) and then move onto the next, creating a copy of the whole project and replace assets and logic as I see fit
Problem I see with identifying the current platform is that I’d probably leave a lot of dead weight blueprints and code, adding to package size and probably performance overhead doing all these checks, unless there’s some kind of macros that I can use both in blueprints and C++ to ignore certain parts of the code in the building process
Problem I see with branching is that my game is really simple and managing all these branches and merge-backs and all that would be cumbersome since I’d need to maintain several branches with only little differences
3rd option is the one that seems easier if there’s not that much custom logic, but this idea doesn’t really seem like a good solution, it seems like a workaround