Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Games on OSX

Games on OSX
Thread Tools
Fresh-Faced Recruit
Join Date: Apr 2001
Status: Offline
Reply With Quote
Apr 23, 2001, 02:28 AM
 
Hello,
We are a developer of games for consoles and are now planning to support Mac OSX. I coded some games on Mac OS back when the PPC was first launched in the early 90's so I know Mac coding in "classic" mode. Games normally take about 18 months+ to develop, so our games will not be released for several years, therefore Mac OSX looks like the way to go. My questions are:

1. Is it possible to code for OSX using normal C (not ObjC)?
2. We don't want to use any frameworks if possible since our engine is multi-platform already. Are there any examples of native OSX code using OpenGL without frameworks?
3. Has the OSX event model/mainline changed from OS9? I haven't checked thoroughly, but the frameworks seem to hide a lot of the startup stuff that used to be done manually (i.e. init'ing the various managers).

Thanks for helping me get back on the Mac bandwagon : )
Brett Bibby
GameBrains
     
Dedicated MacNNer
Join Date: Jun 2000
Location: Dundas, Ontario, Canada
Status: Offline
Reply With Quote
Apr 23, 2001, 08:26 AM
 
I can't remember all the languages that the free Project Builder IDE understands but I know that C is fine. You only need Obj-C when accessing the API (only Obj-C and Java have run-time typing which the API depends on), not writing the rest of the code (in fact, all the OpenGL stuff I played with is straight C). You can use straight GLUT OpenGL without accessing any frameworks (other than the GLUT frameworks). Most of the NeHe examples are written in straight GLUT and they work really well with almost no code modified from the windows versions: http://nehe.gamedev.net/opengl.asp
At the very worst you would need a few methods to map to the frameworks whose functionality you wanted without actually modifying your core code. Can't really help you with the event model changes. I never had time to learn enough about Classic before I got into cocoa.

Good luck and I hope someone else can be of more specific help,
Jeff.
Spectral Class
"Shedding Light on Innovation"
     
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Apr 23, 2001, 02:51 PM
 
Exactly... You might like to look at CoreGraphics and things for getting a framebuffer to draw directly into....

You can confine OS X code into just a few platform-specific files, of course. And all C code is fine in Obj-C (C++ isn't but you can bridge it if you really need).

You only need Obj-C for calling the COCOA frameworks. You can call Carbon in pure C should you really want to (That's what Alias/Wavefront or whoever do for Maya, since they already had a large C++ codebase and didn't want to spend ages writing bridging code).
     
Fresh-Faced Recruit
Join Date: Apr 2001
Status: Offline
Reply With Quote
Apr 23, 2001, 06:51 PM
 
Thanks guys! It is nice to be back in a community of people that are helpful...
Brett
     
Addicted to MacNN
Join Date: Apr 2000
Status: Offline
Reply With Quote
Apr 26, 2001, 02:43 AM
 
im having a bit of a problem here. i figured out how to do the openGL programming using just the GLUT Frameworks, and the Nehe tutorials.
right now i want to try and make a simple Cocoa-OpenGL Demo, and i cant seem to figure it out. i assume we have to use the NSOpenGLView somewhere, but i can't seem to figure out how to use it. ive looked everywhere for sample codes,tutorials,whathaveyou, but to no avail. could someone point me to a sample code, i just have to figure out how to initialize, resize and draw a view.
thanks.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:24 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2