Desarrollo independiente multiplataforma

34

Hace algunos años, si escribía en C y en un subconjunto de C ++ y usaba un número suficiente de abstracciones de plataforma (a través de SDL o lo que sea), podía ejecutar en todas las plataformas en las que un indie podía acceder: Linux, Windows, Mac OS de varias versiones , cosas oscuras como BeOS y las consolas abiertas como GP2X y Dreamcast posterior a la muerte. Si obtuviste un contrato para una plataforma cerrada en algún momento, también podrías portar tu juego a esa plataforma con cambios de código "mínimos".

Hoy, los desarrolladores independientes deben usar XNA para acceder a la Xbox 360 (y al próximo teléfono con Windows); no debe usar XNA para trabajar en otro lugar que no sea Windows; hasta hace poco tenía que usar Java en Android; Flash no se ejecuta en teléfonos, HTML5 no funciona en IE. A diferencia de, por ejemplo, DirectX vs. OpenGL o Windows vs. Unix, estos son cambios en el lenguaje central en el que escribe su código y no se pueden empapelar sin, básicamente, escribir un compilador. Puede mover parte de la lógica del juego a los scripts e incluir un intérprete, excepto cuando no puede, porque el iPhone SDK no lo permite, y el rendimiento se ve afectado porque nadie permite JIT.

Entonces, ¿qué puedes hacer si quieres un juego portátil realmente multiplataforma, o incluso un cuerpo significativo de motor y código lógico?

¿No es esto un problema porque las plataformas han divergido fundamentalmente? Simplemente no vale la pena tratar de apuntar tanto a un iPhone como a la Xbox 360 con algún código compartido porque tal juego sería malo. (Me parece muy poco probable. Puedo ver fácilmente querer compartir un juego entre un teléfono con Windows Mobile y un Android, o una Xbox 360 y un iPad.) ¿Las interfaces son tan importantes ahora que el tiempo de transferencia es insignificante? (Podría creer esto para aplicaciones comerciales, pero no para juegos con requisitos de rendimiento estrictos).

¿Será esto más pronunciado en el futuro? ¿La división va a ser, de alguna manera aterradora, aún por líneas de proveedores? ¿Confiaremos todos en middleware de alto nivel como Flash o Unity para hacer algo multiplataforma?

tl; dr: portar un problema, ¿será un problema mayor en el futuro? De ser así, ¿cómo lo resolvemos?

usuario744
fuente
2
La sección 3.3.2 del Acuerdo de licencia del programa para desarrolladores de iPhone permite la creación de secuencias de comandos de juegos ahora, aunque todavía es un poco complicado. - "Sin perjuicio de lo anterior, con el consentimiento previo por escrito de Apple, una Aplicación puede usar código interpretado incrustado de manera limitada si dicho uso es únicamente para proporcionar características o funcionalidades menores que son consistentes con el propósito previsto y anunciado de la Aplicación".
Bachus
3
Apple cambió el acuerdo de licencia nuevamente ayer, y las secuencias de comandos del juego ahora están totalmente bien. - "El código interpretado solo se puede usar en una Aplicación si todos los scripts, códigos e intérpretes están empaquetados en la Aplicación y no se descargan. La única excepción a lo anterior son los scripts y el código descargados y ejecutados por el marco WebKit incorporado de Apple".
Bachus
¿Diría que ha agrupado un montón de cosas que no pertenecen: dispositivos móviles, consolas, PC y juegos basados ​​en la web? Las consolas y las PC, seguramente, deberían poder compartir una base de código con algunos ajustes. Los dispositivos móviles tienen una capacidad muy diferente del hardware informático dedicado (en términos de potencia gráfica en bruto, almacenamiento, roscado, etc.), por lo que ni siquiera podría utilizar las mismas soluciones. Y los juegos web son, ya sabes, páginas web . ¿Qué deseas? La fragmentación aquí es a través de paradigmas de dispositivos, no meras arquitecturas de computación.
ChrisE
En realidad no dije nada sobre los juegos web. Creo que es razonable querer ejecutar parte del mismo código en todos los dispositivos: mapeo de entrada o una API de gráficos abstractos, o un sistema de entidad, análisis de archivos, redes: todos estos son los mismos paradigmas básicos independientemente de la plataforma. Pero la pregunta también tiene 8 meses, y surgió de preocupaciones que no se aplican mucho, ya que NDK reunió más soporte en Android y Apple detuvo sus estúpidas políticas.
Quiero decir, mencionaste HTML5 ... eso está destinado a juegos web, ¿verdad?
ChrisE

Respuestas:

14

El motor de Unity te ofrece una gran parte del camino. Escriba una vez y tendrá Mac / Windows Standalone y un reproductor web basado. Modifique sus entradas, y tenga en cuenta sus llamadas de extracción y estará en iOS / Android.

JDonavan
fuente
12

For a small indie developer, with limited funds/time (and maybe more of a focus on 'making something cool' than 'making something profitable'), trying to go cross-platform from the start could be counterproductive. It takes a lot of effort to engineer solid cross platform tools and tech (different graphics APIs, endianness, input devices, and more) - time that could be spent on the more creative side of game development.

But you probably want to make sure you've got a great game that works really well on one platform before worrying too much about getting it onto as many platforms as possible! If the game is a flop, there's no point wasting time and effort making it a multi-platform flop, is there?

If you're coding in C/C++, mostly from scratch, then as long as you keep the code fairly modular and make sensible decisions about data formats and middleware/libraries, then supporting other platforms later shouldn't be too painful.

If third-party cross-platform tech/tools (e.g. Unity) is an option for your project, then it's certainly worth considering.

The main 'problem platforms' for indies would seem to be Xbox360 Indie Games (C# only, limited network access, etc), and possibly Android (massive differences in device performance/screen size/input devices). If you're determined to support these, expect a more sizable porting job, or plan to focus on them exclusively.

bluescrn
fuente
Yeah, Unity3D rocks. www.unity3D.com
BerggreenDK
I agree with @bluescrn - better to know almost everything about almost nothing, than knowing almost nothing about everything: Jack of all traits, master of none.
rodrigo-silveira
3

You say cross-platform independent development. The biggest hurdle then is resources, and that means a lack of time most of the time, but also lack of know-how and possibly finances (license fees, buying devices, etc).

Indie or not, the biggest hurdle is actually design. As you say, a game that runs on Xbox360 and iPad might work, but they also need to be fundamentally different in terms of design. The 360 has a controller, the iPad a touch screen. Also, development for the 360 is done in Windows using C# as language, the iPad can only be targeted on Mac OS computers and using C, C++ or Objective-C. Or Javascript, if you prefer. Some things just don't mix that well whatever you do.

What you say about the different platforms holds true today. Use C/C++ and SDL and you can write your program cross-platform on PC-like machines, probably much more smoothly than years ago. However it was always a problem and will always remain a problem to port games from PC to console to mobile, and vice versa. It has just become more pronounced in the recent years by allowing Indie developers to program for consoles (or developers hacking access to it to create homebrew games) and by the rise of mobile devices powerful enough to run games.

Porting has the same problems it ever has, but there are more devices to port to. And some ports just don't make sense without re-designing the core of the game. This is not a problem that can be solved, it's one you have to consider from the outset even before you write your first line of code. Then it will be manageable, no more, no less.

LearnCocos2D
fuente
Actually, I would say time to port is one thing an independent developer/group is more likely to have than a large publisher-driven studio.
There are plenty of game designs that make sense on all platforms - turn-based virtual board games, for example, are consistently a hit on all platforms. So are many falling / matching block puzzle games. These can't even be "ported" in the traditional sense anymore - moving a game from e.g. XBLIG to the iPhone is a guaranteed rewrite of all the code.
3

A simple, portable and open interface framework is really needed, I think. Some musings:

There currently seem to be four common kinds of game input methods: Keyboards, Mice, Controllers and Multi-Touch Surfaces. (I'll gloss over the issues of differing capabilities between, for example, gamepads and joysticks for now, though that should eventually be addressed.)

Ideally, our developer would be able to specify in a general way a few different UIs that make sense for the kind of game being written. (They might decide to provide a Keyboard and Mouse UI, a Mouse Only UI and a Multi-Touch UI, as an arbitrary example.)

The framework is then responsible for mediating IO between the platform and the game code, similar to how cross-platform GUI frameworks like QT and GTK function.

Having such a framework wouldn't solve the incompatible language requirements problem, but would at least encapsulate all the system-specific calls behind a common API, which should make language porting much more straightforward.

Well, now that I've written all of that: Does anyone know if a framework like that already exists?

Gelatinous Mutant Coconut
fuente
3

With projects like MonoTouch and XNATouch it was looking like XNA might get you on most platforms with a bit of tweaking. Unfortunately Apple kind of torpedoed that when they changed their Terms and Conditions to restrict which languages you can use. Unity goes across pretty much everything now, although on XBOX it will get you on XBLA but not XBLIG, so not an option for smaller indies.

One approach might be to create a framework that uses the same conventions across multiple languages/platforms, then it is just a matter of tweaking syntax to port games. You might want to launch your game in Flash, which can be developed quickly and reach a large audience, then if it is successful port to iPhone, XNA etc. This way you know you have a fun game before over-committing yourself.

Iain
fuente
stupid apple, who restrict programming languages! WHO?!?!
FreshJays
2

I think this is an economic problem, not a technical problem. Platforms like xbox360 have a strong incentive to be exclusionary, because they're trying to get users choosing their platform instead of some other platform. "We have these cool exclusive games" is way more interesting than "we can also play these games that everyone else has". The ecosystem is dominated by the hardware manufacturers.

I suspect this will change when social-networked gameplay matures, because there's potentially a lot more money in getting everyone into the same social-gaming system than in making yet-another-FPS-with-sexy-graphics.

gray
fuente
2

I just discovered Haxe and NME. It claims to be a cross-platform app that supports all major desktops and mobile devices, and Flash, from one code-base. Worth a look.

ashes999
fuente
1

A cross-platform development tool that is so new I don't necessarily recommend it is http://www.monkeycoder.co.nz/

It hits every platform you mentioned.

While it is too new to really judge, it has a great pedigree: it's creator previously made Blitz3D and BlitzMax, which were great development tools for indie game developers.

jhocking
fuente
0

I've had luck with the airplay SDK - at least on x86 and apparently targets iPhone well (although I still have yet to put an app on an iPhone yet).

user6789
fuente