Saturday, September 20, 2014

Developing cross platform program/game from ground up - part 4

Cross Platform development by standardization.

If your going to make program work on different operating systems, you need a lot of know how about etch of operating systems, in order to support all operating systems.

The alternative is using cross platform development libraries.

First of all I'm going to talk about SDL and Allegro this two provides every thing you need to make games, the idea is that you have standard commands you can use to make sure that your game works on all operating systems they are ported to.

SDL

* Support Graphics 2D and 3D
* Handel display window/full screen window
* There events for Mouse/Keyboard/Joystick/ Multi-touch.
* Audio 8bit and 16bit.
* Filesystem
* Threads
* Supports big and little endian cpu's

Allegro

* Support Graphics 2D and 3D
* Handel display window/full screen window
* There events for Mouse/Keyboard/Joystick/ Multi-touch.
* Audio 8bit and 16bit.
* Filesystem
* Threads
* Supports big and little endian cpu's

So they are similar and provided what you need to make a games, some even make programs in this but, that's not a good idea, there are better cross platform libraries for programs.

Linux/BSD Windows AROS AmigaOS4 MorphOS MacOSX Haiku/BeOS Score
Allegro yes yes no yes yes yes yes 6
SDL yes yes yes yes yes yes yes 7
Svgalib yes no no yes
Wrapper for Picasso96
no no no 1 (2)
Picasso96 no no yes yes yes no no 3
Cybergrephics no no yes yes yes no no 3
Haxe yes yes no no no yes no 3

The Svgalib port for AmigaOS4, was done by me, it might need some work, its not well designed, but there are NOT many games or programs that use this library, if you look at the table you see that SDL is most supported, Allegro is not so well supported.

Some information Allegro 5 and Allegro 4 are not 100% compatible, and only Allegro 4 is officially supported by AmigaOS 4, I have not looked at Allegro 4 so I can't say accurately what the difference are, anyway I have been working a bit on Allegro 5 but not a complete port, I have only implemented what was needed for a Game, so its not even based on Allegro 5 source code, so don't expect a full Allegro 5 port from me for AmigaOS 4. Developer using the nick "Hitman", ported Allegro 4 to AmigaOS 4.

As I understand it Cybergrephics is the native graphic library for MorphOS and it was addition to Graphic.library on AmigaOS3.1,  when installing a True color graphic card in your Amiga, Picasso96 is also a graphic library to enable true colors for AmigaOS3.1 / Commodore Amiga computers, on AmigaOS4.x  Picasso96 is slowly becoming obsolete if your going to make new program or game. How this implemented in AROS I do not know all I know is that its supposed to be supported.

Here are some GUI systems QT, GTK, MUI (Magic User Interface), Reaction, that we compare to see what supports the most, I have selected a few well known operating systems.
(I have excluded mobile platforms etc, or else table gets to big.)

Linux/BSD Windows AROS AmigaOS4 MorphOS MacOSX Haiku/BeOS Score
QT yes yes no yes no yes yes 5
MUI no no yes
(clone Zune)
yes yes no no 2 (or 3)
Reaction no no no yes no no no 1
GTK yes yes yes
(Zune wrapper)
no no yes yes 5
Windows Forms yes
(mono)
yes no no no yes
(mono)
no 1 (or 3)
wxWidgets yes yes no no no yes no 3
AGAR yes yes no no no yes yes 4

Best score is 7 in this table, but no GUI system support all 7, so in other words GUI's are the tricky part when creating a cross platform application, the best GUI's to support is GTK and QT, then depending on what OS you wont to support and programming language you use MUI (Magic User Interface) or Windows Forms.

While no GUI support all the 7, the build system is what solve the problem, this how you can have different GUI's for different operating systems, you really only need to support two MUI & QT or GTK & MUI and all 7 operating systems are supported.

Different Linux distributions are not listed here because they are just repackaged Libs and programs, with different install process and package managements, I know some might disagree but lets keep this about cross platform development and not about what brand you put on your Linux distribution.

Anyway GUI and how things works is what makes operating systems unique to the users, if all operating systems behave the same there is not point having a option to choose is there?

3 comments:

  1. Hello,
    The Article on Developing cross platform program.It give detail information about it .Thanks for Sharing the information.Xamarin Developer

    ReplyDelete
    Replies
    1. Thanks for the comment, sadly I did cover mobile apps, this because is subject I know where little about, and also you develop for desktop and what write for mobile look really different, due different input methods and surface area restrictions.

      Delete
  2. Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Visit here for Penetration testing services and Software testing services

    ReplyDelete