Programming games in C++
i have taken a c++ class and an OOP in c++ class. i would like to program games on the mac. i have never programed games execpt in director and basic. i dont have the slightest clue as to where to start. i would like to program in C++ not cocoa. what is an API? what is a framework? if anyone can help me with this, that would rock! thanks!
-brett
-brett
API in the FAQ: http://www.crissman.net/macgamewiki/index.php/API
A framework is a folder with a particular structure, containing header files, a library defining the functions in those headers, and possibly resources used by the library. Frameworks are a Mac OS X thing. You can find them by looking in /System/Library/Frameworks/.
I'd suggest GLUT as an easy place to start learning to program games. You can find GLUT examples in /Developer/Examples/OpenGL/GLUT/, as well as all over the web. You can find OpenGL tutorials on http://nehe.gamedev.net/.
A framework is a folder with a particular structure, containing header files, a library defining the functions in those headers, and possibly resources used by the library. Frameworks are a Mac OS X thing. You can find them by looking in /System/Library/Frameworks/.
I'd suggest GLUT as an easy place to start learning to program games. You can find GLUT examples in /Developer/Examples/OpenGL/GLUT/, as well as all over the web. You can find OpenGL tutorials on http://nehe.gamedev.net/.
ive looked at GLUT, it just confuses me. i cant get the totorials to work. and i DONT want to program in cocoa. i want the option of my programs running on a computer without a opengl video card. any other suggestions? thanks
-brett
-brett
Well, if you want to make your life difficult, you could try Carbon/QuickDraw... but if GLUT confuses you, Carbon's going to blow you into next week...
SpriteWorld? I'm pretty sure that has a C++ implementationĂ– also, you could check out Ricore (though I don't know much about its capabilities, and the link on iDG's front-page is dead
)

Mark Bishop
--
Student and freelance OS X & iOS developer
I would suggest going with Carbon, <Your Language of Choice>, and QuickDraw.
BTW: Carbon is an API
P.S. If your not concerned about OS X compatibility, you might want to check out SAT
BTW: Carbon is an API
P.S. If your not concerned about OS X compatibility, you might want to check out SAT
"Programmers are tools for converting caffeine into code."
I would just like to state that QuickDraw can (at times) be quite slow. Most computers (or at least Macs) have an OpenGL-compatible video card these days.
How about starting with "Mac Game Programming" by Mark. It is listed in the sticky post in the Game Dev message board. (ie Game Dev books.)
Carlos A. Camacho,
Founder
iDevGames
GLUT is the best way to go. Everyone on Mac OS X has a decent accelerator card I think Apple has some GLUT code that works really well. Check their web site in the Mac OS X developer source code section for GLUT Examples or if you've installed the Developer Tools CD it's already installed in your /developer/examples/GLUTExamples folder. The one I'm talking about contains like 30 examples to get you started. It compiles fine on my iMac Graphite. You've got to start somewhere and Apple's developer section can also be a really big help.
Hope this helps,
Iceman
P.S. My favorite is GLUTMech very cool lighting!
Hope this helps,
Iceman
P.S. My favorite is GLUTMech very cool lighting!
I would highly suggest just learning the standard Mac toolbox graphics functions first. I wrote many games using nothing but functions like LineTo() and FrameRect() and GetKeys() before learning anything more complicated than that, and the advantage is that you can see results quickly. And knowing those functions is still useful for me even though I've learned to use other stuff. If I have an idea for a game, I can create a mock-up in a few hours that uses rectancles and ovals in the place of the objects, rather than building the whole thing from scratch.
that sounds good, where is the best place to start with the standard Mac toolbox? would apples website have the best info on that? thanks for all the help!
-brett
-brett
I'd forgotten this (just remembered as I demoed it to a teacher today
), but Leonardo is a free C interpreter, and has built in graphing functions which can be used for primitive graphicsĂ– it includes a Tetris-clone as an example programĂ– the only problem is there's no OSX version yet.

Mark Bishop
--
Student and freelance OS X & iOS developer
Possibly Related Threads...
Thread: | Author | Replies: | Views: | Last Post | |
Graphic Programming for Games | brucegregory | 24 | 13,668 |
Dec 30, 2005 05:24 PM Last Post: ChrisD |