How to do simple graphics in c++

Jul 5, 2009 at 9:24pm
Hi all,

I just started programming (for fun) and my ultimate goal is to be able to program simple games (tetris).

I was wondering how it would be possible to integrate graphics in my program. Ideally, I would be able to import some pictures and make the pictures move on the screen.

Is there a simple library I can use to do that?
Jul 5, 2009 at 9:53pm
http://www.libsdl.org

Very simple, very easy to get started. But also has ties to OpenGL, so you can use it when you move onto more advanced stuff as well.
Jul 6, 2009 at 9:22am
On Windows, just use GDI or GDI+
Jul 6, 2009 at 12:03pm
Both are very different, though.

GDI and GDI+ are for the Windows application interface -- so you are dealing with windows elements and bitmaps. This is fine for writing simple games like cards, minesweeper, and even tetris.

SDL is for manipulating sprites -- and I think a little better suited for game programming. Don't forget the Lazy Foo' Productions tutorials:
http://lazyfoo.net/SDL_tutorials/

Hope this helps.
Jul 6, 2009 at 11:03pm
Also SDL is crossplatform.

No reason to restrain yourself to only 1 OS if you don't have to. Cure the "only code for Windows" disease by never getting sick in the first place.
Topic archived. No new replies allowed.