Click to See Complete Forum and Search --> : graphics prg. in win32
nitin1979
May 31st, 2007, 12:50 AM
friends i am developing a game using Dev C++ IDE.
Me know that graphics.h file exist to do graphics programming in TubroC++.
But i want to develop win32 program.
Can anyone tell me how to use graphics functions in win32 programming.
Me want to draw a triangle and then balls in that triangle.
Game name is 4 in one raw game. Multi Player means more then one player can play this game on Network. It is basically ball game.
I just want to know how to do graphics programming in win32 environment.
Is it necessary to use OPEN GL for doing graphics programming in win32 environment.
Thanks for reading this post.
JVene
May 31st, 2007, 01:41 PM
You have 3 options, each are a study beyond a post here.
GDI (& GDI+): This is the standard means used in windows applications. For an example, look at the (in)famous Scribble sample from Microsoft. It's not supplied with Dev C++, I know, but I think you can download the sample from MSDN. If it's based on MFC, you probably don't have MFC, but you could study the code.
An alternative is to download an alternative framework for Dev C++, like wxWidgets or WTL, and look for GDI examples there.
If your game graphics are simple, this can be good enough, but it's not exactly an animation game development platform. Still, GDI is the 'standard' way to display graphical UI, so you should learn it at some point of your going to make Windows applications.
OpenGL: This is an animation ready means of developing applications like games. It just so happens that wxWidgets has support for OpenGL in that framework, and it works with Dev C++. Sounds like a good idea.
OpenGL is generally portable between Windows and Linux, if that matters.
DirectX: This is Microsoft's 'gaming' and graphics interface for animation. It's more feature rich than the current support for OpenGL, is a bit more of a study, and may be out of reach for Dev C++ (I'm not sure about that).
IllegalCharacter
May 31st, 2007, 07:08 PM
If you just want to draw a triangle with balls in it, then OpenGL might be a little bit of overkill. If you want 3D effects with texturing and lighting, then OpenGL is good, and SDL is a lot simpler than wxWidgets so it might be better to look into that.
For what you're doing it might be simplest to go with the basic Win32 API (which comes with Dev-C++). The tutorial here (http://winprog.org/tutorial/) is a really good one.
Also graphics.h is DOS graphics, I don't think it comes with any modern compilers.
sakurazuka
June 1st, 2007, 11:55 AM
DirectX: (...) may be out of reach for Dev C++ (I'm not sure about that).
I not just may be out of reach, but it is out of the reach of Dev C++. Trust me, I've lost some nerve trying to get it working. Well, meybe thats just becase i suck but nevermind that...
nitin1979
June 2nd, 2007, 02:21 AM
Ok friends
Me learn OpenGl.
my game is
Nim logic game. It is a 2-player game, but you can play against the computer. The rule of the game is to take one or more pieces from one row on the board. Then, the other player goes, etc. The winner is the player that takes the last piece.
I first want to develop this only part after that i want to extend this to Multi player Game. So that user on network can play this game in group of 2 like a game of pool in yahoo.
check the pic. of the game how i want to look like.
http://img161.imageshack.us/img161/4848/antnimne4.jpg
1. Canvas, or Windows Device Context
2. OPen GL
I learned the Open GL
If you suggest for DC then please provide me like from which i can read the examples full coded example.
now i am using VC++ 6.0 bcos problem comes in Devc++
Bcos i think i have more logical work instead of graphical work.
Hope you understand what i want to say. Thanks for reading again this post reply.
now can u suggest me what i have to use
IllegalCharacter
June 2nd, 2007, 05:49 PM
Ah, I did this game in my AI class when I was in university. Somehow my AI always beat me...
We didn't do it graphically though, we did it using console and |'s.
For what you're trying to do, I think OpenGL is a little excessive unless you want to make Nim3D or something like that. If you're using VC++ then try MFC, it'll probably be the easiest. Here's a tutorial on how to do basic drawing: http://www.codeproject.com/dialog/sditutorial1.asp?df=100&forumid=809&exp=0&select=116584
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.