Archived

This topic is now archived and is closed to further replies.

frankiej

More advice please

Recommended Posts

Hi There I am in the process of learning C++ but what I would like to know is, What is the software programmers use to draw the games like tetris etc etc how do they design blocks colours and how is it combined with c++

Share this post


Link to post
Share on other sites
I''m guessing that you''re still working with console programs. When you start getting into graphics, you''re going to need to find a library to help you. Just as for consoles you have the C library (printf(), scanf(), ...) and C++ library (cout, cin, ...) for doing text input/output, you have other libraries to do graphical output. The first I learned to work with (in C++) was the basic Win23 API. It can be pretty nasty, though. I hear a lot of good things about SDL. Right now, I use DirectX for most of my graphical work, both 2D and 3D. OpenGL would do about the same thing. The idea, though, is that other people have done all of the complex stuff that interacts with hardware, so we can use their libraries to draw stuff more easily.

For images and such, you can use just about any paint program to make bitmaps or jpegs or something. But for things as simple as Tetris, you don''t even need to create images. You can simply do things such as draw rectangles and lines with the appropriate colors in the appropriate places. Probably won''t look as good, but it''s functional.

If you feel you''re ready for more complex stuff, check out something like SDL or the Win32 API. There''s a lot of learning involved with graphics, but I''m sure you were probably expecting that. Good luck!

Share this post


Link to post
Share on other sites
I would advise SDL above the Win32 API since SDL''s learning curve is easier and it is cross-platform.

The win32 api is getting aged by now and I tried learning it, I got to the point of printing hello world and a button, I needed enormous amounts of code for this and the API itself makes no sense in name (ugly function names)

Share this post


Link to post
Share on other sites