Live data from Hacker News

How to Make a Massively Cross-Platform Game

blog.brokenfunction.com

21–30 of 42 posts

Re: How to Make a Massively Cross-Platform Game

#21
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.

Re: How to Make a Massively Cross-Platform Game

#22
post #21

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 us…

Agreed. 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.

Re: How to Make a Massively Cross-Platform Game

#23
post #21

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 us…

    You 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.

Re: How to Make a Massively Cross-Platform Game

#24

The only disappointing part of this is that he did, without mentioning it as clearly as I would like, chuck away the 15% of people using IE before version 9. On the other hand, non-canvas browsers have got down to 15%? I'm chucking my (painfully and buggy) DOM engine for my game this afternoon and ging just canvas. I should have paid more careful attention.

    The only disappointing part of this is that he did,  
    without mentioning it as clearly as I would like, 
    chuck away the 15% of people using IE before version 
    9.
Are you sure your target audience has 15% IEOn my website [1] I only have ~7% IE and that's 1/3 IE9 and 2/3 [1] - http://tametick.com, which is pretty representative of the kind of people who buy/play my games.

Re: How to Make a Massively Cross-Platform Game

#25

I'd definitely recommend Unity3D for this. It provides (as far as it can) platform-agnostic abstractions for controls, graphics and audio, although if you want to get down-and-dirty with a particular platform you can easily write native plug-ins. Very technical people often have reservations over such systems that seem to cater for non-techie developers, but I found it made game development much more enjoyable- less…

Your game looks nice. Do you maybe have a blog post about the making of? Was it your first Unity3D game? What prior experience do you have in game development and in general programming, which languages? How long did the development take?

Sorry for all the questions—I'm about to dive deeper into one of the game/3D dev frameworks and an HN reader's opinion would be highly appreciated!

Re: How to Make a Massively Cross-Platform Game

#26

He dismissed Javascript rather quickly without really explaining why. Oh well, I guess it is javascript's lot in life to be hated and ignored. On the other hand, lua was a very good choice indeed. Lua and Javascript are very similar languages indeed- though I would say Lua is probably a lot less hairy and weird. A couple options he missed though- There was already a lua to javascript translator. (I think). There is a…

> He dismissed Javascript rather quickly without really explaining why.

Actually he did not, and visibly considered it a good contender, but wanted to look for other options before jumping to conclusions. In the end he simply did not go back to JS since Lua fit the bill.

Re: How to Make a Massively Cross-Platform Game

#27
post #21

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 us…

> 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.

Re: How to Make a Massively Cross-Platform Game

#28
post #4

Unity.

Or, depending on your choice of targets and desired featureset:

Monkey - http://www.monkeycoder.co.nz/Monkey/about.php

GameMaker - http://www.yoyogames.com/gamemaker

Love2D - http://love2d.org/ ; https://bitbucket.org/bmelts/love-iphone/overview

Unreal3 - http://udk.com/

And many more. Shouldn't stop people for developing their own though.

Re: How to Make a Massively Cross-Platform Game

#29
post #16

Unreal Script? UE covers all the platforms he is trying to hit except Wii. Though the web stuff requires flash.

That is in theory.... In practice If you have a game that look pretty well on consoles you would have big challanges for mobile devices, and just reducing quality on art assets might not be enough.

Unreal is used in Infinity Blade 1 and 2 on iOS.

Re: How to Make a Massively Cross-Platform Game

#30
post #21

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 us…

> 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…

Correction: 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.

Post reply on HN