Creation of a FPS engine using C++

pyromaniac_zak 101 Dec 25, 2008 at 02:47

Is it possible to create a FPS engine which includes all categories such as AI, graphics, interaction, etc. using the language specified in the title? If so, any suggestions? I am new to programming and my teacher has lent me his college C++ books. I have been doing some reading and the books are not related to much of the categories that relate to game designing. Nevertheless I shall not let those books go to waste considering the fact they will help me brush up on programming and they come with a full version of the C++ programming language. Thus I ask of you fellow genius’s to lend me a hand and throw any information you can at me. Thanks, and Merry Christmas Devmaster staff and devmaster users!

3 Replies

Please log in or register to post a reply.

starstutter 101 Dec 25, 2008 at 03:16

Not only can it do it, C++ is the industry standard for creating games. C++ can do most anything if you get good enough. However, remember to use OpenGL of DirectX (or a 2D Graphics library), because I can’t imagine programming games without those.

DaveStandard 101 Dec 26, 2008 at 11:45

You need to mostly master C++ first, creating some projects that manage pointers and memory, and should try creating some tools using the Windows API or some Linux box before you even touch graphics programming.

Next stop once you can handle the C++ code necessary, you should tackle some OpenGL or Direct3D tutorials (and download and setup the API(s) you choose to learn) which teach you how to create a display window, get a system up and render some primitives to screen.

Here are some links to get you started if you are a Windows programmer:
(An OpenGL getting-started tutorial.)
(A Direct3D getting-started tutorial.)
(Ideas about 3D objects/space programming for graphics and physics systems.)

Once you can follow the above examples, you should consider buying a book to teach you fundamental concepts about 3D graphics rendering, and you can just go on from there.

Celestin 101 Jan 07, 2009 at 21:34

It’s worth noting that a 3-tiered architecture with proper class design and transport mechanisms will vastly improve your ability to code as you learn. Try to break each of the things you want to do into a component and then ask yourself: Is this something graphical, something logical, or something stored? Game logic such as determining how much damage a sword will do when it hits is entirely independent of what the sword looks like or what the stats of the sword will be. If your engine is built properly, each component will then be entirely independent, and can be reused on its own, making it far more valuable for future projects. After all, if you’ve managed to write code that perfectly models recoil from firing a minigun, do you really want to have to rewrite that every time you want to use that in a future program? (Yes, I realize you’re wanting a reusable engine, but based on your questions, your expertise is probably too limited to really expect too much from a first attempt.)