Advertisement

Newbie question - Graphics in C++ program

Started by September 24, 2002 10:17 AM
7 comments, last by Trakkur 21 years, 11 months ago
OK, I''m sure I can find this information somewhere in the coious archives of these forums (Which I *AM* reading) but I have a desire for a quick answer (If there is one ). I''m a rank novice in game programming with C++, my programming experience to date has been confined to business packages, and proprietary scripting languages for an online game, and a goodly amount of HTML, dHTML and &#106avascript. I''m taking the advice of starting small with a game like "Tetris" and moving through the list. But I have NO idea how to render graphics from C++, how does one create and manipulate a block, etc? I''m assuming it''s through DirectX in some way, but I''m not sure, can anyone shed some light on this topic? Like I said, probably simple for you folks, but hard for me since my experience to date has been all text, and the only graphics I''ve worked with are on webpages. Thanks in advance! Love the site and forums! Rob Never try to argue with any idiot, they''''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they'll only pull you down to their level...and beat you with experience.
C++ is designed to be in a WIDE range of applications, such as embedded systems, all the way to super computers. Since embedded systems do not have graphics, C++ does not contain any graphic libraries....

You''ll have to use an extrernal library, such as OpenGL, Direct3D, or Allegro.

Of course OpenGL vs. Direct3D is a religous issue. So everyone Will Tell you something different

Since I''ve only done 3D, I cannot recommend a good 2D graphics Library.

DirectX is a whole Library of game functions. DirectX contains library functions to do sound, input, graphics, networks, while OpenGL is just Graphics, (OpenGL -> Open Graphics Library)....
Oh well hope this helps

If you are interested in 3D, I''d suggest OpenGL, since its alittle easier for a beginner...



~~~~~Screaming Statue Software. | OpenGL FontLibWhy does Data talk to the computer? Surely he's Wi-Fi enabled... - phaseburn
Advertisement
1) first you have to know some programming language: C, C++, even VB....
2) then you can work with an API: my personal opinion Direct X or OpenGL.

if you have 1) down then head over into forums and scroll down until you find Hands-On Interactive Game Development.

this is a step by step tutorial on how to make Tetris.

enjoy.

Beginner in Game Development?  Read here. And read here.

 

Thanks Dede, since DirectX contains all the various needs of a game (sound, input, graphics, etc. I will likely go down that path, but I will also learn OpenGL. Not quite ready for 3D, but it would be good to know.

Thanks Alpha_ProgDes, I do know C and C++ from a few years ago, just never used them for game development. I also know VB, but the same caveat applies. DirectX will be where I start, then I''ll move on to OpenGL for 3D when I get my feet wet.

I''m going to look into that forum as well, tried but couldn''t find the Tetris tutorial. I''ll look closer in a little while.

Thanks folks!

Rob

Never try to argue with any idiot, they''''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they'll only pull you down to their level...and beat you with experience.
Tetris tutorial is here. The whole forum is the tutorial. Like i said step by step.

anyway have fun.

Beginner in Game Development?  Read here. And read here.

 

C/C++ is the standard " de facto " for game programming even though you can use VB or other languages .
The graphic API is a religious issue...correct.... My opinion is the opposite of Trakkurs''
I would suggest to start with opengl , then I would switch to direct x.
the reason is that opengl is simpler to learn and much more intuitive than direct x so you can get some results (and satisfaction )in a reasonable short time.
Later, If you want to make further progress , probably direct x becomes a must .
The general opinion that opengl is not suitable for 2D is wrong.
All you have to do is to render a textured quad, that''s it.
Not to mention that, today there is no reason to develop a pure 2d game.
You can easly start with 2d characters in a 3d world.

Advertisement
One things for sure it isnt that easy.
Thanks! I was thinking of OpenGL as well, I guess I have to decide myself since we ARE dealing with a religious preference here I suppose.

OpenGL is supposed to be easier to use, and supposedly you can still render 2D images in the 3D space....SO! This sounds good....BUT DirectX has ALL the other parts as well that are needed for professional style games.

Hmmm....we shall see...I will likely learn both.

Rob

Never try to argue with an idiot, they''ll only pull you down to their level...and beat you with experience.
Never try to argue with an idiot, they'll only pull you down to their level...and beat you with experience.
You can definitely make a 2d game in opengl. I made a space invaders clone last year. It would be a lot easier with directx/directdraw however and the game would have turned out better in the end. It''s just more geared to 2d whereas opengl is more for 3d.

Gamer-Insight.com

This topic is closed to new replies.

Advertisement