Jump to content


Book about programming a 2D "sprite" game


5 replies to this topic

#1 Smiley

    New Member

  • Members
  • PipPip
  • 12 posts

Posted 30 September 2008 - 03:22 PM

Is there any book that covers programming a 2D "sprite" game using OpenGL(or DirectX) and includes networking too?There is plenty of books making a 3D game (engine) but i think that 2d sector is too much mixed with 3D, so it would be hard to extract needed informations.

#2 necroside

    Valued Member

  • Members
  • PipPipPip
  • 143 posts

Posted 30 September 2008 - 03:33 PM

That really depends on the language you want to Use, for c++, I think there are some books on SDL, also python and pygame has books covering the things you need. But again...
Which language do you plan to use?
"There are not enough servers to run my infinite users game"

#3 starstutter

    Senior Member

  • Members
  • PipPipPipPip
  • 1039 posts

Posted 30 September 2008 - 04:18 PM

Well it's tricky because both OpenGL and DirectX aren't really made to do 2D well. It's not that they can't do it, it's just a lot less bang for the buck than you get with 3D.

You should have a look at this book where-ever you can find it. It's got a lot of good tutorials and pretty straight forward advice. The only part I don't like about it is thet they don't really cover in detail about importing directX into VC++, but then again I think that's more an issue that it's trying to be semi language-generic, although it is written in C++.
(\__/)
(='.'=)
This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!

#4 Smiley

    New Member

  • Members
  • PipPip
  • 12 posts

Posted 30 September 2008 - 05:24 PM

The language I plan to use is C++, it's not the easy one but it's the most common language used for game developing, but I could do it in C# or some other "easier-to-manage-and-better-to-look" language too. The point is that I want to get a book which focues on 2D, even if it's written in XYZ language, if you understand the code you should be able to rewrite in other programming language.

And about graphics API(OpenGL/DirectX), you don't need it write a 2D game?Cool, less work to do than.

#5 necroside

    Valued Member

  • Members
  • PipPipPip
  • 143 posts

Posted 30 September 2008 - 05:34 PM

Well first off you should choose a library, here http://www.devmaster...ead.php?t=12747 you can find some info.

If you decide to use SDL then Focus on SDL is, in my humble opinion, the best choice. Also check SDL site http://www.libsdl.org.

To me, sdl is the best library you can get to program games (not only 2d, because 3d can be done with opengl or directx). It's free and you can find millions of tutorials on the web.
"There are not enough servers to run my infinite users game"

#6 starstutter

    Senior Member

  • Members
  • PipPipPipPip
  • 1039 posts

Posted 30 September 2008 - 06:17 PM

Smiley said:

The point is that I want to get a book which focues on 2D,
Which is exactly what I recommended. The book I linked to (and I know because I've used it) is %90 sprite based 2D programming and the introduction to it. Yes, it uses D3D, but it uses a very boiled down and straight-forward implementation that strictly sticks to 2D.

As for the alternative graphics libraries, yes, you can use those but in the long run learning DirectX or OpenGL will make it much easier for you when you want to move onto more advanced (but still 2D) features. Believe me, there's a lot more to 2D graphics than sprites, and I guarantee you'll soon want to do more than them.

Anyway, I'm not trying to force it on you or anything, I'm just giving advice I really think that would help. I had to basicly teach myself sprite-based programming because of the lack of resources for advanced 2D graphics.
(\__/)
(='.'=)
This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users