Log in

View Full Version : Cross platform development


zoombapup
06-28-2003, 06:14 AM
Need help to find the best toolsets for cross platform development.

I'm thinking both games AND applications/tools.

Can anyone recommend some good solid tools?

For instance, FMOD seems like a reasonably good priced cross platform sound library.

We need to gather as much info as we can about how best to deliver our software cross platform without effectively becoming lowest-common-denominator level.

I'm not TOO concerned about linux/nix stuff, but PC and Mac markets are very important to me, so I would like to hear about solid tools for PC->Mac development.

.Z.

patrox
06-28-2003, 06:33 AM
We are working on the documentation of our multiplateform library ( mac /pc / linux currently being alpha tested )

It's called PTK, it just needs a recompilation to make your game run, it's like SDL, but simplier and more powerful i think.

We also have some of our tools available at :
http://www.phelios.com/dev/

The PTK has several windows versions ( GDI, DX , OPENGL and D3D ) , the mac version is currently only supporting openGL, but a "mac GDI" version will be coming soon.( i'm working on it right now )

Unfortunately i don't have any release date... :rolleyes:

patrice.

Fenix Down
06-28-2003, 06:53 AM
Basically, SDL (http://www.libsdl.org) will take care of all your cross platform needs. It includes 2D and 3D graphics (via OpenGL) as well as sound, input, thread support, etc.. The whole thing is cross platform and portable to many operating systems. Oh and it's licensed under the LGPL so it's totally free to use for any purpose.

Simple DirectMedia Layer supports Linux, Windows, BeOS, MacOS Classic, MacOS X, FreeBSD, OpenBSD, BSD/OS, Solaris, and IRIX. There is also code, but no official support, for Windows CE, AmigaOS, Dreamcast, Atari, QNX, NetBSD, AIX, OSF/Tru64, and SymbianOS.

For apps FOX (http://www.fox-toolkit.org/) might be helpful, it's a cross platform "Toolkit for developing Graphical User Interfaces."

PaulNZ
06-28-2003, 08:55 AM
I may be stating the obvious here, but...

One thing to keep in mind is that when porting from Windows to Linux the CPU is the same (x86/IA32). The Mac however has an entirely different CPU (PowerPC). This generally won't matter EXCEPT that the endianess is different. So if all your game data (levels, maps etc) is created on the PC and the data has shorts or ints that you read out of memory with pointers the byte order will be reversed.

Just something to keep in mind...

patrox
06-28-2003, 09:56 AM
Yes, our library has endian flipping commands.

It's more a "C++ blitz basic" than a SDL like.

pat.

zoombapup
06-28-2003, 11:26 AM
Patrox, any idea when youre likely to ship this lib youre talking about?

Will it come with source code?

I'm just trying to cut down on the time my and my partner have to spend in coding non essential stuff.

.Z.

kerchen
06-28-2003, 01:59 PM
Um, what about Java?

princec
06-29-2003, 01:04 AM
Yeah, I normally chime in about Java too at this point. Oh wait - I have!

Java's got a few advantages on top of the other platforms, them mainly being:

The tools are all free. I recommend Eclipse (http://www.eclipse.org) and JDK1.4.2 (http://java.sun.com)
Debugging support is fantastic. Even if you don't use the brilliant debugger in Eclipse you'll find that the exception stack traces built in to exception handling help you debug applications even after deployment. This might even be Java's most powerful feature.
It really does run on Windows, Linux and Mac - and without a recompile. There's only one download for your users to choose*
You generally will manage to write stuff a lot quicker than if you try using C++. I'm experienced at both, and it's a fact.

It's got some disadvantages too:

The JRE is a bloody large download at 10MB or so. This is generally not a problem for Linux users, who are enthusisasts; and Mac users, who got it bundled into their O/S recently; but Windows users have a problem. It has been noted that all new Dells and HP machines will ship with the latest JRE preinstalled though. Give it time.
To get anything approaching decent reliable performance you'll need to use a tiny bit of native code to enable you to access OpenGL and OpenAL, because Java's graphics and sound rendering is pretty abysmally slow. Recently Java 2D has gotten a lot faster - as fast as anything in fact - but a 3D API gives you just that extra bit of flexibility. I recommend LWJGL (http://java-game-lib.sourceforge.net) (because I designed it :P )
It's still an order of magnitude more complex and slower to make things happen than Blitz Basic. It is of course vastly more flexible and considerably faster but that depends on how complex and fast your game needs to be.
There is even more misinformation about Java programming on the web than any other language. Even the experts are usually wrong.


Cas :)

* and the native DLLs you might choose to use are so small you can bundle all 3 with the zip anyway

zoombapup
06-29-2003, 02:10 AM
Java is something I'd seriously have to test before I used it as a game development platform, Ive heard claims of cross-platform development in java before, but the reality seemed to turn out different.

I'd rather use the language I'm used to (C++) anyway, because I'd rather not lose those skills.

We'll probably end up either licensing/buying in a platform independant SDK (as long as it had source) or writing our own platform layer OR using an SDL wrapper.

For the 2D games we're doing, we want to really keep download size to a minimum, so 10meg of download for a runtime is simply not possible.

.Z.

princec
06-29-2003, 02:30 AM
Well, you can buy a Java compiler (a little expensive at £500 but worth every penny) which gets your exe's down to size.

You can see it in action if you have a go at Alien Flux. And if you've got a Linux box handy and configured right with Java on it you can see it running on Linux too.

Cas :)

zoombapup
06-29-2003, 03:03 AM
I'm not really THAT interested in linux, apart from dedicated server stuff, it doesnt seem like a substantial market for my kind of customers, but that doesnt mean I wont support it, its just not a priority.

My main concerns right now are PC and Mac 2D stuff (I use torque for 3D stuff).

.Z.

Siebharinn
06-29-2003, 03:14 AM
My main concerns right now are PC and Mac 2D stuff (I use torque for 3D stuff).



There are a couple projects being discussed in the GarageGames forums where people have used Torque for 2D games as well.

princec, how do you get around the fact that Java doesn't have an unsigned 8 bit data type? Or has that been an issue at all?

princec
06-29-2003, 04:16 AM
No issue at all. If there's any calcs to be done they get cast up to ints anyway. Occasionally you have to do a little masking here and there. They're only used for colours anyway.

Cas :)

Siebharinn
06-29-2003, 05:08 AM
Another Java question. What's wrong with Java3D? I thought that it was supposed to be a thin wrapper around whatever 3D APIs the target system had. Same thing with Java sound. It doesn't work out that way?

princec
06-29-2003, 05:43 AM
No, they were never meant to be thin at all. And consequently they took far too much control away from the game developer, and as a result - they sucked :)

Cas :)

Jake Stine
06-29-2003, 07:36 AM
Yeah, Sun really paid no attention to the concept of using Java for game development... ever. Java2D and Java3D are intended for implementation of paint programs, cad design, and similar applications. In fact, there are specific guidelines listed in the platform implimentation guide stating that implimentations of the APIs should always err on the side of consistency and stability over performance; that as long as performance is 'tolerable' in an applications environment the goal is achieved.

Likewise, the APIs are very much tailored in a way that would only lend itself to use in complex applications of that nature. Simply drawing a couple straight lines is nearly as much work as rendering an entire vectorized scene filled with complex clipart.

Generally speaking, Sun has had no interest in turning Java into a viable gaming platform until very very recently, and despite what they might have said publicly, they fully believed that trying to provide better built-in gaming capabilities would needlessly clutter their little brain child. I think the event of the java-implemented cell phones, and the groth of the game market as a whole, has helped them to finally realize some of the value in gaming.

princec
06-29-2003, 07:46 AM
That said - what the world really needs is Blitz Basic implemented on top of a Java runtime. I wish I had the time to do it!

Cas :)

astrofish
09-06-2003, 04:15 PM
Originally posted by zoombapup
I'm thinking both games AND applications/tools.

Can anyone recommend some good solid tools?


For apps, I've found wxWindows to be very nice. Cross-platform (though I only tried building under windows), extensive functionality, and license is LGPL with additional freedoms. Also, good documentation and an extensive set of sample programs.

Should be usable for games as well, but I don't know how fast it is, and it's probably a bit overkill for most games (although you can compile custom versions containing only the main functionality you need).

Cheers - Steve

Dan MacDonald
09-06-2003, 08:38 PM
If you haven't checked out patrox's PTK you should, It's only $5 to evaluate and it's a lot of fun to play with. I really believe that PTK will be one of the best platforms for indie development of crossplatform 2D games.

oNyx
09-07-2003, 05:38 AM
Originally posted by princec
That said - what the world really needs is Blitz Basic implemented on top of a Java runtime.[...]

Processing is like that -> http://proce55ing.net/

Check the examples and their goddamn short source code. I guess that it's already good enough to make small browser games and it might get usefull in the not to distant future.