|See what's going on with flipcode!|
Starting A 3D Engine
Question submitted by Fop (22 June 2000)
|Return to The Archives|
|I have a simple question for you. I want to make a 3d-engine but how do I start?|
Usually, you'll need to start with some building blocks. I usually start with a
vector library (points, vectors, planes, lines, matrices, etc.) Build a solid
library and test it. It's very important that you get this right, because you
will be relying on this throughout the rest of your development efforts.
Next, choose a 3D API and run with it. Build up a library that you are comfortable using, that performs all the necessary steps in the 3D API of your choice. Making this complete isn't as necessary. Yet.
Now you've spent some time writing code, and you've had time to ponder what you want from your engine. It's time to design it. If you're not big into design, then here are some very simple tips to get you started:
Next, start coding your modules. It's very good to know that this process can get very tedious, depending on the scope of your engine. It's very hard to stay focused on an engine, no matter what the scope. I learned a long time ago, that I'm a visual person. I get gratification from my work when I reach a point where I have something really cool on the screen. So spread out your work such that you actually plan for those "gratification periods." They'll give you the boost you need to make it through the next batch of mindless typing.
Most importantly, have fun. Learn a lot. Don't expect this engine to be the best thing ever. This is your first engine, so it's a learning experience. Your next engine will be a lot better. How do I know? Because by the time I was halfway through my fifth engine, I was already thinking how much better my sixth would be.
Oh, and if you find yourself rewriting a lot of code over and over, don't worry, that's normal. It's called learning and improving. :)
Response provided by Paul Nettle
This article was originally an entry in flipCode's Ask Midnight, a Question and Answer column with Paul Nettle that's no longer active.