Jump to content


Where are some good yet simple C++ game Tutorials?


13 replies to this topic

#1 Mental

    New Member

  • Members
  • Pip
  • 2 posts

Posted 21 September 2005 - 09:08 PM

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.

#2 Mihail121

    Senior Member

  • Members
  • PipPipPipPip
  • 1059 posts

Posted 21 September 2005 - 09:15 PM

Check out the ultimate old-school programming source: Programmer's Heaven

#3 Jordan

    Member

  • Members
  • PipPip
  • 41 posts

Posted 21 September 2005 - 09:49 PM

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 to do.

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.

#4 Mental

    New Member

  • Members
  • Pip
  • 2 posts

Posted 21 September 2005 - 10:42 PM

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?

#5 Jordan

    Member

  • Members
  • PipPip
  • 41 posts

Posted 21 September 2005 - 10:57 PM

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 project.

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.

#6 Xanas

    New Member

  • Members
  • PipPip
  • 18 posts

Posted 22 September 2005 - 12:58 PM

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)

http://cone3d.gamede...ls/gfxsdl/index <--- 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[3]; ) 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 basics.

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.

#7 wazoo

    New Member

  • Members
  • PipPip
  • 27 posts

Posted 01 October 2005 - 10:22 AM

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 kick-start.. :nod:

hth,

#8 marko

    New Member

  • Members
  • Pip
  • 2 posts

Posted 01 October 2005 - 12:58 PM

http://www.gametutor...m/tutorials.htm
http://nehe.gamedev.net

#9 Methulah

    Senior Member

  • Members
  • PipPipPipPip
  • 727 posts

Posted 02 October 2005 - 07:39 AM

http://triplebuffer.devmaster.net a devmaster forum members website that has some great DirectX tutorials.
Django Merope-Synge :: django@white-epsilon.com
Lead Designer/Project Manager - White Epsilon

#10 NomadRock

    Senior Member

  • Members
  • PipPipPipPip
  • 785 posts

Posted 02 October 2005 - 06:29 PM

For the sake of us linux users please dont use DirectX :)
Jesse Coyle

#11 SigKILL

    Valued Member

  • Members
  • PipPipPip
  • 200 posts

Posted 02 October 2005 - 07:25 PM

For the sake of us DirectX programmers please don't use linux ;)

-Si

#12 SigKILL

    Valued Member

  • Members
  • PipPipPip
  • 200 posts

Posted 02 October 2005 - 07:27 PM

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...

-Si

#13 phyxx

    New Member

  • Members
  • Pip
  • 2 posts

Posted 08 December 2008 - 12:34 PM

If your looking to do some 3D then you can check out http://www.squidoo.c...ngine-tutorials

#14 imerso

    Senior Member

  • Members
  • PipPipPipPip
  • 431 posts
  • LocationBrasil

Posted 08 December 2008 - 04:02 PM

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!!!

:-)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users