I'm not sure if this really belongs in for beginners, since it's not really a beginner question. However I feel like I'm a beginner due to my ignorance when it comes to cross-platform development.
---
A friend and I have finally finished building a fully working prototype of our 2D game (we still need to produce some more content and assets, but all the mechanics are there).
We set out to develop the game primarily for the three major mobile platforms (iOS, Android, Windows Phone 8) and the Windows Store, with Windows (non-Store), Mac and Linux as a secondary objective. Unfortunately, we didn't really think about how we were planning to achieve this in the beginning.
Ideally I want to avoid using a "write once, build anywhere" engine as I want to avoid licensing fees and this is our first time trying to go cross-platform so I'm hoping it will be a good learning experience.
Thankfully our prototype has been written so that it should be easy to seperate the code for the game mechanics and the graphical display.
I think I've identified a set of technologies that will allow us to re-use the majority of code accross all/most platforms, but I was looking for some input/advice before we set this in stone and start re-writing our prototype.
Window Creation/Input/etc.
Some platform specific "glue" (i.e. Java for Android) to create a window, handle input etc. built for each platform.
Game Mechanics
C/C++ (Compiled separately for each platform, preferably straight C if we can get away with it)
Graphics
Windows Store/Phone 8
C++ & DirectX
iOS/Android
C/C++ & SDL
My first set of questions is that we're having difficultly determining if this approach will work for the Windows Store/Phone version, specifically:
- Can we reference external C libraries in a Windows Phone/Store app?
- If not, will we have to re-write everything in C++/CX or are we able to use regular C/C++ for the generic parts?
The next question I think is more a symptom of my own ignorance of C++/Objective-C more than anything else:
- As C++/Objective-C are supersets of C, if I write straight C, can I simply compile it as C++/Objective-C on the platforms where that is required? This seems like I'm asking a really stupid question here, but I just want to make sure I'm not missing something.