Skip to main content
GameDev.net gamedev.net
🔒 Locked

So I want to make a game from scratch in C++

Started by Davkilla101 Sep 13, 2015 at 12:06 PM 13 replies 12.8k views
Original Post
Davkilla101
Davkilla101

Hello everyone,

So I've been thinking of making a 3D game from scratch using C++. I'm already familiar with C++, and I'm looking into game programming patterns (The "book" is written in a language other than C++, but I get the general gist of it). Aside from this, what other things do I need to know in order to make a game?

Thanks in advance.

EddieV223
EddieV223

http://unity3d.com/learn/tutorials/topics/developer-advice

Watch those videos.

Then you should either decide to use an existing engine or pick up a few libraries in you chosen language as your tool set. Then start playing around and try to make some very basic stuff like pong, breakout, ect... Good luck and don't forget that you will probably end up reading a ton of books/tutorials!

Above all else make sure the projects you pick to learn from are fun and interesting to you.

Davkilla101
Davkilla101

Thanks EddieV223, I'll definitely take a look at that!

SeanMiddleditch
SeanMiddleditch
As always, you must practice your craft.

I highly recommend building many very small and simple games (clone Pong, Tetris, Pacman, Breakout, etc.) to get your head wrapped around the basics before you jump into anything serious.

You can't paint a master piece if you've never held a brush before. smile.png
Sean Middleditch – Game Systems Engineer – Join my team!
Davkilla101
Davkilla101

I'll be sure to do that SeanMiddleditch as I'm sure I'll want some experience going into my game. I also just realized that I actually have a copy of Game Coding Complete, 4th Edition by Mike McShaffry so I'll also be following that book as well. Thanks for the advice!

SolDirix
SolDirix

Be careful. Making a game in C++ is definitely a fun challenge (and sometimes fustrating), but you must make sure that you have experience in easier methods, such as using GameMaker, or Unity. Making a game in C++ is pretty much the second hardest way to make a game/game engine, aside from making the whole thing in assembly. You will need a lot of experience to aid you, so that you do not feel like you are overwhelmed.

I'd highly recommend starting with GameMaker, Flash, or any 2D game making software, and then move up to Unity, and then the C++ stuff if you are ready for it.

"Aside from this, what other things do I need to know in order to make a game?"

Lots of things smile.png

-A lot of 3d math, preferably Linear Algebra and Trigonometry. You may not need to know any Calculus, except if you are doing something extremely complex and unique involving 3d functions and rates of change. Linear Algebra is very important, as it is used to transform(translate, scale, and rotate) objects, as well as graphical effects like shadow mapping.

-You need to know where all the tutorials are at. OpenGL-Tutorial.org, Rastertek.com, etc.

-You need to know how to load files as fast as possible. Loading in video games is always too slow, so the faster the better. Get used to using a lot of binary files, and loading a lot of contiguous data.

-Know which libraries to use. This is very important, because different libraries can support different Operating Systems, and may or may not be up to date, or as fast as others. AFAIK, there are about 20+ different rendering libraries out there.

-Know how to compile a library. I wrote a topic on that here: http://www.gamedev.net/topic/663810-how-to-compile-libraries-for-c-mingw-with-msys-on-windows-for-indie-game-developers/

View my game dev blog here!
Infinisearch
Infinisearch

What kind of 3d game are you looking to make?

When you say from scratch do you want to do absolutely everything yourself or will you use libraries for collision/physics...etc?

Do you have an idea for what you want to do about content ie 3d models?

-potential energy is easily made kinetic-
Davkilla101
Davkilla101

Infinisearch, I've been looking to make a simulation game. And I want to use libraries so I don't have to write everything myself, but I say from scratch as I don't want to have to spend a good while cutting out unnecessary parts of an engine in order to get performance requirements to something that's reasonable.

And what do you mean what I want to do about content?

Infinisearch
Infinisearch




Infinisearch, I've been looking to make a simulation game.

An RTS or something else? This will help people give you a list of what you need to learn.




And I want to use libraries so I don't have to write everything myself

That's good, it will allow you to approach game programming from the top down without worrying about the details, at least initially. Look into a physics library for collision detection (IIRC you don't actually need to use the physics), a sound library for loading and playing sounds, and potentially more.




And what do you mean what I want to do about content?

As you might imagine getting content for your project can be one of the hardest thing for a programmer, so have you looked into getting content? Have you looked into what format your (lets say) 3d models will be in? This way you can find a library or start coding a loader for them yourself.

-potential energy is easily made kinetic-
Davkilla101
Davkilla101




An RTS or something else? This will help people give you a list of what you need to learn.

I was thinking more along the lines of making something somewhat similar to the sims 3.




As you might imagine getting content for your project can be one of the hardest thing for a programmer, so have you looked into getting content? Have you looked into what format your (lets say) 3d models will be in? This way you can find a library or start coding a loader for them yourself.

I've been thinking of using Maya for that, as I'm more familiar with how to use Autodesk suites than other 3D modelling suites.

Infinisearch
Infinisearch




I was thinking more along the lines of making something somewhat similar to the sims 3.

http://www.gamedev.net/topic/75762-annotated-objects-which-drive-behavior/

That's a thread on a technique used in the Sims for AI, I think it has a link to a paper on the technique.

For pathfinding I always liked this link to start out.

http://www-cs-students.stanford.edu/~amitp/gameprog.html

AI and game logic is what you'll definitely have to implement yourself. You're most probably fine with using an engine or libraries for everything else.




I've been thinking of using Maya for that, as I'm more familiar with how to use Autodesk suites than other 3D modelling suites.

I know of Maya but I don't know what formats it exports. The advantage of using an engine will be you're pretty much guaranteed to be able to import models and animation from Maya.

-potential energy is easily made kinetic-
PolarWolf
PolarWolf

Surely its hard,but maybe not so hard as it seems. There are many open source engine available,such as ogre for mmo.sdl for mobile. glm for math etc.And fmod is now free for indies,its a simple and elegant audio lib/

Btw,i am on the way making my own game,its extremely fun.

LAURENT*
LAURENT*

If I were you, I would work off some already existing code that someone is completely cool with you using as a base. You learn way faster and get more done quicker.

Davkilla101
Davkilla101

Sorry for not paying attention to this thread as much as I should be, I've been moving.




http://www.gamedev.net/topic/75762-annotated-objects-which-drive-behavior/
That's a thread on a technique used in the Sims for AI, I think it has a link to a paper on the technique.
For pathfinding I always liked this link to start out.
http://www-cs-students.stanford.edu/~amitp/gameprog.html

AI and game logic is what you'll definitely have to implement yourself. You're most probably fine with using an engine or libraries for everything else.

Thank you so much for this, this is definitely helpful, I shall bookmark all those links at once.

And I'll look into the engine and libraries more to see what will fit best with what I need.




fmod is now free for indies,its a simple and elegant audio lib/




glm for math

I shall also look into these libraries, thanks!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.