Programming games in C++

xDexx
Unregistered
 
Post: #1
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
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #2
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/.
Quote this message in a reply
xDexx
Unregistered
 
Post: #3
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
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #4
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...
Quote this message in a reply
Moderator
Posts: 697
Joined: 2002.04
Post: #5
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 Huh)

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Member
Posts: 20
Joined: 2002.12
Post: #6
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

"Programmers are tools for converting caffeine into code."
Quote this message in a reply
macboy
Unregistered
 
Post: #7
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.
Quote this message in a reply
Founder
Posts: 1,138
Joined: 2002.04
Post: #8
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
Quote this message in a reply
xDexx
Unregistered
 
Post: #9
ive had my eyes on that book for a while... i wish it wasnt so expensive!
Quote this message in a reply
Member
Posts: 196
Joined: 2002.04
Post: #10
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!
Quote this message in a reply
Moderator
Posts: 697
Joined: 2002.04
Post: #11
OpenGL itself should be pretty easy to get the hang of; there are plenty of tutorials at NeHe, and a few at neheX, only a few because I'm slow and haven't finished the images for the site or finished uploading the tutorials - sorry Blush

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Michael
Unregistered
 
Post: #12
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.
Quote this message in a reply
xDexx
Unregistered
 
Post: #13
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
Quote this message in a reply
Moderator
Posts: 697
Joined: 2002.04
Post: #14
I'd forgotten this (just remembered as I demoed it to a teacher today Rasp ), 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
Quote this message in a reply
xDexx
Unregistered
 
Post: #15
i looked at neheX, that is exactly what i was looking for! its simple and i understand it! im so excited! but i have one question, what does glTranslatef() do? i changed the numbers and the polygons move constantly across the screen. thanks!!!
-brett
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Graphic Programming for Games brucegregory 24 7,826 Dec 30, 2005 05:24 PM
Last Post: ChrisD