Multiple platforms (Windows, Mac, Linux)

Started by
16 comments, last by Raghar 17 years, 6 months ago
Quote:Original post by Nima
1) If those cross-platform toolkits (Qt, wxwidgets,...) are the best choice to use, why don’t all companies use them for their 3D applications or Game Engines?

Lowest common denominator. A cross-platform toolkit, in order to maintain a clean and simple API, must support only features that are available across all of its target platforms. Otherwise it has to introduce conditional compilation branches, different internal implementations to emulation functionality available here but not there, and this makes the overall package less desirable because the perception of simplicity is lost.

Quote:2) When most of companies want to employ some programmers, they need C/C++ coders (and sometimes with experience of win32), so why don’t they employ experienced coders under Qt or wxwidgets? If employees don’t have any experience with those toolkits, and just know Win32, How they can learn and use them without difficulty? How can we work in a team with something that we didn’t touch before?

If you know Win32, you can fairly trivially pick up a toolkit that abstracts Win32. You understand what it's trying to do underneath, and you may even appreciate the areas where it saves you work. (Go implement ReBar controls in straight Win32. [smile])
Advertisement
Quote:Original post by Oluseyi
Lowest common denominator. A cross-platform toolkit, in order to maintain a clean and simple API, must support only features that are available across all of its target platforms. Otherwise it has to introduce conditional compilation branches, different internal implementations to emulation functionality available here but not there, and this makes the overall package less desirable because the perception of simplicity is lost.

wxWidgets doesn't really follow the lowest common denominator approach - it has certain flags that are ignored on most platforms (e.g. wxTextCtrl lets you choose to use the rich text control (Win32 only), or right-align text (Win32 and GTK2), or wrap text at characters instead of word boundaries (GTK2), or capitalise the first letter (PocketPC/Smartphone)), and it has certain requirements that are relevant on some platforms (e.g. brush stipples must be 8x8 bitmaps on Win95), and certain classes that implement the same interface but act very differently (e.g. wxConfig is mapped to wxRegConfig (registry) on Windows, but wxFileConfig (INI-like files) elsewhere). The API appears to be limited to fairly small differences - the major features are the same on all platforms, and emulated where necessary (e.g. there's a Win32 tree control implementation plus a generic tree control for everywhere else).

The documentation seems to be good at pointing out the platform-specific features and differences, so you can write portable code when you want to. It still gives you the option to tailor the design differently to suit different platforms, which is nice (and also necessary if you want to create a high quality program, because users of different platforms expect different designs). You do have to understand what you're doing if you're writing applications for multiple platforms, unlike the run-anywhere philosophy of AWT/Swing, which is balanced against getting a more native feel on each of those platforms. Whether the API suffers from a lack of simplicity is probably a matter of taste - the cross-platformness doesn't seem to cause me problems, but I've been working mostly on Windows (which is probably the most favoured platform of wxWidgets) and the only applications I've ported to Linux have been fairly simple ones, so I don't have much experience to judge whether it works well in practice or not. Still, I much prefer it to most of Java's attempts at cross-platform GUIs [smile]
Quote:Original post by Excors
Quote:Original post by Oluseyi
Lowest common denominator. A cross-platform toolkit, in order to maintain a clean and simple API, must support only features that are available across all of its target platforms. Otherwise it has to introduce conditional compilation branches, different internal implementations to emulation functionality available here but not there, and this makes the overall package less desirable because the perception of simplicity is lost.

wxWidgets doesn't really follow the lowest common denominator approach - it has certain flags that are ignored on most platforms...
Quote:Original post by Oluseyi
Quote:Original post by Excors
Quote:Original post by Oluseyi
Lowest common denominator. A cross-platform toolkit, in order to maintain a clean and simple API, must support only features that are available across all of its target platforms. Otherwise it has to introduce conditional compilation branches, different internal implementations to emulation functionality available here but not there, and this makes the overall package less desirable because the perception of simplicity is lost.

My (attempt at a) point was that I don't think that cross-platformness necessarily makes the API less clean and simple, or that it necessarily harms the "perception of simplicity". The complexity can be hidden behind the API and you'll never see it if you stick to a single platform - you can still write Windows-only programs using Windows-only features, without it being less simple or less powerful than in a Windows-only toolkit; and you can write GTK+ programs using GTK+-only features in almost exactly the same way, with the only difference being that you ignore parts of the documentation that say "Win32 only".

You do see some of the necessary complexity when actually trying to support multiple platforms in your application - but if it's no worse than a single-platform toolkit when you're targetting a single platform, and it has the benefit of leaving open the opportunity to support another platform for relatively little cost later, it would be a sensible approach.

The cross-platform toolkits' APIs might happen to be worse than that of some single-platform toolkits (e.g. the best tools and libraries are only available on Windows, or only on OS X, or whatever), but I would believe (unless convinced otherwise) that's simply because they're not as well designed, and not because of fundamental complexity which is required of any API for a cross-platform toolkit.
Quote:Original post by Nima
Do you know anything about developing of these big apps: Unreal Engine 3


Unreal Engine 3 uses wxWidgets.

(There was a small game demo release a while a go; RoboSomething - Intel demo, and if you have a look in the binaries folder you can see that there are wxWidgets DLLs that are being linked in)
Quote:Original post by Anonymous Poster
Quote:Original post by Nima
Do you know anything about developing of these big apps: Unreal Engine 3


Unreal Engine 3 uses wxWidgets.

(There was a small game demo release a while a go; RoboSomething - Intel demo, and if you have a look in the binaries folder you can see that there are wxWidgets DLLs that are being linked in)


Could be for supporting tools, as opposed to being in the game engine itself.
Quote:Original post by BosskIn Soviet Russia, you STFU WITH THOSE LAME JOKES!
Quote:Original post by grekster
Quote:Original post by Anonymous Poster
Unreal Engine 3 uses wxWidgets.

Could be for supporting tools, as opposed to being in the game engine itself.

From a message two years ago: "We've already rewritten UnrealEd to use the wxWindows toolkit on Windows. The intention is to have it run on Mac, Linux, and Windows. That's for UnrealEngine3, though, not UT2004".
It seems possible that it could be used by the engine too, e.g. for the startup and configuration dialog boxes, though those aren't particularly interesting compared to UnrealEd.
Quote:Original post by Nima
What do companies do to develop an application to support Windows, Linux and Mac-OS...


I use Java.
Considering Java has strong core libraries, and ability to detect windowless environment, followed by an ability to create your own limited "widgets" without worrying about what OS are you using, or other OS specifics, it works flawlessly for 2D games.
For 3D games I use Java and OpenGL.

This topic is closed to new replies.

Advertisement