Can Cocos2D-Swift code written in Swift be ported to Android?

I am new to game development and I am very interested in Cocos2D-Swift, especially due to its Android compatibility. I know Objective-C code can be ported to Android, but can I say the same about Swift?

Thanks in advance.

+3


source to share


1 answer


Swift support for Android via the Android SpriteBuilder plugin is currently in development. However, there is no release date yet.

Since you're new to game development, I think it's fair to say that you can use Swift without worrying about cross-platform development at this stage.



It is more important that your first application works there, or just takes it to the stage where you are so hopelessly lost that you would rather prefer it again or a completely different project, taking with you what you learned. Personally, I find that every new game I start developing with a new engine is completely reorganized at least once during the development process only because of how much better you can work with the engine once you learn to use it (best of all).

If your application is successful and you want to port it to Android, but Swift support was not yet available and you really need a port, there is always the option to decipher the Swift code to Objective-C. It's pretty straightforward (albeit tedious), and if you're lucky, someone even made a Swift-ObjC two-way converter by this time.

+5


source







All Articles