Log in

View Full Version : Sound and graphics in FreePascal - Beginning Help



splattergnome
07-01-2007, 03:37 PM
I am thinking about wandering from Delphi and DirectX (via game development libraries) over to FreePascal for my next project, so that I can port it to Linux and MacOS. However, I have no experience with FreePascal or OpenGL - and my DirectX experience is also only over existing easy-to-use libraries. I was wondering what the best cross-platform graphics (SDL? OpenGL?) and sound libraries for FP are - and how easy are they for somebody to learn from scratch?

Since its supposed to be a small adventure game, I am not interested in 3D - just simple 2d graphics manipulation with alpha blending, mouse position detection, and potentially light / shading, if possible. As for sound any basic media player functions would be nice, although I really would enjoy 3d sound abilities.

And another question - since I am moving over from Delphi - are basic file accessing functions the same over all platforms, or would I have to relearn this as well?

I would appreciate any suggestions and comments. :)

splatty

cragwolf
07-01-2007, 04:35 PM
JEDI-SDL (http://sourceforge.net/projects/jedi-sdl) is what I use, in combination with OpenGL, even if I'm doing 2D stuff. There are some cool things that OpenGL allows you to do easily which can be very useful in 2D. How easy to learn from scratch? It takes a bit of work, but if someone as mediocre in intellect and as lazy as I can do it, then almost anyone can. Just be prepared to learn new things, and don't rush it.

JEDI-SDL has sound support, but not 3D sound. For that you can use OpenAL, although I'm not entirely sure about the cross-platform support of its Object Pascal headers (http://www.noeska.com/doal/).

And yes, Free Pascal has pretty much the same basic file accessing functions as Delphi. As well as some other neat functions, too.

Make sure you download at least JEDI-SDL v1.0 Beta Release 1. Or get your hands on the CVS version. The full 1.0 version is expected to be released some time this year.

splattergnome
09-01-2007, 01:57 AM
Thank you, that sounds very encouraging. Luckily, the project is planned to be relatively simple scope-wise, so I am not worried about overdoing myself - so I have more time to spend to learn and adapt. :)

I could probably live without 3D sound, but I would love to have it, though... I'll check OpenAL and other libraries and see what I can find.

Thank you for pointing me in the right direction. :)

splatty