PDA

View Full Version : Freepascal/JEDI-SDL cross-platform rules!



VilleK
01-11-2007, 04:26 PM
I've just ported my runtime game engine to Linux and OS X with Freepascal + JEDI-SDL and it worked with a minimum of trouble!

Screenshots of my engine running on Windows, Mac OS X, Ubuntu Linux:

http://www.zgameeditor.org/images/fpsdemo_small2.jpg http://www.zgameeditor.org/images/zge_shot5_mini.jpg
http://www.emix8.org/images/zge_ubuntu_400width.jpg

The combination of Freepascal+JEDI-SDL+VMWare makes cross-platfom development really possible for a single developer with a single PC :)
A big "thank you" to the FP/JEDI-SDL team!

savage
03-11-2007, 09:58 AM
Hey, this looks great. Which IDE did you use on Mac OS X? Lazarus or XCode? or was it all command line?

VilleK
03-11-2007, 10:57 AM
It is all command line. When I wanted to make code changes I did it on my windows machine and then transfered the file to the target platform and recompiled from a terminal window. For no other reason than I didn't want to learn new keyboard shortcuts in a text editor :) . XCode integration seemed to work quite well when I took a quick look at it.

noeska
04-11-2007, 09:37 AM
Could you provide some more background info?

E.g. is having a pascal source using opengl and sdl enough for recompiling on linux and/or osx or do the sourcefiles stil need to be edited for other platforms?

Also is your osx ppc or x86 based or doesn't that matter?

User137
04-11-2007, 10:13 AM
I wanted to try this once too but my Ubuntu doesn't know how to use ATI compatible drivers, and so no hardware acceleration. Tried about everything different forums and sites suggested.

VilleK
04-11-2007, 04:47 PM
Could you provide some more background info?

E.g. is having a pascal source using opengl and sdl enough for recompiling on linux and/or osx or do the sourcefiles stil need to be edited for other platforms?

Also is your osx ppc or x86 based or doesn't that matter?

This is a good guide:

http://wiki.freepascal.org/index.php/FPC_and_SDL

My code runs on x86, I haven't tried compiling for PowerPC. Freepascal have separate installations for x86 and ppc. JEDI-SDL should work with both I think.

The only thing I needed to change in my source files was a reference to the "\"-path separator in filenames (which is "/" on Linux/OS X). Otherwise it compiled without changes. Even a tiny bit of assembler code that I have works because it is all intel-platforms. Of course I have used no Windows specific units in my code.

WILL
04-11-2007, 05:25 PM
The "/" path separator sould work for Windows as well. It's the more 'cross-platform' way to denote your game's relative paths.

JEDI-SDL is probably one of the most flexible libraries for cross-platform game development in Pascal. Save maybe some of the OpenAL/OpenGL headers around.

Great compilation image btw! ;)