2D Game Programming
I just can't find any books on this subject for a beginner! I would prefer not to use Direct3D, but I will if I have to. Does anyone know any really good and simple ones for beginners that are either free to view on the internet or in books?
There's Beginning Game Programming by John S. Harbour. It uses Direct3D, but that's one of the only good ones I've found so far. You might also want to check out Sams Teach Yourself Game Programming in 24 hours, which uses the Win32 API.
I've heard that NeHe's OpenGL tutorials are pretty good (nehe.gamedev.net), but I don't know if they cover 2D or 3D.
I've heard that NeHe's OpenGL tutorials are pretty good (nehe.gamedev.net), but I don't know if they cover 2D or 3D.
I think there aren't that many - if any - good and up to date books on the subject, but there are some good tutorials. You didn't mention the language you use. If it is for c++ and you would care to use the SDL api, then lazy foo has a bunch of clear tutorials for beginners, and aaron cox tutorials has some 2d game tutorials too.
SDL is a cross-platform multi-media api, it is quite easy to get things going quickly in 2D and it is rather complete if you use some add-on libs such as SDL_image, SDL_mixer and SDL_ttf. Furthermore, when you need more power you can still continue to use it with opengl, since SDL provides an easy way to setup opengl, transition will be smooth.
EDIT: i found another tutorial site, it uses directx but the concepts are still the same, don't know how good it is though: 2d gametutorial
While I'm still editing I may add that it would be a good idea to check out different options. The Python language with pygame may get you started faster for example, I'm learning it now and wish I did that sooner. You could also consider using an existing engine, I hear good things about Haaf's game engine, which is now free and open source.
SDL is a cross-platform multi-media api, it is quite easy to get things going quickly in 2D and it is rather complete if you use some add-on libs such as SDL_image, SDL_mixer and SDL_ttf. Furthermore, when you need more power you can still continue to use it with opengl, since SDL provides an easy way to setup opengl, transition will be smooth.
EDIT: i found another tutorial site, it uses directx but the concepts are still the same, don't know how good it is though: 2d gametutorial
While I'm still editing I may add that it would be a good idea to check out different options. The Python language with pygame may get you started faster for example, I'm learning it now and wish I did that sooner. You could also consider using an existing engine, I hear good things about Haaf's game engine, which is now free and open source.
OK thnx.
Next time someone mentions Sams Teach Yourself Game Programming in 24 hours, I cannot be responsible for the actions that follow. I have heard so many people say it's good, but it is rubbish. It dosen't actually explain the code well enough for my taste. But thnx for the effort :)
BTW, it's C++
EDIT: I've had a brief look at SDL, and I don't really like it. I might have a better look later but ATM I'd really prefer not to. Thnx anyways :) And no, I won't use an engine. That is leaching someone elses work and is not a habit to get into while your still learning. I will probably learn some engines later, but not yet.
Next time someone mentions Sams Teach Yourself Game Programming in 24 hours, I cannot be responsible for the actions that follow. I have heard so many people say it's good, but it is rubbish. It dosen't actually explain the code well enough for my taste. But thnx for the effort :)
BTW, it's C++
EDIT: I've had a brief look at SDL, and I don't really like it. I might have a better look later but ATM I'd really prefer not to. Thnx anyways :) And no, I won't use an engine. That is leaching someone elses work and is not a habit to get into while your still learning. I will probably learn some engines later, but not yet.
Have you tried Allegro? I found Allegro easier to use than SDL but that may be because I tried SDL first and I was more of a newb then. Allegro was more of a pain to set up but it has really good documentation and there are some good tutorials out there. I seem to recall someone mentioning a book about using it as well. It might be worth a look. Good luck to you.
I am currently working on a tutorial for 2d game programming.
We use it as extra material for a beginners course in gameprogramming at a university.
You need to know resonable good C++ to understand it.
It's not finnished, but the chapters 2-5 is out, 6-7 commin this week.
Currently located at my site...
http://www.necro3d.org/2dgp/
Click on chapter 2...5, then click on pdf or source symbol to get the stuff.
/martin
We use it as extra material for a beginners course in gameprogramming at a university.
You need to know resonable good C++ to understand it.
It's not finnished, but the chapters 2-5 is out, 6-7 commin this week.
Currently located at my site...
http://www.necro3d.org/2dgp/
Click on chapter 2...5, then click on pdf or source symbol to get the stuff.
/martin
Quote:Original post by Unknone
OK thnx.
Next time someone mentions Sams Teach Yourself Game Programming in 24 hours, I cannot be responsible for the actions that follow. I have heard so many people say it's good, but it is rubbish. It dosen't actually explain the code well enough for my taste. But thnx for the effort :)
BTW, it's C++
EDIT: I've had a brief look at SDL, and I don't really like it. I might have a better look later but ATM I'd really prefer not to. Thnx anyways :) And no, I won't use an engine. That is leaching someone elses work and is not a habit to get into while your still learning. I will probably learn some engines later, but not yet.
IT IS GOOD. Your just not understanding it enough ;-)
Another book to look at though is Beginning Game Programming All In One, Second Edition
By Jonathan Harbour. It goes through using Allegro and puts mostly all of the gamecode in the book itself too and goes through many games. Plus Allegro is much simplier to use then GDI imo.
Sams TYGP24H is a good book to start out with Object Oriented Game design though imo.
I'm not using OOP. I'm not using SDL or Allegro. I want to learn the proper way with the actual Win32 API. The 3rd party stuff is not a good habit to get into while your still learning.
And that Sams book is rubbish as far as I'm concerned. I didn't have the CD so I had to download the code. I might have another look at it, I might've missed something. But don't get your hopes up too high...
And that Sams book is rubbish as far as I'm concerned. I didn't have the CD so I had to download the code. I might have another look at it, I might've missed something. But don't get your hopes up too high...
Quote:Original post by Unknone
I'm not using OOP. I'm not using SDL or Allegro. I want to learn the proper way with the actual Win32 API. The 3rd party stuff is not a good habit to get into while your still learning.
SDL is not very object oriented. Why are 3rd party libraries not a good habit? And why is the 'actual' Win32 API the proper way?
I see nothing wrong with using a pre-made library such as SDL. When you were first learning C++, did they make you write and compile all of the STL from scratch? I doubt it. Even in my university courses on the subject, we were simply taught about using STL classes such as string and cin/cout, without any real knowledge of how they worked, or even what classes really were!
In programming, and in computer science in general, you can't start from the lowest level. You will get so bogged down in details and none of it will seem relavent. We start from the top, where you can just pull from a box of tools to get what you want done. This teaches you the basics of programming logic and methods. As you learn, you dive deeper and deeper into the fundemental nature of programming and your lanuage of choice. You don't need to be writing your own 2D/3D library right off the bat because, frankly, you have no business doing it until you become very good at programming in general.
In programming, and in computer science in general, you can't start from the lowest level. You will get so bogged down in details and none of it will seem relavent. We start from the top, where you can just pull from a box of tools to get what you want done. This teaches you the basics of programming logic and methods. As you learn, you dive deeper and deeper into the fundemental nature of programming and your lanuage of choice. You don't need to be writing your own 2D/3D library right off the bat because, frankly, you have no business doing it until you become very good at programming in general.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement