I just started to learn how to do C++ and, though I would like to go on
to bigger greater things, I realise that I need the basics first. I’ve
been looking around for some simple game tutorials such as Snake,
Tetris, Tic-Tac-Toe or whatever other simple games out there that will
help me learn C++ and haven’t found any. Maybe I’m just not looking hard
enough. Anyway I was wondering if anyone here had any websites that have
simple game tutorials.
Thanks in advance.
Please log in or register to post a reply.
Check out the ultimate old-school programming source: Programmer’s
I suggest that you don’t work from a tutorial. If you have a specific
question about something you need help with, we can help you, but I
would suggest you learn most of the things yourself. I would look into
SDL to get something to draw to the screen with and go from there. Read
the documentation for that until you are clear about what you would like
Don’t be afraid to make mistakes while programming. If it can be
written, it can be rewritten better. The important thing is to get
something working and make it better. Rinse and repeat.
Learning the problem-solving skills required when making games now will
save a lot of pain later when you’re trying to think about how to
implement something a lot more complicated, maybe something someone
hasn’t done before.
Where can I get information on how to do anything with SDL? As you can
see I still now very little and am just starting and still getting the
hang of all the terms. What the heck is SDL? Do I have to download a
program to use or do it? and where can I get a tutorial or something to
teach me about that?
SDL is a media library. Basically, it’s a set of functions that let you
draw things to the screen quickly.
It can be found here. There is
information about setting it up on a number of compilers and information
about its internals and how to use it efficiently. What I would do is
read a few of the articles on how to write pixels to the screen, then
try to write a Pong game. It will most likely be one of the hardest
things programming-wise you will ever have to do, being your first
I don’t know how adept of a programmer you are right yet, so I’m not
sure if I can direct you here right now knowing whether or not you’ll be
able to do it. Just keep at it and you’ll get there.
You don’t have to be very adept to use SDL, it’s really not any harder
or easier than simply using cout and updating the screen with text to
represent the various game objects.. in fact I kind of think it’s easier
than that… (that’s how I wrote my first tic/tac/toe program, just
updating the text every frame, sdl is not really harder than that).
SDL is nice because it works on multiple operating systems. So if you
are learning to program in VC++ it’ll work and if you are learning in
DevC++ or in Linux it’ll work well.
To create something like pong, you probably wouldn’t write pixels
directly to the screen, that would be pretty slow to draw every pixel of
the paddle over and over. Instead you would blit a bitmap to the screen
which you would move around and erase as you moved it. It shouldn’t be
difficult at all to make a basic white paddle in bmp format for use.
The worst part of tutorials for me is that generally the writers don’t
have an interest in explaining everything you are doing. A lot will just
throw up the lines and expect you to understand them. So, I can try to
help if there is anything you don’t understand (and I’m learning this
too so I’m no expert I’m sure others here can help you even better :P)
<— is a page with 6 decent tutorials that are reasonably in depth. If
for some reasons you aren’t even understanding the non-sdl code here
(like .. int array; ) then that means that you need to actually get
some basic C++ tutorials. He doesn’t really use any advanced C++ in the
tutorials though so you won’t have to worry about much if you know your
Even if later on you decide you don’t like SDL just the basic ideas will
pretty much convert to anything else. I’ve been reading opengl tutorials
that were made without sdl and writing them using sdl (for bmp image
loading, creating the window, handling events) and it’s pretty much the
same whatever library you use for the basic stuff.
I do have an SDL/OpenGL book coming out in November-ish…;)
It’s a book targeting beginners, so it might be what you need to get a
devmaster forum members website that has some great DirectX tutorials.
For the sake of us linux users please dont use DirectX :)
For the sake of us DirectX programmers please don’t use linux ;)
Yahoo, I’m a member. My goal have been reached. I will probably not post
as often as I’ve done these last few days anymore…
If your looking to do some 3D then you can check out
Three years later, phyxx found a tutorial for the asking guy. :-)
Wow, the guy probably has published an AAA title already, and is doing
well within the company!!!