Sdl, X11, Os X...
I seem to remember reading that libsdl.org Mac OS X libraries are meant for Aqua use, and not X11. Now, I haven't started any sort of SDL development (for a lot of reasons), so I thought I'd make sure I knew what I could and couldn't do first.
I'm interested in teaming up with a number of friends to develop cross-platform games (we have OS X, Windows and Linux access between us), so I thought SDL and OpenGL would be good choices.
I'd like to work with Objective C, simply because I like it and it makes some sense to me, but it's not world-ending if I'm forced to use C and C++.
What's the deal with OpenAL? Doesn't SDL handle audio?
Yes, these are newbie questions. But, guess what, I'm a newbie. Oh, and 5thPeriodProductions = WaaMatt (used to post here under that name).
I'm interested in teaming up with a number of friends to develop cross-platform games (we have OS X, Windows and Linux access between us), so I thought SDL and OpenGL would be good choices.
I'd like to work with Objective C, simply because I like it and it makes some sense to me, but it's not world-ending if I'm forced to use C and C++.
What's the deal with OpenAL? Doesn't SDL handle audio?
Yes, these are newbie questions. But, guess what, I'm a newbie. Oh, and 5thPeriodProductions = WaaMatt (used to post here under that name).
Eh, why would SDL support X11 on Mac OS X when X11 is an optional package? As for your audio issues, I'd suggest you take a look a SDL_mixer.
Mark Bishop
--
Student and freelance OS X & iOS developer
You can build SDL for X11 on Mac OS X if you want to, though I don't know why you would. The native port works perfectly well.
You can use ObjC on all the platforms, but you don't get any Cocoa with it, and it forces you to use GCC on all the platforms, which probably won't go down too well with your friends
SDL has its own audio (SDL_mixer) but OpenAL is also a good choice, and potentially hardware-accelerated if the user has audio hardware.
You can use ObjC on all the platforms, but you don't get any Cocoa with it, and it forces you to use GCC on all the platforms, which probably won't go down too well with your friends

SDL has its own audio (SDL_mixer) but OpenAL is also a good choice, and potentially hardware-accelerated if the user has audio hardware.
SDL can handle audio itself without any extra libraries, but you're obliged to mix the audio yourself. That's potentially quite technical, although you can do anything you like with it that way.
To make life easier for people who don't know how to mix audio, SDL_mixer offers a much simpler API. As its name suggests, SDL_mixer can mix audio files to produce multi-channel sound. It's quite easy to use, but it's also rather limited. For example, you can't do a pitch bend (or at any rate, you couldn't the last time I looked). You could still write and plug in your own mixer effects, though.
OpenAL, on the other hand, has all sorts of features built in, including reverb and spatial 3D effects. I haven't tried OpenAL myself, but from what I can gather it's an OpenGL-style state machine, and I would imagine it's somewhat more complex than SDL_mixer.
If you want an easy life, start with SDL_mixer. If you want to dive in and prepare to do something sophisticated, try OpenAL.
To make life easier for people who don't know how to mix audio, SDL_mixer offers a much simpler API. As its name suggests, SDL_mixer can mix audio files to produce multi-channel sound. It's quite easy to use, but it's also rather limited. For example, you can't do a pitch bend (or at any rate, you couldn't the last time I looked). You could still write and plug in your own mixer effects, though.
OpenAL, on the other hand, has all sorts of features built in, including reverb and spatial 3D effects. I haven't tried OpenAL myself, but from what I can gather it's an OpenGL-style state machine, and I would imagine it's somewhat more complex than SDL_mixer.
If you want an easy life, start with SDL_mixer. If you want to dive in and prepare to do something sophisticated, try OpenAL.
Ah, I'd definitely like to start off simpler.
The reason I'd want to use a non-Aqua windowing system is for ease of porting. I'd rather not have three different versions of the code to accomodate a Mac windowing system, a Windows windowing system, and a *nix windowing system.
Thanks for the feedback on the differences of SDL's audio capabilities and OpenAL. I think OpenAL is a great idea for the future of my developing and coding capabilities - I have a history of working with sound and effects (ah, SoundEdit 16...).
The reason I'd want to use a non-Aqua windowing system is for ease of porting. I'd rather not have three different versions of the code to accomodate a Mac windowing system, a Windows windowing system, and a *nix windowing system.
Thanks for the feedback on the differences of SDL's audio capabilities and OpenAL. I think OpenAL is a great idea for the future of my developing and coding capabilities - I have a history of working with sound and effects (ah, SoundEdit 16...).
I'm curious as to what you mean when you state you would need to 'accomodate' the windowing systems of the three platforms, as SDL already has the capability for creating OGL contexts..?
Mark Bishop
--
Student and freelance OS X & iOS developer
5thPeriodProductions Wrote:The reason I'd want to use a non-Aqua windowing system is for ease of porting. I'd rather not have three different versions of the code to accomodate a Mac windowing system, a Windows windowing system, and a *nix windowing system.In theory, code written for SDL should be mostly the same on OSX, Windows and *nix. That's the whole point of SDL. As such, you're almost certainly better off using the native version of SDL on OSX rather than the X11 version. I mean, no-one uses X11 apps on OSX unless they absolutely have to....
Typically, if you're using SDL you are specifically not using a window system. SDL is designed to produce a fullscreen display or a single window, and it doesn't have anything much to do with any other GUI features such as menus and buttons. If you need these features, you probably don't want to use SDL.
OneSadCookie Wrote:You can use ObjC on all the platforms, but you don't get any Cocoa with it, and it forces you to use GCC on all the platforms, which probably won't go down too well with your friends.I was under the impression windows gcc only supported C/C++

It's not magic, it's Ruby.
I can't get any X11 apps to work (meaning I don't know how to use X11)...btw, does anyone have a link to SDL_image? Getting it from Fink didn't work too well during install while installing from source. It was missing all of the headers...
Last login: Sat Aug 6 09:15:05 on console
Welcome to Darwin!
Matt-Chelens-Computer:~ matthew$
Blorx2 Wrote:I can't get any X11 apps to work (meaning I don't know how to use X11)...btw, does anyone have a link to SDL_image? Getting it from Fink didn't work too well during install while installing from source. It was missing all of the headers...Have you tried here? Looks like you need to build it yourself these days....
Ha... Silly me. I'm going to be doing full-screen apps. I did want to make a couple of utility-style game-related apps that were window-based, but its not the end of the world if I make them OS X only. Heehee.
I played around with some SDL tutorials... Fun stuff! But, now I realize that I need to learn trig. : (
I played around with some SDL tutorials... Fun stuff! But, now I realize that I need to learn trig. : (
Nayr Wrote:I was under the impression windows gcc only supported C/C++
Travelling the interweb to http://gcc.gnu.org . . .
At the top:
"GCC, the GNU Compiler Collection, includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as libraries for these languages (libstdc++, libgcj,...)."
-Jon
Yes. But it comes with the objc library, not foundation. (which is probably what 5PP wants.)
[edit] More arguments. If they were to hypothetically use Foundation some way, they would have to package it in with the binaries, which is hard on linux.[edit2][/edit][/edit2]
[edit] More arguments. If they were to hypothetically use Foundation some way, they would have to package it in with the binaries, which is hard on linux.[edit2][/edit][/edit2]
It's not magic, it's Ruby.
Blorx2 Wrote:I can't get any X11 apps to work (meaning I don't know how to use X11)...btw, does anyone have a link to SDL_image? Getting it from Fink didn't work too well during install while installing from source. It was missing all of the headers...How did you include them? "SDL_image.h", or <SDL_image/SDL_image.h>?
switch them, and see if that works.
It's not magic, it's Ruby.
Like I said, you don't get any Cocoa with it, but Cocoa != ObjC, and it does you no good to confuse them.
GNUStep's Foundation may work on Windows, though how well GNUStep's foundation works in general is another question...
Putting a DLL next to an executable on Windows is trivial...
GNUStep's Foundation may work on Windows, though how well GNUStep's foundation works in general is another question...
Putting a DLL next to an executable on Windows is trivial...