Archived

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

Tigra7

Newbie Questions

Recommended Posts

Hey everyone, I am new to programming. I took a tutorial on c++ and got the main ideas of c++, like variables and all that stuff. I don''t see how that stuff can be put into a game. How, in c++, could i tell the screen to make a character move, or start a movie. I DO know about one thing though, I would say that I am at an intermidiate to advanced level in 3ds max. Is there a way that i can play an animation in a program written in c++? Was Direct X used to make games like Final Fantasy or other high end graphics games? I know this a tremendous question but, i need to know how to use c++ and DirectX to make a character move across the screen by pressing the right arrow key. Sorry if I rambled on a bit. Thanks for anyone that help, Chris

Share this post


Link to post
Share on other sites
well u will probably have to know more than just fundamental C++. and you will need to use a graphics API to do the 3d stuff (like, directx or opengl) once you get a pretty good understanding of C++ and directx or opengl (you dont need both in a game) then you could probably look around for some tutorials on loading 3dsmax files etc. once you learn more it will all start to fit into place

Share this post


Link to post
Share on other sites
yes, Final Fantasy was probably made in c or c++. Quake (I-III) was made in C. You can do "anything" with C++, but you need to know more than how to use variables. Try picking up a game programming book or look at tutorials, there are a lot of those.

Share this post


Link to post
Share on other sites
When I started learning C++, my only thought was "how the hell can you accomplish anything with this language?????" Despite the fact that all C++ seems to be able to do is put numbers in variables, it can do a lot of stuff. Drawing graphics is bsically just putting numbers in variables that happen to be in the block of memory that your video card looks at to draw stuff on your screen.




Things are not what they are.

Share this post


Link to post
Share on other sites
Hello again,

I know a lot more now than i did, mainly from the help i got from you guys. I actually went out and bought visual c++ and downloaded the direct x 8.1 sdk. I have two more questions, and the rest i can learn from programming tutorials. Am I on the right track with my purchase to make games? And, could anyone include a snippet of example code, doesn''t even have to work, but an example code or how pressing a button can move the character using c++. Again, Thanks for ALL the help.

- Chris

Share this post


Link to post
Share on other sites
quote:
Original post by Tigra7
And, could anyone include a snippet of example code, doesn''t even have to work, but an example code or how pressing a button can move the character using c++. Again, Thanks for ALL the help.

- Chris


There''s far too many things you''re requesting there alone. For what you''re asking, you''d need to..

- Prepare and include an API such as OpenGL or DirectX, with the proper libraries linked, etc..

- Write code for rendering a main screen, then loading in a character model, and also rendering it..

- Create a main game loop which recieves and responds to keyboard input at some point in the loop.

Besides, there are literally thousands of snippets of code all over the Internet.

Trust me, learn the basics..like initializing the damned window. Then move on to larger things, like rendering a quad.. work your way up.

You can''t simply just get 3 lines of code to "move a character across the screen".

Hope this helped.


Share this post


Link to post
Share on other sites
quote:
Original post by Tigra7
Hello again,

I know a lot more now than i did, mainly from the help i got from you guys. I actually went out and bought visual c++ and downloaded the direct x 8.1 sdk. I have two more questions, and the rest i can learn from programming tutorials. Am I on the right track with my purchase to make games? And, could anyone include a snippet of example code, doesn''t even have to work, but an example code or how pressing a button can move the character using c++. Again, Thanks for ALL the help.

- Chris



I don''t want to offend you, but I think you need to come down to earth. You probably read some crappy online C++ tutorial, think you''re all that, and ready to make games. It''s not that simple and you need to set your pririties straight and change your mindset. First you need to know C++ really well. Any online tutorial won''t do. You must get yourself a few books (I recommend C++ Primer Plus 4th Edition by Stephen Prata, Thinking in C++ Volumes 1 and 2 by Bruce Eckel and The C++ Programming Language by Bjarne Stroustrup) or take a course. Don''t rush through this crucial step because if you do, you will forget a lot of the stuff you crammed in. C++ is such a hairy language that it will take you a few months before you become competent and comfortable with it.
Only at this point can you even start thinking about game programming. You should get a book or two that teaches you the fundamentals (ie, 2D, none of those 3D or special effects) and you should make clones of such classics as Tetris, Snakes and Breakout. This will take you another few months. After all this, if still think you want to do game programming, you should brush up your math (trig, linear algebra, calculus) and physics, and start learning 3D programming with OpenGL or Direct3D. Then make your first rudimentary 3D engine, go back and study special effects programming, make your second 3D engine, then go back again and study AI and pathfinding algorithms. After a year or two you may be able to create some interesting games. Now that I planted you firmly in the ground, you may go and learn .

Remember, Rome was not built in one day.

Share this post


Link to post
Share on other sites
Hi -

I suggest you work on just drawing a bitmap of a man on the screen, to start with, and worry about making him move afterwards.

Are you familiar with ''while'' loops?

Share this post


Link to post
Share on other sites