Writing my own 3d engine

Started by
13 comments, last by superpig 18 years, 11 months ago
Hey, I've been thinking lately about trying to write a nice little graphics engine. The only problem is that I don't know what it takes in means of math education. I was hoping one of you guys could tell me the requierments and maybe guide me to a useful website that walks you through the basiscs... Any useful answers will be nice :) Asaf Polturak, Israel
Advertisement
Basically, I'd suggest you get a grasp on matrix and vector math. Do you necessarily need to memorize how a Cross product is performed or how to multiple two matrices together? No, not really. I think you need to understand what's available and generally what operations can do for you. Vector math is pretty easy to find good explainations on via google. Matrix can be a little tougher to find stuff in layman's terms, but here's a site that helped me out a ton:

http://www.sjbaker.org/steve/omniv/matrices_can_be_your_friends.html

Hope that helps you out!
"Game Programming" in an of itself does not exist. We learn to program and then use that knowledge to make games.
I second that.

You don't even need a full grasp of linear algebra for most things. If you know that an object's orientation and location is stored in a 4x4 matrix and how multiplications with other matrices affect it, there won't be any problems for you unless you plan on also creating a physics engine.

-Markus-
Professional C++ and .NET developer trying to break into indie game development.
Follow my progress: http://blog.nuclex-games.com/ or Twitter - Topics: Ogre3D, Blender, game architecture tips & code snippets.
hi:To walk through the basics just visit the folowing link
opengl.org
open the www.google.com then type in the search " ne he openGL " and go to the first link .i think u ll find all the answers u neede for that.
im from pakistan and also working on similar kind of project
regards
nadia
Thanks for the fast replies but it wasn't exactly what I was looking for.

The thing is that I took a linear algebra course in college, so I got that part covered :)

But I don't know where to start in actually writing a 3d engine. The last link that was given wasn't helpful (I didn't quiet understand what it meant...),

If anyone has a link or some advice for a starting point, that would be great.

btw - I don't know what's a physics engine, so if you could explain that too...

Thanks
Quote:
btw - I don't know what's a physics engine, so if you could explain that too...

Hmm, Suppose you could explain it as, a physics engine applies how things would react in the real world to your 3d enviroment.

If your not shure where to start writing, API Abstraction, Math library and a scene graph is a good start.

One thing that helped me alot was actually just diving into a 3d package(eg, blender, lightwave, maya, ...), it's easier to see the concepts in action, leaves you thinking of ways to implement that feature in your engine.

</2 cents>
That was actually usefull, but i'm not sure that is the best place to start, plus it's kind of up in the air...

The best thing really, is if someone could point me to a place that explains the first steps of writing your basic graphics egnine.
First off, are you familiar with any of the 3d programming apis such as OpenGL or DirectX? If not i'd suggest you learn how to use one of em. I suggest DirectX because of the d3dx library.

Second, how advanced are your programming skills?

Third, after you're able to render and grasp one of the apis being able to manipulate geometry and how the rendering pipelines work. You might want to think about what a 3d engine realy is and what you want yours to do.

A very basic and generalised list of features that you need to program just to get your program up and running is:

Some core code to get your windows app running and using your "Renderer".
Writing and thinking about an "Input" system. (Mouse, Keyboard etc)
A resource manager of sorts. I find it easy to divide em up so that you'll create a "TexturePool" class that handles loading in textures that's requested as well as de-allocating them when requested. Such resource classes should use a programming design called "Singleton". If you don't know what that is i suggest you use google.

Once you've got those basics up and running you're going to have to think about how and what you want to render. Why? Well depending on what you want to render and how, you're going to have to write "SceneGraph"s to handle it. A scenegraph is basically a class that manages geometry and renders it using your "Renderer".

There are alot of ways to manage your basic level geometry such as BSP, Quad-/Octtrees, Tiles etc etc.

What i've covered here is just a rough estimate of what you'll need in your 3d engine, not even considering if you're going to use the fixed function pipeline or write your own shaders.

Understand something, you go under the section of "I want to make a game ^_^ WEE fun!! Where's the button i push to be carmack? :D".

I can't think of any other form of programming that's as complex as writing your own serious 3d engine. And to boot, a 3d engine is just a tool to render geometry. The next step is writing a game engine. And what a game engine contains is pretty much all the logic as to when to load in the data. How the data is handled, what's moved... what's loaded... everything... scripting... you name it :S
Well, my programming skills are good enough (I was actually insulted by the whole singleton issue :) )

I also recently wrote a nice little game using managed directx.
I most certainly have the math needed. I believe that It's all a matter of getting to a place where I will be guided. Hanging in this kinda forums getting advices from people such as yourself isn't a bad idea as well...
Why not try either getting a book on 3D Game Engine programming or 3D Graphics Engine programming, or take a look at some of the free open source game/graphics engines on the net. There are plenty to choose from.

This topic is closed to new replies.

Advertisement