Swift integration in console gaming

Hi everyone! I am working on swift 3 and I would like to know if Swift can be used in making console game development. Other than the SpriteKit or SceneKit, can Swift be used for developing games for console. Can Swift be integrated in engines like Unity, Unreal Engine, Frost bite etc. or Apple has any future plans getting hands on the console gaming in swift. I am very passionate about gaming & I would like to develop AAA games. Languages used are C, C++, C# etc. are commonly used but as Swift is developed bu Apple, can this language also be used apart from the apple devices(iPhone, Mac, iPad).

Replies

Hi Altavista,


As far as I know, only Apple hardware supports Swift-based binaries (for now). I have heard that Google is working on making Swift work for Android-oriented hardware https://news.realm.io/news/swift-on-android/


However, you can still be a triple-A game developer by writing games for MacOS, especially thanks to the upcoming support for external GPUs. Your games can be distributed through the MacOS App Store and Steam (exclusively for Apple devices). I think you'll find over the next few years that the triple-A gaming market for Apple products will expand, especially with their support for HTC Vive and VR based games.


Fun fact: Doom was developed on a NeXT computer https://www.quora.com/Why-was-Doom-developed-on-a-NeXT

Although Swift originated at Apple, it's designed to be a performant multipurpose language, and does have official Linux support. Interestingly, the system software for the Nintendo Switch and PlayStation 4 are both written on top of FreeBSD, a trait shared by Apple's platforms. So I don't think Swift on consoles is technologically implausible. While I don't think it would make as much sense as a scripting language, I could certainly see game engines eventually supporting Swift in contexts where C++ is used now. I happened to see this comment from Chris Lattner today, which is encouraging.


…The real killer feature, which is probably three or four years out, is systems development. Killing C++ is really the unsolved problem, and it totally has to happen. Because C++, while practical—and itʼs really the only practical answer for some tasks—has its own class of problems because itʼs built on the unsafety of C. Which means that all the applications that are built from that world are suffering. If and when we get Swift to the point where it can solve that class of system programming things, thatʼs where it gets opened up to an entire community of people, for example game developers that are writing console games, that really care about that last ounce of performance. And they need to be saved from C++.


This is far from any sort of guarantee (especially considering that Lattner departed Apple earlier this year), but I think we're justified in imagining how nice it would be. 😁