PDA

View Full Version : Installing the SDL for making games with XCode




mkawick
Oct 25, 2008, 10:51 PM
Hi community,

I am a long-time game developer having worked for companies like Konami, Ion Storm, EA, and a few others. I recently bought a Mac, on which I have limited experience, and I've been attempting to prototype a demo in OpenGL.

So I got my landscape engine 'complete' (very basic) and then I found this magic engine called SDL. This might save me some work....originally I was attempting to create a standard game loop but none of the timer stuff worked with a Cocoa OpenGLView and somehow, the parent window class can't communicate with the child OpenGL window... blah, blah, blah,...

Installing the SDL has been a hoot :mad: : it's taken on a life of its own and instead of developing a game engine... well, I've gotten nothing done while I attempt to install the SDL. After 2 downloads and many attempts at copying SDL.Framework to "MacintoshHD/Library/Frameworks" along with copying the headers directory into a new project, and such, this has been almost a week wasted (roughly 10 hours).

Is there a clear tutorial on installing the SDL? I really am hoping for something that will allow me to open up XCode, click on File/New, and find the SDL OpenGL project as an option. This has so far, not worked. I currently have XCode 3.0 installed and I am attempting to install a version of SDL dated in 2008 (1.2.13).

Barring that, is there a different way to use SDL that isn't so hard to do?

Thanks ahead.



neonblue2
Oct 26, 2008, 12:20 AM
Not sure if this'll help you but it's the first thing that popped up.

http://www.meandmark.com/sdlopenglpart1.html

Cromulent
Oct 26, 2008, 12:35 AM
Dead easy to install.

Go to this site:

http://libsdl.org/download-1.2.php

and download these two files:

SDL-1.2.13.dmg
SDL-devel-1.2.13-extras.dmg

Copy the framework to /Library/Frameworks
Then in the devel file copy the Xcode templates to the correct directory shown in the Readme.
Open Xcode.
Make new project and select the SDL OpenGL template.
Import previous code.
Done.

mkawick
Oct 26, 2008, 02:22 AM
So I performed step one which is to copy SDL.Framework (the entire folder) to the following: /Library/Frameworks ... I believe it's just an alias, but I don't think that it matters... the finder isn't something I completely understand.

For step two, I copied TemplatesForXCode to the following directory: /Library/Application Support/Developer/Shared/Xcode/Project Templates/Application
The last two directories did not exist so I created them (Project Templates and Application). Again, these copied directories are probably aliases .. I don't know how to tell, but command-c, command-v.

Opening XCode, I see no changes to the 'New project...'. I am looking under 'Application' and 'Command-line utility'. Do I need to reboot or something (I have already tried that several times).

Cromulent
Oct 26, 2008, 02:26 AM
So I performed step one which is to copy SDL.Framework (the entire folder) to the following: /Library/Frameworks ... I believe it's just an alias, but I don't think that it matters... the finder isn't something I completely understand.

For step two, I copied TemplatesForXCode to the following directory: /Library/Application Support/Developer/Shared/Xcode/Project Templates/Application
The last two directories did not exist so I created them (Project Templates and Application). Again, these copied directories are probably aliases .. I don't know how to tell, but command-c, command-v.

Opening XCode, I see no changes to the 'New project...'. I am looking under 'Application' and 'Command-line utility'. Do I need to reboot or something (I have already tried that several times).

You don't copy the folder TemplatesForXcode you open it and copy the contents to that location. Pretty straight forward, just do what it says in the Readme files.

Just drag and drop to make sure you're not doing something silly by accident.

mkawick
Oct 26, 2008, 02:52 AM
What the magic was...

That step two directory ... almost none of it existed and I missed the exact location several times although I copied stuff to other directories that looked similar.

Thanks for the advice. How are thing in lovely old England?