Friday, July 31, 2009

Programming Help plz?

How do i makeGUI stuff with c++?





Uhmm im learinng c++ because i saw this game called eternal-lands which supposingly was made by it. However everything i do on dev c++ compiler runs with DOS. How can i make it so it runs with Windows instead? And also so it can show pictures and such. And also if some1 cud mention how to use OpenGl and DirectX i hear good things about them. Id appreciate help.

Programming Help plz?
Instead of creating a "console app..." or something to that effect, select "Win32 App...", but you'd have to learn how to create windows, buttons, etc.





Also, check out http://nehe.gamedev.net for some very nice OpenGL tutorials from beginner in C++ to very advanced stuff.
Reply:great place to start learning about game development





www.gamedev.net
Reply:It's much easier to learn C++ on the command prompt than with dialog boxes and such. A simple program to display the classic "Hello World!" program in C++ is just a matter of a couple of lines to the command prompt:





#include %26lt;stdio%26gt;





int main()


{


cout %26lt;%26lt; "Hello, world!";


return 0;


}





But to get the same type of thing with Windows (at least, to do it well) is going to require pages and pages of programming to register window classes, create a window, and respond to user actions. Not that it's impossible, but it's tricky. Many compilers have wizards that can help put some of this user interface overhead together automatically, but there's still a pretty steep learning curve.





For this reason, you may want to stick to a console-mode program for a little while until you're comfortable with the basics of C++. Then, pick up one of many books on writing code for Windows and go from there.





You're a LONG ways from using DirectX if you're just getting started with C++. Don't give up, though. C++ is what nearly all games and software of any significance is written in these days. Just don't expect to be writing flashy windows apps right away.





Try www.codeproject.com as well. Great site.


No comments:

Post a Comment