3 ms·
This is a good analysis, however, the focus is on being cross-platform at the expense of all else. You will have a hard time making a performant AAA title witho
by jheriko 15y ago
This is a good analysis, however, the focus is on being cross-platform at the expense of all else. You will have a hard time making a performant AAA title without some low-level and platform specific code to squeeze the most out of your hardware. One intermediary approach is to use C to optionally fill gaps where there are big wins to be had... C is almost universally supported and correctly designed C APIs can be used together with most of the major languages, where its not available (the web, without some kind of plugin download) you "simply" lose out on those potential optimisations...
Saying that though this kind of approach is great for small projects. Lua is a great choice because its already been extensively used for games on many platforms and there are heavily used and highly optimised implementations available for all the PC platforms and consoles.
I don't know if there has been any serious effort to get many other languages than C/C++ and Lua targeting consoles beyond the XNA stuff from MS - but, those with compilers/interpreters written in clean, cross-platform C should be straightforward options as well (e.g. GCC compilers).
Another important consideration is the range of performance on the various targets - designing everything so that cosmetic features can be reduced/disabled dependent on platform is simple, but if not done early on can turn into a chore. This way the lack of performance on the web can be counterbalanced by having, e.g. less particles, half-res textures, fewer animations.
- illumin8 15y agoAgreed. Being cross platform at the expense of having to write your own OpenGL and OpenAL renderers for each platform seems almost as bad as writing hand-coded assembly for each processor architecture.
- mherkender 15y agoI only wrote OpenAL/OpenGL code when it was necessary. Most platforms use some simple library (libgdx, SDL, etc). The OpenAL code is actually shared between the Linux/Windows/Mac port and the iOS port. Only the iOS port uses OpenGL directly, and I imagine that code could also be shared between different platforms.
- ido 15y agoYou will have a hard time making a performant AAA title without some low-level and platform specific code Since the author mentions platforms such as js and flash, I highly doubt we're talking AAA games here- there's plenty of genres (basically all "casual" games) where performance isn't an issue.
- teamonkey 15y ago> those with compilers/interpreters written in clean, cross-platform C should be straightforward options as well (e.g. GCC compilers). C++ is essential for consoles (at least the 360) if you're not going the XNA route. Moreover, you have to compile with vendor-approved compilers, link with the vendor-provided libs and use approved graphics functions (e.g. DirectX on the 360). Of course, many console games use Lua for scripting. LuaJIT, however, is not supported on consoles.
- mikemike 15y agoCorrection: LuaJIT is not yet supported on consoles. I'm confident the remaining legal issues can be resolved soon. Note this is referring to the high-speed interpreter written in PPC assembler which gives you a 2x-6x speedup over plain Lua. Not as good as with a JIT compiler, but definitely something to consider. The JIT compiler will be disabled on the consoles for now. This is not the last word on that matter, though.
- teamonkey 15y agoGood to know. I thought the major problem was that the console hypervisors don't allow arbitrary code execution, which made JIT difficult if not impossible on those platforms. In any case is there any serious benefit to using JIT over static compilation on fixed targets like the 360 and PS3?