Making the jump from text to graphics

Started by
6 comments, last by jpetrie 17 years, 6 months ago
I've been programming for quite a while (okay, 2 months, but that seems like quite a while to me...its not 5 years, but I didn't start yesterday) Anyways, I was wondering if there was a good book or a few good tutorials/practice exercises to help me make the transition from dos programming to windows and graphics, etc. I've done a few text-based games, but I'd love to move on to bigger and better things. I did the tetris-clone tutorial in the "links" thread here, which helped a little although I'd need something with a little more explanation to everything. Don't get me wrong, it was a great tutorial. I'd really like to find something to help me get into windows and graphic programming. Especially 2D. I'd love to do a 2D platformer or a 2D overhead adventure/RPG. Any tips or recommendations?
Advertisement
Allegro and SDL are two great 2D Graphics libraries. They are mainly compatible with C and C++, but SDL can be used with some others. OpenGL, while mainly a 3D API, is compable of some two-dimensional graphics. DirectX is the same case as OpenGL. It is made of a few things, specifically(is that spelled right?) Direct3D, but is also made of DirectDraw for 2D graphics. OpenGL mainly focuses on C and C++, but it can be used with many other languages as well. DirectX is, I think, for C# and only C#. There is also PyGame, if you're using Python.
There are many other less noticed graphics libraries.

I hope this helps!

Sincerely,
Annoyer
I would suggest Beginning Game Programming by Michael Morrison. The book doesn't go into detail on how it draws the objects, but it give a good amount of the theory for programming 2-d games and you actually get to make complete games. It also uses some advance concepts like pointers, but you don't have to understand the items to go through the book.
Quote:
the transition from dos programming to windows and graphics, etc.


Permit me to be pedantic for a moment: you have never programmed for DOS. You have written Windows applications that happen to appear in a command-prompt (commonly misnamed a "DOS box"). You did this by calling to the standard C and/or C++ libraries, which are in fact implemented in terms of the Windows OS's "character mode" API for writing console applications.

You'd need an entirely separate compiler to write programs for DOS; Visual C++ does not support it any more.

Quote:
DirectX is, I think, for C# and only C#.


DirectX is a COM API; it can be used from just about any language with the appropriate support. It is most commonly used from C++, and indirectly from C# via Managed DirectX or XNA.

SDL seems pretty popular, you (Demos) might want to look into that.

I would really reccommend SDL as well. It is much simpler and intuitive than Win32 (which is what that tetris tutorial uses). I am using it for a 2D side scroller, and the graphics part was pretty trivial to code.

As a bonus, it is portable to about every computer system under the sun.
Quote:Original post by jpetrie
Quote:
DirectX is, I think, for C# and only C#.


DirectX is a COM API; it can be used from just about any language with the appropriate support. It is most commonly used from C++, and indirectly from C# via Managed DirectX or XNA.

SDL seems pretty popular, you (Demos) might want to look into that.


Okay, I wasn't sure of that, as I said "I Think".
With all this talk about this "SDL", where would I find something on it?
i see this book here
http://www.gamedev.net/columns/books/bookdetails.asp?productid=206
is there a more recent book or version on it? or has the syntax and functionality not changed since it was published in November, '02?

I'm kinda working on building a library, so buying a book doesn't bother me.

From the reviews, this is what I'm looking for to bridge the gap between the "cmd window" world and 2d graphics and games.
Next time, try Google. The link the SDL home page is the first one returned for the relatively obvious query of "SDL."

This topic is closed to new replies.

Advertisement