Being a programmer of web and DB centered applications, I have knowledge in data structures such as lists, trees, graphs, etc. I honestly use very little of these data structure algorithms in my coding, except for sorting things in plain arrays, as I worked almost entirely with client-oriented frameworks where all the core functionality was built-in. I know C, PHP, Java, HTML, PL/SQL and MySQL. I am currently learning Python.

I want start with game development. I have seen other questions regarding suggestions, tips and approaches to game development for beginners. I understand these point, and am clear with the answers. A few days after posting, I read the article Write Games, Not Engines, and realized I should implement a game before I create a game engine. Still, I have questions.

My aim is to

  • Improve my core level programming skills, including using data structure algorithms, mathematics and physics concepts.
  • Implement a good game engine, to indulge myself in core level coding.
  • To pave my way into the A.I. research field.

What are the specific mathematics, physics, AI and general concepts a programmer should know in order to develop a game engine?


2 Answers 2


Data Structures: It is certainly a valid question. However, while some Data Structures are useful for any sort of Game (like the ones you've already mentioned, Lists, Trees...), there are others that are very specific. For Example, Octrees can be very useful in 3D Programming, but in a pure 2D environment you will probably not be needing those.

Algorithms: The same rule of thumb applies. Example, in a pure 2D environment, Collision detection works very very differently than in 3D.

Important Mathematical Areas: THE Most important Area for a Engine Dev to be familiar with is Linear Algebra and more advanced Algebra Topics (Quaternions). Quite simple really, if you're comfortable with Linear Algebra (and I mean beyond simple Matrix multiplication), your off to a good start.

Next ist Geometry, which connects well to Linear Algebra in Engine Dev anyways, and probably doesn't need a mention anyways.

Further, it never hurts to have a solid understanding of Basic Calculus. This comes in Handy when dealing with the Physics Engine or more advanced Shading Topics.

Other Topics of Interest should be: Combinatorics, Statistics

Physics: It's not mandatory, IF you are intending to make simple games. Doesn't hurt, but you will get by fine with high-school physics in this case.

If you're thinking of writing a physics Engine, or implementing an existing Architecture, then yes, it's mandatory. But fear not, there are many Physics Books written specifically for Game-Devs. Just keep in mind, read these BEFORE you start coding a game with physics. If your game should have physics, these Engines will tie in deeply into your core architecture.

AI: To be entirely honest, if AI is your main Interest, I wouldn't bother with writing an entire Engine. AI is alot more fun to do when you have an existing Architecture to play with. Writing an Engine will be a pain, and will be quite a while until you are able to implement fun AI Algorithms.

What Type of Game do you wish to be developing? Perhaps I can elaborate more on these Points with this information.

  • \$\begingroup\$ Thanks for your elaborated answer. As an answer to your question.. well at this moment I don't have any idea in my brain, but want to develop some 3d game engine. But think better to start with some 2d game and get to know the environment. Before all these I should play some games to know the games look and feel (as I never played videos games :-) ). So that it is easy for me to understand the books terminology and other things. I found the below very helpful, \$\endgroup\$
    – droidsites
    Sep 18, 2011 at 9:57
  • \$\begingroup\$ sorry missed the link in my previous comment: gamedev.stackexchange.com/questions/8502/… \$\endgroup\$
    – droidsites
    Sep 18, 2011 at 9:57
  • \$\begingroup\$ In the past I would have recommended that you start with 2D games first if you want to develop 3D games. However, with the uprising of Architectures like XNA, I believe it is more fun to dive directly into 3D. Have you already taken a look at C#/XNA? Shouldn't be a problem given your programming background \$\endgroup\$ Sep 18, 2011 at 10:15
  • \$\begingroup\$ No, I hadn't checked it. Yep...it is not problem to go for C#. But I am very interested in python kind of thing :-) \$\endgroup\$
    – droidsites
    Sep 18, 2011 at 10:23
  • \$\begingroup\$ If you're interested in Python and you're more interested in building a game rather than building the technology for building a game, you might check out Panda3D, or the Blender Game Engine. \$\endgroup\$ Sep 21, 2011 at 20:12

While it may be valid to ask which data structures are most used in game development, it's way more valid to ask which data structures are used for specific problems. I can easily state that hash tables are super common in games, but that wouldn't tell you anything useful in terms of when and where to use (and not to use!) a hash table in your own code. :)

In terms of math, you need to have a very strong grasp of linear algebra (vectors, matrices, linear systems solving, etc.), a very strong grasp of trigonometry, and at least a basic understanding of calculus (simple derivatives and integration). Any introductory college-level linear algebra course should set you on the right path, if not teach you about all you need to know to start working with common 3D graphics principles. I also link a book below which you may find quite helpful.

For physics, you're in for a ride. Physics can be broken into two different categories: collision detection and collision response. You absolutely must know the math behind collision detection, as that math is more or less identical to what you need to do graphics (especially for building the trees and maps you need for occlusion), and you're going to use that stuff for a lot of your game logic as well.

Collision response can vary from "simple" to ridiculous levels of intricacy, and even the simple stuff can be non-intuitive at first. I would highly, highly recommend that you leave that stuff to an existing library like Bullet, Havok, PhysX, or so on (or Box2D if you're working on 2D gameplay) until and unless you're comfortable with your existing math and algorithm knowledge and decide you want to learn how physics engines work. I would then recommend you build a very simple 2D physics engine as your first attempt. 3D physics engines are insanely complex beasts, and are (arguably) by far the most complicated and difficult part of game programming, which is why physics engines are the most commonly licensed third-party tech used in games. You just don't see very many games that aren't using Havok or PhysX in the professional world, despite how many games have from-scratch home-grown graphics engines and core engine code. Even companies that do nothing but build game engines typically license a physics engine, e.g. Unreal just uses PhysX rather than including its own physics engine.

I would recommend the following books to get you started. The first is an introductory level book on the basic math you need to know as a 3D game programmer:


The second is a book detected to collision detection algorithms (not collision response!) which will help with both your graphics coding and your physics coding:



Not the answer you're looking for? Browse other questions tagged .