help with writing my own simple 3d engine
category: code [glöplog]
so i'm still working away on my 3d demo thing.
so far i've got several 3d - dot effects working (yay) and depth sort.
are there any tutorials (probably would have to be from the QBASIC days, but I don't really care) on doing things like these?
- drawing quads, triangles and other polygons in 3d space
- z buffering
- raytracing
- scaling a bitmap to perspective (i.e - one end is bigger and the other smaller)?
so far i've got several 3d - dot effects working (yay) and depth sort.
are there any tutorials (probably would have to be from the QBASIC days, but I don't really care) on doing things like these?
- drawing quads, triangles and other polygons in 3d space
- z buffering
- raytracing
- scaling a bitmap to perspective (i.e - one end is bigger and the other smaller)?
Probably there are a ZILLION tutorials on that.
Check out http://www.hugi.scene.org/online/coding/, there you should find tutorials about all of these topics.
E.g.
Drawing Triangles. Rasterization Tutorial
Polygon Drawing - Part 1
Polygon Drawing - Part 2
Triangle Drawing: Calculating the Deltas - Part 1
Triangle Drawing: Calculating the Deltas - Part 2
3D Coding TAT - Polygon Drawing & Clipping
Zbuffer And Other Sorting Topics
Raytracing-Primer
Raytracing shapes
Optimizing Refraction for Raytracing
About Texture Mapping
Texture Mapping
Texture mapping, part 2
Texture mapping, part 3
Drawing Triangles. Rasterization Tutorial
Polygon Drawing - Part 1
Polygon Drawing - Part 2
Triangle Drawing: Calculating the Deltas - Part 1
Triangle Drawing: Calculating the Deltas - Part 2
3D Coding TAT - Polygon Drawing & Clipping
Zbuffer And Other Sorting Topics
Raytracing-Primer
Raytracing shapes
Optimizing Refraction for Raytracing
About Texture Mapping
Texture Mapping
Texture mapping, part 2
Texture mapping, part 3
i'm not saying making engine is wrong, but.. this article in particular helped me gain pespective on writing a reusable code library for use in multiple projects vs 'an engine' for one thing.. depends upon whether your goal is one demo, demos and games, more demos..
http://scientificninja.com/blog/write-games-not-engines
http://scientificninja.com/blog/write-games-not-engines
The only proper texture mapping articles have been written by Chris Hecker...
1. Make polygons spin
2. Spin faster
2. Spin faster
Btw: The Second Reality source has been released... ;)
Oh btw, did you guys hear that Second Reality source was just released?
As said there are a lot tuts out there. I learned a lot from Denthor's Asphyxia Tutorials (and forgot most of it ^^) It's assembler + pascal.
the asphyxia tuts rule big time!
what canopy and kusma said.. oh, and did you hear? The second reality source was just released :O:O
even given the situation that's an audacious comment for someone who was in diapers when it was released, ferris ;)
what Canopy linked to. I once spent months (!) working on an "engine". ended up with a very performant opengl gui framework for which i stopped developing widgets because of laziness at some point. there is always one more feature your engine has to support in order to be able to do everything ;) btw, the most final product was a buggy eliza clone with text to speech support. i also started several general purpose 3d engines a long time ago (when I still had time, lol) and learned lots of stuff during the process, experimented with raytracing, and so on. all that was great for learning stuff, understanding mechanisms etc., but nowadays i prefer to arrive at something presentable. tl;dr: focusing on the end will lead you to the means. so true!
btw, there are plain old books on the topic too, like allen watts 3d computer graphics.
also, did you know, the second reality source was just released.
btw, there are plain old books on the topic too, like allen watts 3d computer graphics.
also, did you know, the second reality source was just released.
Things I've learnt:
- Don't worry, just code.
- Fake it until you realise that you've got to do it properly.
- Use something like git so you can try stuff out on a branch and if it goes to shit you can abandon it.
http://laurent.horus.free.fr/3d/triangles.pdf
My works in past century about renderings. If you can do it in full asm it runs fast. It's only pseudo-code.
My works in past century about renderings. If you can do it in full asm it runs fast. It's only pseudo-code.
Kusma: may I add... 3. Make a demo about it.
I'm not a very experienced coder but it's so true that "make games, not engine" or "make demo, not engine".
I've tried to make a lot of engine for demo on pc, wii, even ps vita, it always ended up with a poor lib too much complicated with a not so good skeleton. lol But I've learned a lot about opengl while this time.
Then I started to apply the rule above and since this time it's more easy to achieve a screen or even any program in general.
For the demos/games, I've now a little framework, done in
JS webgl+canvas, for demojs, for the next release I hope.
C++ for 32/64k on windows
C# on PSVITA but I prefer to wait a way to write native homebrew
D with derelict3, portable, this is the one we will need a true game engine
For each language the framework itself is slightly different, and more or less complete.
Now what I can do, is making a game engine on top of it for each language maybe or at least for the portable D version, but, I need to learn more about how to code a game engine in general I think.
And maybe I've forgotten another checkpoint between "I write a tiny framework to draw/listen things" and "now I write an engine on top of it"
It is so interesting stuff.
btw, The Second Reality source code was released guys!
And write games, not engines :)
I've tried to make a lot of engine for demo on pc, wii, even ps vita, it always ended up with a poor lib too much complicated with a not so good skeleton. lol But I've learned a lot about opengl while this time.
Then I started to apply the rule above and since this time it's more easy to achieve a screen or even any program in general.
For the demos/games, I've now a little framework, done in
JS webgl+canvas, for demojs, for the next release I hope.
C++ for 32/64k on windows
C# on PSVITA but I prefer to wait a way to write native homebrew
D with derelict3, portable, this is the one we will need a true game engine
For each language the framework itself is slightly different, and more or less complete.
Now what I can do, is making a game engine on top of it for each language maybe or at least for the portable D version, but, I need to learn more about how to code a game engine in general I think.
And maybe I've forgotten another checkpoint between "I write a tiny framework to draw/listen things" and "now I write an engine on top of it"
It is so interesting stuff.
btw, The Second Reality source code was released guys!
And write games, not engines :)
well thanks for that info :) should really help me along.
but since I'm 15 years old and still in high school, I need a bit of help with some of the math, like vector maths. Could someone help me with learning this? my email is : zedd <at> hushmail <dot> me
but since I'm 15 years old and still in high school, I need a bit of help with some of the math, like vector maths. Could someone help me with learning this? my email is : zedd <at> hushmail <dot> me
i fondly remember the days when age wasn't an excuse :)
reed, you mean the days when almost none of us knew 3D math? :D
I'm living those days right now.
They teach vector math in high school just show up to class.