Cross platform game code on a budget

Founder
Posts: 1,138
Joined: 2002.04
Post: #1
I've been following this thread on the Mac-Game-Dev list and thought it would be good to post this message here for other people's benefit and some debate...

Quote:I just thought people might be interested to see what I've turned up re:
cross platform game dev options (on a budget).

After some research I can see a few options...

1. Java library as suggested. http://java-game-lib.sourceforge.net/
PROS: Easily cross-platform
CONS: Runs in JVM (as far as I can tell)

2. C++ with SDL/OpenGL/OpenAL/FMOD
PROS: Common format with plenty of source available.
CONS: IDE and compilation vary with the platform (Project
Builder/Emacs/VC++) - easiest solution seems to be to use the standard
"makefile" and install MinGW for compilation on Windows (Cygwin requires
distributed software to be under GPL).

3. GNUStep with SDL/OpenGL
PROS: PROGRAM IN COCOA!! (This seems good to me as I like the Obj-C syntax)
Use common IDE (Project Builder is available for GNUStep - they call
it ProjectCentre - Unfortunately it is quite behind the current incarnation
of PB)
CONS: Requires installation of GNUStep run-time environment to run binaries
- which can be an annoying addition. Also, Windows binaries are considered
"unstable", but may be moving to "stable".

3. OGRE/Crystal Space
PROS: Well developed/Researched Game engines.
Documentation
Source code
Relatively cross platform (Crystal Space is OS X/Lin & Win & PS2)
Good licences (LGPL)
CONS: No major cons.
I personally would like to use OGRE, due to high quality
documentation, but it may not support OS X yet and I might have to do
porting work there.
Possible bloat issues.

Salter, Adam Q

Carlos A. Camacho,
Founder
iDevGames
Quote this message in a reply
DoG
Moderator
Posts: 869
Joined: 2003.01
Post: #2
I was always wondering about the real purpose of SDL. Has anyone used it? From what I have heard & read until now I couldn't decide if its a good or bad thing.

As far as OpenGL/AL go, I agree that they are good to use, though OpenAL needs more work.

C++ rules, even for cross platform dev. With very little effort, it is possible to pull a layer over platform dependent API calls, and so make 99% of the code platform independent (minus optimizations, of course).

As far as I am concerned, Java is still a big pain for users and developers alike, and platform independence is so-so.

OGRE and Crystal space are ready made engines, I don't see a challenge there Cool
Quote this message in a reply
Goober
Unregistered
 
Post: #3
Quote:Originally posted by DoooG
I was always wondering about the real purpose of SDL. Has anyone used it? From what I have heard & read until now I couldn't decide if its a good or bad thing.


Being a total Mac newb, I'm finding SDL to be a good thing right now. My priority is to port our Windows title to OSX, preferably in as short a time as possible Wink. SDL is helping to shield me from a ton of stuff that would take me a little while to get to grips with, and as such I managed to get our game up and running (albeit without certain features) in a few days. For future projects (where I have more time) I'll probably build my own framework, SDL is missing some features that would be nice to support eventually (rendering to a texture, making use of more advanced audio features, that sort of thing), but for now it's given me a great head-start.
Quote this message in a reply
Member
Posts: 268
Joined: 2005.04
Post: #4
Quote:I was always wondering about the real purpose of SDL. Has anyone used it? From what I have heard & read until now I couldn't decide if its a good or bad thing.

SDL is great if you want to quickly develop a program for as many platforms as possible. It's also good if you're not familiar with a particular environment (ie, Windows). It's not good if you need absolute speed (don't expect to write Doom 3 with SDL). I also hear there's some compatibility problems, but that's being improved with every release.

Basically, it's a good thing for rapid proto-typing on multiple systems. If you don't need cross-compatibility and are already familiar with the system you're programming for, avoid it.
Quote this message in a reply
Mars_999
Unregistered
 
Post: #5
SDL is great. You can call OpenGL from it. I don't see why it is slow? Yeah it probably isn't going to be as good a very optimized version of Win32API or some OSX API for OpenGL. The thing that is nice about SDL is multi-platform and it has many libraries that you can use inside of SDL. It has its own endianess functions, music, sound, fonts, ect... And Loki before they went out of Business used SDL for all their comerical game ports to Linux. The creator of SDL now works for Blizzard. Sam Latinga <- not sure on his lastname don't ax me for spelling it wrong! =) Java is great for cross platform development. I dont' know how well Java is running with OpenGL for speed compared to C/C++? Someone just did a Java port of Dungeon Master I think? Cool thing is it can run on Mac, Windoze, Linux, ect... Now Doom3 I would expect to not be coded in Java. From what I have read on Java, if you run C code in Java it slows down Java? I think Java would be good for some simple games and 2D or even a RPG, but serious 3D game engines I don't think Java would be a good choice. I had a shootem' up game with 3D models up and running on my PC before I dumped PC and came back to the Mac, all my code was in Win32API and will not port to well to Mac. Ugh!! Waste of time!Mad
Quote this message in a reply
Member
Posts: 268
Joined: 2005.04
Post: #6
Well SDL isn't slow, it's just not as fast as you can get without using SDL. I'm talking maybe 5-10 fps difference, so nothing major.

I've never used Java, but isn't it true that you can't use OpenGL if you're using Java? At least not directly?
Quote this message in a reply
Member
Posts: 440
Joined: 2002.09
Post: #7
Quote:Originally posted by Bachus
I've never used Java, but isn't it true that you can't use OpenGL if you're using Java? At least not directly?
You have access to accelerated OpenGL with GL4Java (OSX build: http://homepage.mac.com/gziemski/projects/)
Quote this message in a reply
Mars_999
Unregistered
 
Post: #8
http://java-game-lib.sourceforge.net/documents/

Will show you how to use Java and OpenGL.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Cross platform question kordeul 13 4,940 Aug 22, 2007 03:09 AM
Last Post: kordeul
  Cross-platform gui? Duane 13 5,074 Jul 6, 2007 06:38 PM
Last Post: mac_girl
  Best cross platform API for PC &amp; MAC Tarek Demiati 6 3,103 Apr 16, 2006 03:07 PM
Last Post: Dan Potter
  cross-platform code leggo 35 11,678 Jul 18, 2004 05:05 PM
Last Post: Fenris
  Cross-platform Solutions DJBlufire 13 4,797 Feb 16, 2003 02:40 PM
Last Post: athomson