Sunday, June 2, 2013

GDC 2013, a programming languages perspective

This year I was fortunate enough to assist again to the GDC, thanks to my awesome studio that paid for all of my expenses. It was a great and a humbling experience at the same time. It doesn't matter how much have you improved, the videogames industry moves so fast that there is always something that would make you feel dumb compared to others. There are so many disciplines and technologies that the only thing I can talk a bit is about programming languages and how I perceived them on this GDC.


C++ is the language of the industry, I still need to find a commercial engine that is not built on top of it. I was able to meet the guys behind the cocos2d-x project, they are working hard to expand and make solid their open source engine. To put things in perspective my branch with Killa support is only months old but now it seems another project, they are that fast. cocos2d-x offers C++ support in many platforms like Android, iOS and Blackberry, these days even Microsoft is giving them C++ access to their Windows 8 platform. And the reason is because if you think in C++, you think native access, and that means fast games. It could be all the difference between a mediocre game and one awesome. What I was missing was info about all the new features of C++11 (C++0x) and how they could help developing games. One reason I suspect is that most of the game consoles have proprietary compilers that must catch up to the mainstream compilers. I for one, miss some of the new cool features like auto and lambdas but I'm sure they are coming.
In resume: C++ is still king and it would be the same for years to come. If you are serious about programming videogames you must learn C++ and learn it well.


This must be the most talked about language in the GDC. There were talks about cocos2d-js, asm.js and Emscripten that seemed very promising. In the talk about cocos2d-js the guys at Zynga promised a JavaScript engine optimized for mobile and desktop. It was looking cool on the screen but I'm still awating for the official release. The awesome guys at Mozilla showcased asm.js: a way to add hints to the JavaScript code that their compiler can optimize for faster execution. Emscripten is a C++ to JavaScript compiler with WebGL support. Using both they showed the Unreal Engine port in JavaScript running on Firefox at good framerate.
But I'm still not so sure about what is real and what is hype. For starters the demo was like 60 MB of minified JavaScript code, so forget mobile. And it used WebGL so forget IE. There are external plugins and rumors that IE11 would support WebGL but nothing official, so until then the cool world of making HTML5 games is only for the Chrome and Firefox camp and only in desktops. I have made some HTML5 games and the compromise of supporting desktop and mobile devices at the same time imposes a lot of restrictions on the things we can do: iOS has audio limitations, Android is a very fragmented platform, even in desktops we need to hide Flash to have decent audio, and don't talk about the additional cost of programming in a frail language like JavaScript. I was looking to hear something about TypeScript but there was nothing.
In resume, JavaScript it's here to remain. Our industry is pushing the browser makers to find creative solutions for speeding up our games and they are working hard so things are only going to improve, but it's not nirvana.


Unity drives the C# camp for videogames. Unity is a great engine and C# is a great language, together they make wonders. With the new free Android and iOS version of Unity they are one step closer to total world domination of game engines. Of course there are other technologies like PS Mobile, XNA and Monotouch that you could also use with C# but Unity for me is the only reason to use C# for videogames. Some caveats: Unity has still a hefty price for the professional versions, and if you care about better performance, cool shaders and stripping down package sizes for mobile devices you are really going to need it.


The only reason to use Java for videogames is Android. I'm not a fan. The good thing is that we can use C++ with the NDK and require only small bits of Java to connect everything. The bad news is that debugging NDK programs is horrible and because the Android market is growing the fastest we still will need some Java developers for sure.


There are many engines that use Lua for scripting like bitsquid, Corona SDK, Marmalade, cocos2d-x and Love2D. I was afraid that with all the JavaScript work done in coco2d-x they were going to forget the Lua support, but one of the team members told me that the top 10 paid games in China are made with Lua, so Lua is stlll relevant. However the adoption of Lua 5.2 is poor and most of the time when developers talk about Lua they are really talking about LuaJIT. So it's not clear if things are improving or declining in the Lua camp.


It was the only way to publish something on the iOS camp. but now with all the other cross-platform engines this language is not that important anymore for game developers, unless they only want to target iOS devices.


There was no Haxe related sessions, which is a bummer because I think Haxe is the dark horse of our industry and some people is already getting aware of this. Flash AS3 is already dead, a living corpse to be more exact. If it were alive we would be talking right now about the awesomely fast AS5 and all the goodies that it brings to the development of games for mobile devices, wait a moment: that is Haxe.


Of course there was not a Killa session but I knew that some awesome guys that used Killa for a prototype of their game were going to the GDC. What I was not expecting is to find them at the next boot of our boot! Sometimes the world is so small. They are not using Killa right now but Omar told me that he wanted to use it again if I could give them a better support.

Overall, I had a great time assisting the sessions, showcasing our demos in the Vita and the PS3 and also meeting old acquaintances. Thanks again to my studio and our whole team for making this possible.

No comments:

Post a Comment