Sign in to follow this  

A true newbie in game programming asks simplest question.

This topic is 4690 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am new to programming. I have been studying c++ relentlessly as well as browsing some game programming books. What are "the" actual first few steps in making a game such as a side shooter...(and I do mean THE first few baby steps such as where specifically to starting the code)... and can I use microsoft visual c++ compiler for decent results?? Lastly, should I focus more on OpenGL or Direct X as I plan to be a graphics programmer over the yrs. Thanks in advance!

Share this post


Link to post
Share on other sites
The first things to do:
Make very simpel math programs, then try to exploit these programs a little more.
Make a window! Init DX or OGL and start making things you like :D

I'm using DX but OpenGl has some features I like over DX.
I can't help you with that.

Share this post


Link to post
Share on other sites
Probably there are a lot of things to do before starting programming games... you should be sure that your c++ skills are good, learn a bit of math and some related algorithms.
Anyway VC++ should be OK (but it depends: which version? 6 is min, but 2003 compiler is very good).
There is a big difference in programming style and features between DX and OGL: DX contains also a lot of stuff for net programming, sound and input, that OGL does not have. This apart, the 3D features are very similar (always remember that OGL is present in pretty all OS while DX on microsoft's only).
DX should be a bit easier to set up.

Share this post


Link to post
Share on other sites
My skills are that of a newbie. I have Viusal C++ 6. I have done a simple tic tac toe in text and coded in source files but that is as far as I ever got. I wonder if I should use the wizards for my windows or try to build my own gui with code?? And if so where would I start coding physically on my computer..??(besides keyboard hehe)

Share this post


Link to post
Share on other sites
Well, If you have VC++6 then you should have something like 120 MB of online help and documents. This could be a good start. Then you may want look for simple Win tutorials. There are mainly two ways to programming windows with VC++ 6: using plain Win32 api (classic way) and throught MFC (if you use the App Wizard the resulting App is MFC based).
I suggest you to first get an intro to Win32 because when you start making games you wouln't probably make use of MFC.
Some tutorials are here:

http://www.relisoft.com/win32/
http://www.flipcode.com/articles/article_winprog01.shtml

Of course there are also the examples provided vith VC++.

After that you will be ready to begin with 3D. Download the latest lib (wether DX or OGL is up to you) and try with the articles in this site.
If you want to use OGL there is, of course, NeHe, for DX there ise, IIRC, Nexe.

P.S. If you want a very good free resource for C++, download "thinking in C++" by Bruce Eckel:
www.mindview.net

Good luck!


Share this post


Link to post
Share on other sites
You learn by doing and gaining experience. The more you do things, you become more experienced and can build off your knowledge to always do things better.

Start with what you know and start working on projects. Read everything you can and try to apply things. Try to copy other programs, by thinking about how they work and how you would duplicate them. Code, read, learn, experience, Code. It never really ends. You just become higher and higher level of proficiency (if you discipline yourself).

The only way to ever truly learn is by doing, that is why math and physics classes make you do tons of problems. The more problems you do you gain experience on how to solve them and how to use the information more effectively. They give you a few templates by demonstrating the solution to some sample problems. It's the same with code. You read a book, it gives you some templates on how you can solve a problem in a particular way. But there is usually other ways to do it too.

Always think things through. If you get stuck there is this forum. Try to make sure you understand the problem before asking questions though. Too many people do not fully understand the problem and ask ambigous questions that can't be answered.

Good luck and stick to it.

Share this post


Link to post
Share on other sites
Quote:
Original post by AceWicked
I am new to programming. I have been studying c++ relentlessly as well as browsing some game programming books. What are "the" actual first few steps in making a game such as a side shooter...(and I do mean THE first few baby steps such as where specifically to starting the code)... and can I use microsoft visual c++ compiler for decent results?? Lastly, should I focus more on OpenGL or Direct X as I plan to be a graphics programmer over the yrs. Thanks in advance!




Assuming you go DirectX:

Download the DirectX SDK from Microsoft (software development kit - its like 240meg now) which has ALOT of DirectX sample programs (which compile/run fine with VC++6).

The examples cover 3D/2D graphics as well as sound/input/some network stuff.

Start looking at those sample programs (there is an Application framework in it)
to see how various things are done and start making modifications to them.

If you plan on concentrating on graphics, get up to speed on the mathematics --
especially linear algebra - vector and matrix stuff.

Share this post


Link to post
Share on other sites
First off, thank you all whom have taken time to respond to my thread. Anyhow, I currently have software for DX and OGL and VC++6.0 and I am currently studying beg game programming in C++ as well as a C++ reference guide. I hope those are good starts.....However, I am curious ss to the beginning process of using Win 32 first or should I start coding in the source file .cpp? I am just trying to figure out the "first" steps that would make sense in say for example a simple Tic Tac Toe game or CHESS game. Would using Win32 allow me to code in source file later or vice versa....? Where would be the best place to begin the process in my VC++6.0? Thx again in advance.....

Share this post


Link to post
Share on other sites
I highly recommend NOT using a wizard to create you window or any other application stuff. You'll learn the stuff much better if you do it yourself, and by the time you become proficient, your needs will be specific enough that the wizard doesn't cut it anymore.

Share this post


Link to post
Share on other sites
I'm going to give you some great advice...

1) Forget about OpenGL and DirectX for the moment. Insted, I implore you to "learn C/C++ so well you can speak it" before leaping into anything adventurous. Afterall, with a good & solid foundation - OpenGL or DirectX should be straight forward enough to learn...

2) "can I use microsoft visual c++ compiler for decent results" - Absolutely. Though, it would be best to have Visual C++ 2003 .NET...though I'm sure we are on the 2004/2005 edition by now! BTW, spend some time trying to understand how .NET works( its pretty much the same as VC++ 6.0 ). As Captin Kirk once said in an old Star Trek movie...

"...Learn why things work on a Star Ship!"

3) Once you have a good grounding in C/C++, move on to making a few Windows applications. If you need a book on hand, I'd recommend Andre LaMothe's first Tricks book "Tricks of the Windows Game Programming Gurus: Fundamentals of 2D and 3D game programming" - he spends quite a bit of time covering the basics of making windows, making menus to accompany them etc. As a bonus, it has more than enough material for you to make a decent shoot-em-up like asteroids or R-Type. Its right up your street!

4) Learn C/C++ like the back of your hand. Learn why things work on a Star Ship...wait a second - I think I'm starting to repeat myself again!

Good luck!

Share this post


Link to post
Share on other sites
Quote:
Original post by AceWicked
However, I am curious ss to the beginning process of using Win 32 first or should I start coding in the source file .cpp? I am just trying to figure out the "first" steps that would make sense in say for example a simple Tic Tac Toe game or CHESS game. Would using Win32 allow me to code in source file later or vice versa....?


Perhaps you are a bit confused... I try to explain: If you know c++ you should know that it comes with a library of functions, classes, data and so on (think to old C strlen(), printf() or newer String and you get what I'm talking about). Win32 is more or less the same thing: a library that let you interact with Windows services. So you have function to build windows, to open files, to get input,... Many people thought that there would be more easy way of doing this, and they began to 'wrap' the libraries into classes, with an object oriented design (alla c++ or Java). These classes manage most details for you, and should make it easer the process of developing standard components, like User Interfaces, net code and others. There are some of these wrappers or 'frameworks': one of the best known is MFC (microsoft foundation classes) that is 'similar' (from a certain point of view) to what you find in Java.
MFC classes are built on win32 , that is, they use win32 functions to do the job.
When you use the AppWizard shipped with VC++, it builds an application template using MFC, but as Holy Fuzz said, do not use AppWizard in the beginnig: it will hide many details that you should learn instead.
I would say you to not use MFC at all. Go directly with win32 (or perhaps with .Net, but you will find much more documentation with win32) and you will make programs in pretty much the same way as you were use to do with simple c++ programming.

if you already know what the following code does:

#include <iostream>

use namespace std;

void main()
{
cout<<"Hello World<<endl;
}



Then chances are you know what a C++ program is.
In windows, you add "windows.h" and make some other stuff (follow the link I gave you for some basi tutorials).
After that, you could move to graphic programming, but at the time you will move to this stuff, you will know what you need to choose.
Hope that this helps a bit.
Good learning!

Share this post


Link to post
Share on other sites
If i was only interested in Game Programming, i would stay away from Win32, it almost made me think that Programming was not my thing because i could never ever remember the code needed to open a window for rendering. And i used to think if i can't even open a window how will i ever make an entire game. If you are using OpenGL, use something like SDL/GLFW/FreeGLUT or even GLUT to start learning. Infact i don't ever see the need to learn any Win32 if you just want to program games. For GUI apps, there is always wxWindows, .NET Framework, GTK for that.

For OpenGL all you need is the RedBook which can be downloaded for free from the resources column. You will be amazed at how simple basic 3d programming is without the overly complex/ugly Win32 API.

Share this post


Link to post
Share on other sites
Nobody can learn for you. If you don't know how to write what you want then you are starting in the wrong place. You cannot run before you can walk. Just write whatever program you think you are capable of currently. Then use your intelligence and creativity to make it better. Don't expect anything to be just handed out to you. Programming involves lots of hard work if you are to get anywhere.
There's a reason mother birds push their young out of the nest, and you too will either fall or fly. You wont do either as long as someone is always holding your hand.
There are no shortcuts in life.

Share this post


Link to post
Share on other sites
The main reason I am asking specifically where to start is because all of my programs where written in source files .cpp and all I ever see is the dos like window for my text typed programs (school projects) and when I was learning VB the code was simple to know where to start coding. AS for my VC++ I wondered if writing the same type of programs I am capable of can be written in a "window" so to speak and if I should use MFC wizards or win32 to get started? From there I know I can get a better grip as to what I want to add and learn in that specific window and move on from there. I am just curious as to which was a better route? Hence, coding the window myself??

Share this post


Link to post
Share on other sites
You don't need to stay years on win32, nor you need to know everything of it: just the basis that would let you move without to much problems (that is, know the structure of a basic windows program, what kind of services windows api offers and so on).
Learn a bit of these things for two months or three.

After that download SDL (or whatever library you want) and begin with it. These will give you access to a screen buffer and (at least SDL, don't know others) are very simple to use.
They will handle all the specific details for you (window, input) in a platform indipendent manner (that is, the same code -should- be compilable on win/linux/OS/unix and often more...

Share this post


Link to post
Share on other sites

This topic is 4690 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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