How to make a game with c++

Pages: 12
I will start off with my experience:

I have been taking c++ classes for 2 years at my local community college and have taken
-introduction to software development
-introduction to c++
-c++ programming, advanced
-data structures with c++ (currently taking this class, only 2 chapters in)

I understand the concepts of inheritance, polymorphism, encapsulation, recursion, linked-lists, etc.

I want to start to create my own game so that I could possibly use that on my cover letter/portfolio in the future for when I apply for a job. The thin is I don't know where to start. Any suggestion on any engines i could possibly use? Any other possible useful information would be appreciative.

Thanks,
Zilikken
- Well, it seems as though you know the basic concepts of console applications in c++.

- However, i'm not sure if you want to make a console application game as you probably want to make a game with a GUI and such.

- I'm currently learning Win32/WinAPI Programming and i would probably recommend the same to you.

Could you give me more information on win32/winAPI? Do they use anything from c++?
If you'd prefer to stay in the console application, the ncurses library offers neat modifications.
- Well, i would say yes, however it seems to me as though win32/winAPI is basically the same thing in C as in C++.

- At least, in the basic examples i have looked at, and in the books i have read.

- I'm currently reading Petzold's book as it seems to be in high regard on the subject, even though it was published some years ago, and i will also read Horton's book when i am done with Petzold's.

- Petzold:http://www.amazon.com/Programming-Windows%C2%AE-Edition-Microsoft-Series/dp/157231995X

- Horton: http://www.amazon.com/Ivor-Hortons-Beginning-Visual-2012/dp/1118368088
closed account (Dy7SLyTq)
i wouldnt do win32 unless ur dead set on it staying a windows app or willing to rewrite for *nix. i would instead use sfml. and as indieExe said, ncurses, because to recompile on windows you would just have to link to pdcurses instead of ncurses
+1 to SFML.

Ncurses is a console lib, which probably isn't what you want if you're looking to make games.
closed account (Dy7SLyTq)
if ur looking to make console games it is the perfect thing
closed account (Dy7SLyTq)
and it has more benefits ie mouse tracking and printing cool stuff
I guess. Though "console games" is almost a contradiction in my mind.
Thank you everyone for your replies. What about free source engines though? Any suggestions?
closed account (Dy7SLyTq)
unity
- I'm honestly more interested in WinAPI as i intend to make windows applications for the time being.
It takes much more than learning a programming language to design a game engine. The best advice I can give you is decide what you want to do. If you just want to make games, take a library that is already developed (an engine) and make games with it, OR if you want to make a software library that can be used to make games, make it learn what a game engine needs in order to work. Most importantly if you decide to do the latter, learn the MATH and/or physics necessary, most likely just algebra, trigonometry, linear algebra, and basic discrete math if you prefer the latter.

I myself, have 3 years of self-taught c++ knowledge and 1 year of java, and I can tell you that knowing a language just isn't enough. You have to know how to reason and design systems. It has to be a hunger deep inside of you if you want to truly develop a piece of software as large as a game engine. And game engine is a broad term for a collection of subsystems. You have to establish requirements and deduce a system from such requirements. Developing game engines is an imperative process, you have to reason and think of how you are going to do things.
While using a developed game engine is not an imperative process to an extent, since
you are using premade tools to accomplish a given goal.

Here is what you need:

Language
what language are you going to be using? assembly (insane/old-school?) c/c++/python/java/javascript/html/batch (lol)??
Math
this is your foundation, you can literally build an engine depending on this as your base.
how will you describe your objects?
Gui
are you doing a text based-console game or a Application game like in windows
Graphics
how will you draw objects?
Physics
how are your game objects going to interact? will they clip inside of each other?
Sound
whats a game without sound?
Hardware/OS specifics...
what system are you going to develop for? Apple, Windows, Linux? Iphone, Internet?

Who are your users?
who do you expect to use your game? what do you want to target

Making an engine is a commitment, especially if you do it alone or even in a small group. You can expect it to take months if you are not worried about production quality or years if you have enough detail to encode a dna molecule with the content of your engine.

In short, the things complexity that is game engine development is a reason why libraries and programming suites/development kits were invented. You have programs that basically are like sandboxes and handle the super-detailed programming for you via scripting languages such Unity, UDK, GameMaker, Blitz, and the list goes on. Then you have SDKs like C4, Havok, Physx, Euphoria, SDL, Allegro, SFML, DirectX SDK, OpenGL, OMesa, and so on that you can base your engine from.

edit:
some commonly used engines I've seen are Ogre (graphics/gui only), Irrlicht (full), and Panda3d.

And when you have you finished product (the game), the odds for you to make enough money to make a lot of money from it are low, since there are so many competitors, especially for the 1000s of cheap 99cent apps programmed by out-sourced indian grads/immigrants for peanuts. If you are going to do it go big or don't do it at all.

I've seen game engines made entirely using java and opengl (minecraft?) but the person who makes those kinds of things is either beyond their years in knowledge or an experienced adult professional who has invested much time into reaching such a level of skill that they can make an application of such a large scale. And, even with minecraft, there are some trade-offs, first-off the physics is basic, and secondly he made everything using voxels (blocks).

In short, you will have to know what you want to do, and then execute action. I am only focusing on graphics, gui, math, and I'll let physx or some other free ware to handle my sound and physics in my game engine, when I cross that bridge. To do all of those things by yourself is no easy task, even if you are a genius, it requires some level of experience.

final edit:

One more thing, game engines and libraries generally have a learning curve, the better the library the lower the learning curve. You can't get around the initial learning curve for every new tool that you use, so keep that in mind, it takes reading documentation. People seem to like Unity and SFML, and I've though about making a game using SFML just for the fun. But its not easy to set up right out of the box without following the documentation, hence bad Ad hoc library structure they have. You shouldn't have to use makefiles to set up a library,..:0
Last edited on
closed account (Dy7SLyTq)
ummmmm i can build a game engine just from learning the language
@DTSCode

ummmmm i can build a game engine just from learning the language


Not sure if serious, without basic math knowledge (arithmetic), no you can't. therefore your argument is invalid. Even in java, where the library is basically made for you still have to know what a function/method is and that is inherently a mathematical concept. The language is different from the library that is coupled with the language. You can't program an app with a rectangle in the library but you can used the language to create a rectangle structure that will be drawn to the screen (gui) at (x,y) (math) location with (width,height) dimensions.

And of course with java, what ever you make will be generally cross-platform but this is not always the case, when speed is an issue. c/C++ is generally the language of choice for game engine development since it is faster, but it has generally no libraries included to do many of the tasks to develop a game engine. In other words, you couldn't know just that language and be able to program a game of the scale of BioShock for example, because it will involve calls to a WINAPI or some library such as SFML/Opengl/DirectX that will end up calling WINAPI (library) or using device drivers.
Last edited on
Not sure if serious, without basic math knowledge (arithmetic), no you can't


Not sure if trolling.
^i explained my reasoning better. not trolling.

it depends on the game he'd make. If its a console rpg that involves hp, health, defense, or other stats dependant upon adding subtraction then he's right, but if he's talking about Call of Duty or Mass Effect quality, then he's insane.
Last edited on
closed account (Dy7SLyTq)
yes i was talking about the first.
If you use directx and .x files to make games, you can dowload my directx exporter for 3ds max from my site:
http://www.cgdev.net
Last edited on
Pages: 12