View Full Version : Right, any good C game tutorials?
DudetheCreator
2005.01.22, 10:59 AM
Does anybody know any good game turorials for C? Something really simple to start, that doesnt involve OpenGL (that's what I was told to get...).
???
Duane
2005.01.22, 12:29 PM
this uses c for most of the tutorials, but you can use C++ later, It's not incredibly different.
Anyway, NeonHelium (otherwise known as NeHe) (http://nehe.gamedev.net)
sealfin
2005.01.22, 01:01 PM
If you're not using OpenGL for the graphics in these tutorials, what are you using? SDL (http://www.libsdl.org/)? Allegro? (I don't know the link off-hand...) [any other libraries which I can't be bothered to list]? Otherwise your only real option for a 'game' is a text adventure...
And Nayr, for tutorials which don't involve OGL, sending somebody to NeHe is a pretty odd move ;)
ThemsAllTook
2005.01.22, 01:48 PM
You need to pick a graphics API. There's OpenGL, QuickDraw, Quartz, SpriteWorld, things like SDL that have their own...
QuickDraw is being deprecated in Tiger. Not recommended.
Quartz is typically too slow for real-time games, although some have managed to get it to run fast enough. uDevGames 2003 entry Garden Pests used Quartz.
SpriteWorld may be your best bet if you don't want to get into OpenGL. http://www.spriteworld.org/
OpenGL is, in general, the best choice. If you can afford a copy of the Red book (http://www.amazon.com/exec/obidos/tg/detail/-/0321173481/qid=1085976656/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/104-6707395-9803114?v=glance&s=books&n=507846), I'd highly recommend getting it.
- Alex Diener
Duane
2005.01.22, 02:34 PM
Allegro? (I don't know the link off-hand...)
That's for java, not C. ;)
That's for java, not C. ;)
There is most certainly a C/C++ version. I believe Steven used/uses it.
http://www.talula.demon.co.uk/allegro/
DudetheCreator
2005.01.22, 07:39 PM
Ok, thx
I got spriteworld... I'll try experimenting with that...
DirectX is windows only thing?
DudetheCreator
2005.01.22, 07:51 PM
Right, i got the OpenGl CFM SDK thing. And I have started out with the NeHe tutorials, but there is one thing I don't get:
This is going to sound really silly, and make me look really lazy, cuz it's probably the one thing that i havn't bothered to figure out which has stopped me from really learning anything.
How do incorporate the OpenGL SDK into an application I make? Do I have to? Do Macs already have it? Do I build my applications and just stick the SDK files in my apps reaources? Basically...When Xcode asks me what to do at the start, WHAT THE HECK DO I DO?
(* not necessary to answer
And how come the C++ that works on the windows computers at the course i took is different than in xcode ( ie: have to std:: before cout<<"blahblah"endl; )? And how come a terminal tool written in c that works on my computer, doesn't work on the Macs at my school?
*)
Thank you so much!
How do incorporate the OpenGL SDK into an application I make? Do I have to? Do Macs already have it? Do I build my applications and just stick the SDK files in my apps reaources? Basically...When Xcode asks me what to do at the start, WHAT THE HECK DO I DO?If you're using Xcode, you don't need to download any extra OpenGL SDK. Make whatever type of project you want (i.e., Carbon, Cocoa, etc) and then you'll need to add the OpenGL.framework framework to your project. OpenGL.framework can be found in /System/Library/Frameworks.
And how come the C++ that works on the windows computers at the course i took is different than in xcode ( ie: have to std:: before cout<<"blahblah"endl; )?Because the Xcode compiler is correct. ;) Perhaps whatever compiler you used at school assumes the std namespace. To avoid having to put std:: in front, put the line:
using namespace std;
Somewhere near the top of your file.
And how come a terminal tool written in c that works on my computer, doesn't work on the Macs at my school?A little more info would be needed to solve that one ;)
PowerMacX
2005.01.22, 08:50 PM
That's for java, not C. ;)
:blink: Where did you read that? :blink:
Allegro is a C/C++ library like say, SDL.
This is a good starting point: http://www.allegro.cc/
And this is the official site: http://alleg.sourceforge.net/
Najdorf
2005.01.22, 08:59 PM
uh, dont bother with allegro, its dying-dead, no real updates in ages
wadesworld
2005.01.22, 09:19 PM
And how come the C++ that works on the windows computers at the course i took is different than in xcode ( ie: have to std:: before cout<<"blahblah"endl; )?
Becuase most PC compilers will let almost anything pass as valid code - Mac compilers are much better about adhering to the standards.
And how come a terminal tool written in c that works on my computer, doesn't work on the Macs at my school?
If you wrote in in C with XCode, chances are your did a development build, which uses Zero-link and therefore it will work only on your computer.
To resolve it, change the build style to Deployment, then do a "Clean All" and rebuild.
The other possibility is that you're building on a 10.3 system and the system at schools is a 10.2 (or earlier) system. If that's the case, let us know and we can tell you have to resolve that.
Wade
geezusfreeek
2005.01.23, 01:01 AM
Becuase most PC compilers will let almost anything pass as valid code - Mac compilers are much better about adhering to the standards.
Actually, it is GCC, a cross-platform compiler, that is adhering to the standards. I am guessing you are using something other than GCC on the PCs. Maybe Intel's compiler or something? I don't know what compiler doesn't enforce namespaces.
maaaaark
2005.02.24, 06:57 PM
I've always liked www.gamedev.net
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.