My apologies, but I have a few rather vague questions for anyone here with a good bit of experience with C++, particularly DeProgrammer.
@DeP: I’m pretty sure I recall that you have some experience making a game or two with C++, and aside from that, a great number of other programs and applications. Is this correct? If so…
I’m curious - how does one get started developing a game in C++? I’m familiar with the C++ syntax and general concepts, no problem, but have no idea how to even, say, set up a basic window and draw a sprite in it. Hah! I’m due to take classes on the subject next semester, and maybe even directly after the end of this semester, but I’m feeling slightly impatient (knowing a whole bunch of C++ but not being able to do much of anything with said knowledge), and wondering if anyone could give me some pointers on how or where to get started on simple game dev. in C++. Any help is appreciated!
You need to know 2 things to start making a game:
- How to open up a window!
- How to draw in that window!
Making a window is fairly easy, you can just copy/paste code. Making a window is done through the OS, so it’s part of the Windows API if you’re writing a game for Windows.
Drawing in the window is entirely separate, and can be done through DirectX or OpenGL. Or, theoretically, the Windows API, but you don’t want to bother learning that >_>
But yeah, you’ll want to make a window and then grab an OpenGL tutorial and work from there
I’ve never completed any sort of game, but I have a few code snippets I can send you if you’re interested to help you get started with drawing in a window.
What he said.
For making games, you generally need timing code, which means you’ll want a magic wand or two to go with that… Then yeah, you need to make a window, and for drawing you’ll probably want to use an OpenGL context. I can comment up my basic “make a window and rotate an OpenGL cube in it” program (written in C) if you want.
Lemme know if it’s too sloppy! http://dpmm.110mb.com/temp/hoorah.c
P. S. I have never actually used C++, I have never made a game in C (although I’m working on one), and everything that was useful/complete was made in VB. I’m willing to share my GenGine, too, but the code needs the heck commented out of it, and that’s a much bigger job than this little basic program…and, of course, GenGine needs upgrades and minor fixes.