Live data from Hacker News

How to Make a Massively Cross-Platform Game

blog.brokenfunction.com

31–40 of 42 posts

Re: How to Make a Massively Cross-Platform Game

#31
Disclosure: I work at Zipline Games building out our cloud platform. We also have a cross platform game engine that lets you develop in lua. The engine is focused on mobile games so it runs on android, iOs and Chrome native client.

The cloud portion would make an excellent compliment to this since we host a mongo database for you, allow you to write and run your own lua code so you can develop your backend logic in the same language you build your game in. We also provide a set of RESTfull services for common game needs.

Check it out at http://getmoai.com/

Re: How to Make a Massively Cross-Platform Game

#32

Earlier quoted context omitted.

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

Good 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?

Re: How to Make a Massively Cross-Platform Game

#34
post #2

A cross-platform game engine sounds awesome. But I wonder what kind of game can truly be write-once, run-everywhere, and considered "fun" on all platforms. A few major challenges: - Designing a game that is fun and intuitive to play with a wide variety of input controllers (touch, mouse, keyboard, joystick). - Handling the entire spectrum of screen resolutions, from older iPhones to high-end desktop computers. The ga…

- Designing a game that is fun and intuitive to play with a wide variety of input controllers (touch, mouse, keyboard, joystick).

It was actually a platformer. SDL has great support for Joysticks/Keyboard so that was no trouble. The same goes for JS. As for touch screens, I found a good alternative control scheme that takes advantage of the touch screen. You are still right, but the game was designed to be straightforward enough to handle different control schemes.

- Handling the entire spectrum of screen resolutions, from older iPhones to high-end desktop computers. The game would also probably need to work in both portrait and landscape modes.

Impressive, this was actually major issue. The game requires no specific aspect ratio, so that wasn't a problem. Still, we don't want it to look tiny on HD monitor while looking normal on an iPhone, so the resolution of the images in the game can scale up and down at different sizes (1x, 2x, 3x) depending on what's ideal.

- The QA effort alone could be huge. Testing on quirky desktop browsers or buggy Android devices alone could be a dealbreaker.

No problems with modern browsers, if they supported Canvas, they supported the Javascript that was needed. I admit Android might've been a problem, I can't test on everything.

- I'd argue that the time spent trying to figure out a game design or technical workaround for a particular platform would be better spent focusing on one platform and making the game more fun. In my experience, trying to make a fun game involves a lot of trial and error and iteration, and I personally don't think I could do it if I also had to keep in mind multiple distinct target platforms.

That was actually the original plan. I ended up porting it to some new area whenever I would get stuck on some other problem and got caught up in that part of the project instead because I found it fun. Since the requirements were so intentionally minimal it wasn't very hard. I didn't know anything about iOS or Android development going in for example, they each took about 2 weeks.

Re: How to Make a Massively Cross-Platform Game

#35

What about Java? It has some quite mature 3d game libraries now, checkout jmonkeyengine for example and 2d is a doddle. It can run on all 3 major desktop platforms as well as android (though you may have to use different libs for some parts) and can be embedded into a webpage easily via an applet. The only platform you would need to re-implement for would be iOS but your going to hit that problem whatever you do (not…

I didn't like the idea of using Java, since it requires the Java runtime everywhere. This also limits my options in console environments. The goal of this project was to minimize such requirements. I also didn't want to rewrite the game ever if possible, so rewriting it for just iOS was out of the question.

> As a PC gamer I'm getting a bit annoyed by new games that used to be based around PC coming out primarily for console and then being ported to PC with dumbed down controls and graphics that don't do a high end PC justice.

It's an indie game, high-end graphics were not a priority on any platform, gameplay is.

Re: How to Make a Massively Cross-Platform Game

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

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

Re: How to Make a Massively Cross-Platform Game

#37

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.

It was painful for me as well. The Flash port was just not up to snuff though no matter what I tried, and there were no options left for browsers that don't support Canvas.

Re: How to Make a Massively Cross-Platform Game

#38

Disclosure: I work at Zipline Games building out our cloud platform. We also have a cross platform game engine that lets you develop in lua. The engine is focused on mobile games so it runs on android, iOs and Chrome native client. The cloud portion would make an excellent compliment to this since we host a mongo database for you, allow you to write and run your own lua code so you can develop your backend logic in t…

I've been playing with moai with much fun the past few weeks, and I have to commend you on a job well done. You've given a lot of love to the use of Lua to properly solve the platform problem, and its a joy to use moai to quickly get stuff done.

Re: How to Make a Massively Cross-Platform Game

#39

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…

> Oh well, I guess it is javascript's lot in life to be hated and ignored.

Ten years ago, maybe. Today, JS is almost ubiquitous, thanks especially to the growth of AJAX. Never mind that tech like V8 has blazed new trails for JS far beyond the browser.

Re: How to Make a Massively Cross-Platform Game

#40
post #16

Earlier quoted context omitted.

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.

Yeah but we are talking here about massive multi-platform games and Infinity Blade was specially tailored for IOS.

In practice, to use Unreal in a game that would run on consoles and mobile devices, you have to fork your code and made a lot of adjustments.

Post reply on HN