Author Topic: Porting to other platforms - how to test?  (Read 7180 times)

Azathotep

  • Newcomer
  • Posts: 18
  • Karma: +0/-0
    • View Profile
    • The Creepy Shoebox
    • Email
Porting to other platforms - how to test?
« on: September 14, 2013, 12:04:23 PM »
I am currently building stuff under Windows and was thinking of how to port to other desktop operating systems like OS X, Linux and Atari DOS. Possibly even Android and iOS (although I doubt it, but I am interested in hearing how it would be done). If I had a macbook or something it would be fairly easy to mess about getting stuff to run on that system, but I don't. I was wondering what the best method is for porting and testing the ports work given that I have an aversion to effort. I came up with a list of a few possibilities but how do other people do it?

1. Write the game in a cross-platform language in the first place where you don't really have to bother (eg Java) about testing it on other platforms because it should just work, or something.

2. Cross-compile the game for other platforms but never test that it works on those platforms. Ask other people familiar with those platforms to test it for you, or even let angry players inform you it doesn't work. As soon as someone reports it does work then continue with the philosophy that it will continue working as long as you only make changes to the game code not the setup stuff.

3. Actually buy hardware (!!) or dual boot for different platforms and learn (!!) those platforms, eg how to use the desktop, how to compile on them, how installers should work on them, etc (this would take a long time? or is this a case of "tough shit, just get on with it")

4. Create virtual machines for other platforms. Will virtual machines come close enough to the real thing (eg graphics acceleration if I use a framework that uses opengl or directx to render tiles?). Same thing though, you have to learn all these other platforms, eg how they tick at a basic level.

5. Don't bother porting unless people complain there's no Mac or Linux version. afterall what's the point in porting if people don't ever play the port? but then there's a chicken an egg, they can't play it if you don't port it.
« Last Edit: September 14, 2013, 12:12:18 PM by Azathotep »

Cfyz

  • Rogueliker
  • ***
  • Posts: 194
  • Karma: +0/-0
    • View Profile
    • Email
Re: Porting to other platforms - how to test?
« Reply #1 on: September 14, 2013, 08:11:12 PM »
1. Most likely won't work as good as you expect. Every platform has some aspects no programming language will be able to abstract. Like console output not behaving uniformly, input methods being completely different or specific installation procedures. Without some libraries (like SDL) or frameworks (like Marmalade) support for several platforms is difficult.

2. Will not work. You'll have to debug a lot and reports like "ITS NOT WORKING!!" won't help you any.

3. You'll have to learn platforms' mechanics to some extent. At the very least you should be able to build your app for the platform in question and run it to reproduce bugs. Buying HW isn't strictly necessary as there are VMs and emulators.

4. For desktop platforms VM is usually enough. Lately they even become capable of some graphics acceleration which probably will be enough for a roguelike.

5. I say, depends on the project. If it is your first game without clear future, just select one most interesting platform and concentrate on that. In case of success, there will always be Wine and better understanding what and where exactly you need to port.

Azathotep

  • Newcomer
  • Posts: 18
  • Karma: +0/-0
    • View Profile
    • The Creepy Shoebox
    • Email
Re: Porting to other platforms - how to test?
« Reply #2 on: September 14, 2013, 11:55:01 PM »
thanks very helpful, i'll stick with the advice in #5 for now

miki151

  • Rogueliker
  • ***
  • Posts: 264
  • Karma: +0/-0
    • View Profile
Re: Porting to other platforms - how to test?
« Reply #3 on: September 15, 2013, 06:26:29 AM »
I only have Linux on my PC and use VMware to compile my game for Windows. I've also played a bunch of Windows-only roguelikes this way. If you develop on Windows then probably don't bother porting or use VMware.

It gets complicated if you want to have iOS and Android ports. UI issues aside, the languages supported by those platforms are limited: on Android it's Java and C/C++, and on iOS it's (last time I checked) Objective C and C/C++. You'd also need to buy some hardware.

You get most portability for free if you choose Java, because it can be compiled for PC, Android and browser (using Google Web Toolkit). There are game libraries that support all 3 out of the box, so you can easily make a game that can be played almost everywhere.
KeeperRL, Dungeon Keeper in roguelike style:
http://keeperrl.com

Krice

  • (Banned)
  • Rogueliker
  • ***
  • Posts: 2316
  • Karma: +0/-2
    • View Profile
    • Email
Re: Porting to other platforms - how to test?
« Reply #4 on: September 15, 2013, 09:38:58 AM »
I'm wondering what the target platform setting in Code::Blocks is and can you compile in Windows to a different platform?