SDL Question (porting)
Hi, I have a question regarding SDL. I want to make games for PC and MAC. As far as I'm aware, SDL can do both. But, I noticed that libs like SDL_mixer and SDL_image do not have Mac binaries. Is this the case? or is there something I'm missing? Another question is; how hard is it to port to Mac from Windows? I havent done anything on Mac before, but I want to know if there are complications such as binary file access or using SDL_image and SDL_mixer (I need png support as well as xm mod music). If I do not use any custom blitting routines, will SDL seamlesly take care of everything for me on Mac as well as PC, in terms of blitting (alpha?) and sound/music. thanks in advance Dmitriy [Edited by - dsafro on February 22, 2005 5:19:46 PM]
Quote:
Original post by dsafro
I want to make games for PC and MAC. As far as I'm aware, SDL can do both. But, I noticed that libs like SDL_mixer and SDL_image do not have Mac binaries. Is this the case? or is there something I'm missing?
It will work on Mac, but you must make the binaries yourself from the source. I can only imagine how much 'fun' that will be. Maybe you can request it from the creators. It says that it will run on all platforms supported by SDl, so I'm sure it's possible
Quote:
Another question is; how hard is it to port to Mac from Windows? I havent done anything on Mac before, but I want to know if there are complications such as binary file access or using SDL_image and SDL_mixer (I need png support as well as xm mod music).
I've never done anything like that myself, but from experience, porting is never easy. I know porting from DX to OGL in Windows is quite hard at times, so porting an entire game from Mac to Windows will also be lots of 'fun'.
Quote:
If I do not use any custom blitting routines, will SDL seamlesly take care of everything for me on Mac as well as PC, in terms of blitting (alpha?) and sound/music.
It should, but you will need to check the docs for Mac specific deficies. I know that there are some incompatibilities across the platforms in relations to some functions and how they work, so you will definitly need to look through the docs.
One thing to keep in mind is this from the docs:
Quote:
Unofficial ports, ports in progress
* Solaris, IRIX, FreeBSD
* MacOS
So you might want to reconsider Mac dev with SDL at the time, but the chocie is up to you. Best of luck!
- Drew
I wonder if anyone successfully ported their SDL games to Mac. The way people make SDL sound is that its really easy to write the code and port it over, but aparently its not as easy as it seams.
Is there a better way to develop 2D games for both mac and pc?
Is there a better way to develop 2D games for both mac and pc?
Quote:
Original post by dsafro
I wonder if anyone successfully ported their SDL games to Mac. The way people make SDL sound is that its really easy to write the code and port it over, but aparently its not as easy as it seams.
Well I mean it is more of an 'opinion' based concept. I mean I find C++ really easy, but a lot of other people find it hard, so there's going to be a slight discrepency over ideas presented. So, I would say you would really have to see for yourself to wheter or not it is what it lives up to be.
Quote:
Is there a better way to develop 2D games for both mac and pc?
If you were to use a different library, let's say something like GLFW, it might be easier [smile]. I really like GLFW from the image it has. I have not really even used it that much, but it seems so promising to me. Until it lets me down I will continue to suggest giving it a try. Take a look at my little article comparing the two in my profile. It is far from 'complete', but it should give you the basics of what's the difference between the two (in my opinions of course).
- Drew
I have looked at the GLFW, and it is pretty cool indeed, but, I am trying to stick strictly to pure 2D and not use 3D hardware at all. Also I need support for mod music (xm).
I was really hoping that SDL would let me port my windows code to Mac as seamless as possible, without too much hassle. And pure 2D is definitely a requirement. i think that using plain SDL should not have many issues, but libs like sdl_image and mixer seems to be very troublesome, and those are the ones I would need for png files and xm music.
sigh...
I was really hoping that SDL would let me port my windows code to Mac as seamless as possible, without too much hassle. And pure 2D is definitely a requirement. i think that using plain SDL should not have many issues, but libs like sdl_image and mixer seems to be very troublesome, and those are the ones I would need for png files and xm music.
sigh...
Ahh I see your delima then. I'd say go for SDL then and hope for the best when it comes to adding music and such. I mean you could always write your own audio library for use on mac and such, but that takes some additional time. I guess there is no "1 size fits all" when it comes to cross platform development. Maybe someone else here on GameDev has done Mac programming before in SDL and can provide some advice.
I hope someone has some information on this.
Another quick question I have about SDL. Is it able to switch between Windowed and Fullscreen modes at runtime? I would think that it should be able to handle such task, but who knows.
I currently have a game half way done, it is 2D but I use 3D hadrware (DX8). So now I decided that using hardware for such a game is not a neccesity, and that I would like to port the game as well. That means I have to cut back on some effects such as rotations, scalings, and some alpha. But form business perspective, this is a good move, because the game is 2D, and I think that potential buyers increase with multi platform support as well as small system requirements.
I really hope this works out for me.
thanks for all the advice.
Another quick question I have about SDL. Is it able to switch between Windowed and Fullscreen modes at runtime? I would think that it should be able to handle such task, but who knows.
I currently have a game half way done, it is 2D but I use 3D hadrware (DX8). So now I decided that using hardware for such a game is not a neccesity, and that I would like to port the game as well. That means I have to cut back on some effects such as rotations, scalings, and some alpha. But form business perspective, this is a good move, because the game is 2D, and I think that potential buyers increase with multi platform support as well as small system requirements.
I really hope this works out for me.
thanks for all the advice.
Quote:
Original post by dsafro
Another quick question I have about SDL. Is it able to switch between Windowed and Fullscreen modes at runtime? I would think that it should be able to handle such task, but who knows.
SDL_WM_ToggleFullscreen can do this, but it's only implemented on X. You can shut down the video subsystem and start it back up again (I think) to do this though. If you don't need any DirectX specific features, you can use SDL and OpenGL for hardware-accelerated, and some of SDL's 2d operations will be accelerated on some platforms.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement