Sign in to follow this  
mindwave_21

GUI's and Displays

Recommended Posts

Hey All! First post here. I'm an ElecEng/CompSci major with about 2 years experience in programming (Java mostly and some C). I hope to rekindle my dying interest in programming by actually doing something fun (who wants to program a Sieve of Erosthenes counter?). Anyways, I had a question about GUI's and displays. Mainly, how and where do you go about learning to do it? Most of the stuff in school only teaches how to fill in code skeletons and they supply the GUI. I'm trying to start my first fame (Tetris as suggested) in C++, as it seems to be the flavor of choice around here and most of the industry. Any ideas on where to start? Also as a side note, do you guys prefer Windows or Linux to program, compile, and run in? I have both on my system, but know little of the programming capabilities of my machine as I did most of my work in a computer lab on crap Sun computers. Thanks for the help in advance!

Share this post


Link to post
Share on other sites
Well; you could start with using the GDI to code the graphics with - that provides some simple sprite functions and the like; and is a lot easier than something like OpenGL or DirectX to use. It's a lot slower, but hey - they is just Tetris, right?
You could start by just drawing filled rectangles for the blocks, then move up to using sprites for cooler looking blocks.
I prefer Windows; mainly only as that's all I have and Linux seems more trouble than it's worth.

Share this post


Link to post
Share on other sites
Thanks anist! I see most of the stuff is in Windows using a windows.h header. Is there such a header for Linux? The reason I ask is because I installed Linux for the very purpose of programming and I saw with my own eyes the destruction of a system with visual studio installed (everything slowed down, error messages everywhere and debugging scripts popping up when you don't want them to. Windows is an everyday user's OS at heart, and I want to keep it that way. :D) Sorry if I posted some question you've already answered in your tutorial, but I haven't had time to read everything through.

Share this post


Link to post
Share on other sites
The header in linux is 'unistd.h" I think, but it is not an equavalent to "windows.h". If you want to do GUI programming on linux look into GTK, or KDE programming. For pure graphics you should look at SDL and OpenGL.

By the way I preffer C++ programming on Windows and Java on linux.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this