starting a game
so far I've been programming games using an applet in java, but I just recently started to learn c++, and don't know how I should start to make a game. is there a template that I can follow?
Well, once you've gotten settled into C++, I would start looking at graphics libraries, such as SDL, OpenGL, and such. Maybe look into other libraries to help your game, such as ODE.
Since you've already made games before, the only real difficulties should be in learning C++, as far as I can see.
Since you've already made games before, the only real difficulties should be in learning C++, as far as I can see.
thanks, but I'm still confused on where I should start. when I click file>new>project, what should I click?
Well, long before you even wave your mouse over your IDE icon with the intent to program a game, it's a good idea to plan it out extensively. Planning is VERY important, and most games are sufficiently large such that beginning the project without extensive planning is nearly assuring eventual failure. It's very easy to code yourself into a corner, and cripple your project by critical early design decisions that were made previous to considering certain major requirements. The importance of a good plan of attack when approaching any sort of large project cannot be over stated.
After that though, any sort of fresh empty project will do just fine.
After that though, any sort of fresh empty project will do just fine.
C++ unlike Java, does not include every API (Application Programming Interface) you might want to use. This is becuase C++ is a multipurpose programming language and people use it for drastically different things.
If you want to do graphics in C++, you will need some sort of additional API. These API's must be downloaded and configured so that you can use them in your compiler.
DevCPP as opposed to Visual C++ 2005 has a nice way to handle this called packages, however if you are using Visual C++ 2005 then you will need to setup the API manually (the API should come with directions on how to do this).
Anyway I agree with the previous poster on the fact that before you even start to write a single line of code, you should plan the game out on paper. The reason is becuase it is quite a task to go back and change something once you have programmed it. If you want to change some sort of game mechanic, it can add extra weeks or months of development time, depending on what it is.
Planning your game out ahead of time will save you a ton of headache later on dow the road.
Once you feel you are ready to start a game, start small. Start with tutorials on the API you are using and then try changing them around, or try tackling projects that are just beyond your skill level.
What ever you do, don't fall into the trap of "I can't move forward as I don't know what to do". Keep trying stuff! Experience is the only way you will learn even if it involves making mistakes.
If you want to do graphics in C++, you will need some sort of additional API. These API's must be downloaded and configured so that you can use them in your compiler.
DevCPP as opposed to Visual C++ 2005 has a nice way to handle this called packages, however if you are using Visual C++ 2005 then you will need to setup the API manually (the API should come with directions on how to do this).
Anyway I agree with the previous poster on the fact that before you even start to write a single line of code, you should plan the game out on paper. The reason is becuase it is quite a task to go back and change something once you have programmed it. If you want to change some sort of game mechanic, it can add extra weeks or months of development time, depending on what it is.
Planning your game out ahead of time will save you a ton of headache later on dow the road.
Once you feel you are ready to start a game, start small. Start with tutorials on the API you are using and then try changing them around, or try tackling projects that are just beyond your skill level.
What ever you do, don't fall into the trap of "I can't move forward as I don't know what to do". Keep trying stuff! Experience is the only way you will learn even if it involves making mistakes.
I strongly disagree with the previous posters. Planning only helps if you have experience. If I were you my first API related goal would be to get the screen to turn green. My second would be to display a picture in the middle of the green, the third would be to get the picture to act as a mouse cursor, the fourth would be to have the escape key kill the program. When you are a beginner getting to all of that done involves getting seemingly random stuff configured correctly. Once you have basic API usage down then you can get on with all of the planning.
Also since you are coming from a java background you probably need to work on your C++ some. You might want to stick with console programs for a while.
Sorry that I can't give specifics as I have been out of the loop on game programming for a while.
Also since you are coming from a java background you probably need to work on your C++ some. You might want to stick with console programs for a while.
Sorry that I can't give specifics as I have been out of the loop on game programming for a while.
I also disagree. The focus of learning process shouldn't be game design, he's done that before in Java. The only real problems he might have there are learning a new API (not that hard at all), and learning C++, which is the big one right there.
Choose an api (opengl or directx) and start learning that api by starting a small game (tetris, etc)
Take a look at nehe opengl tutorials!
Good luck!
www.nextdawn.nl
Take a look at nehe opengl tutorials!
Good luck!
www.nextdawn.nl
Don't just pick up a copy of VC++EE and the DirectX 9 SDK (or anything along those lines) if you want to make it back.
Rather than biting off more than you can chew, why not follow a tried-and-tested path? Resist the temptation to move straight into graphics and physics, and start with a few finite-state-machine-type console applications. Once you're comfortable with the language, get hold of an easy-to-use games engine - perhaps SDL for 2D, then Irrlicht once you've graduated to 3D. If you get this far, you'll know how to proceed.
Understand that although it's somewhat standard, C++ isn't the easiest or best language to write games in. You'll probably have more success with C# & XNA or Python & PyGame, to name two alternatives.
Whichever route you take, keep your wits about you. As with most learning experiences, starting off is the hard bit. Once you've found your feet, you'll be self-sufficient and experienced enough to make the rest of the journey on your own. If, at any point, you feel you want to give up, take a step back and look at what you're doing: you're probably trying to do too much, too quickly.
Admiral
Rather than biting off more than you can chew, why not follow a tried-and-tested path? Resist the temptation to move straight into graphics and physics, and start with a few finite-state-machine-type console applications. Once you're comfortable with the language, get hold of an easy-to-use games engine - perhaps SDL for 2D, then Irrlicht once you've graduated to 3D. If you get this far, you'll know how to proceed.
Understand that although it's somewhat standard, C++ isn't the easiest or best language to write games in. You'll probably have more success with C# & XNA or Python & PyGame, to name two alternatives.
Whichever route you take, keep your wits about you. As with most learning experiences, starting off is the hard bit. Once you've found your feet, you'll be self-sufficient and experienced enough to make the rest of the journey on your own. If, at any point, you feel you want to give up, take a step back and look at what you're doing: you're probably trying to do too much, too quickly.
Admiral
Quote:I strongly disagree with the previous posters. Planning only helps if you have experience.
He said himself that he already has experience programming games in Java. He also stated that he wished to make a game and not a bunch of random test applications. Planning a game out on paper will help in terms of giving him a clear path to follow where as not planning will result in an unorganized mess.
While making cursors turn green will help him understand the API, they will not get him closer to actually starting to develop a game. Now you might say that these little tests would give him experience and you would be correct, however sometimes the best way to gain experience is to just jump right in (Especially since he already has programming experience in another language).
So if his goal is to just learn the API and he doesn't care about making a game right away then sure making a bunch of small applications would be a great idea, however if he wishes to create a game then planning is essential if he expects to have any chance at success.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement