Ok, I'll admit that I am nowhere NEAR advanced enough in C or C++ to write a 3D engine, but I have a few questions that perhaps someone can explain to me.
I have written to 2 programmers who wrote 3D FPS games, and neither replied. One of them even said he would. Go figure.
Anyway, my questions are about the basics of FPS games. I'm wondering how they do the following:
1) What type of software is used to build the 3D world? I'm sure there are several, but what are some common ones?
2) Once the 3D world is built, I would imagine the entire world is a 3D wireframe, right?
3) If so (that it is a wireframe), I'm sure it has to be decoded. What are the basics? A huge array it is loaded into? Or how can this be done?
4) After the textures have been drawn using whatever CAD or paint program, how would you stick those onto the wireframe? For example, if you have a wireframe for a grass patch, how would you add the texture? Or if you had a railing and a small rug hung over the side, how might that be done?
5) If you have a shooter, or anything first person, how does the player move through the world? The best I can think of is you have X,Y,Z coordinates of the world, and your player has its own X,Y,Z location, and you simply change your coordinates. Am I even close to right?
6) How do you change the height of view? Like if the player is walking up steps, or looking towards the sky?
7) Lastly, if the player runs into a wall, how do you keep the player from walking through it? I know this is collision detection, but I don't understand that.
Clearly there are a lot of 3D questions here. I have read some tutorials but I just don't understand it.
Anyway, I'm not planning on making a 3D game (I don't nearly have the math capabilities), but these things have always bothered me. I even contacted Andre Lamothe a few years ago with some of these questions. He said all were answered in Black Art, yet I couldn't figure it out.
Anybody willing to help explain?
You've asked a wide range of questions. Perhaps it's best if you read a book to answer them all.
Scenes are basically a large array of triangles. Just like all of the other objects in the view. There are many different ways to add textures to the objects. A simple one is defining each vertex of an object to match with part of the texture. Moving through the world can be done many ways. you can move the 'camera' or the 'world' or each object (even combinations of these).
Basics of 3D views are x,y,z axis so moving the height you translate up along the y axis (assuming that's up). There are also many ways to do collision detection. Bounding by spheres, boxes or determining if the planes of the objects have crossed.
I'm no expert, but I've been doing simple stuff for one of my classes so I might be able to help a bit.
Have you chosen an OS and API?
I haven't chosen anything because I'm not planning on writing a 3D game anytime soon. From what I've read in numerous reviews, you have to have killer math skills and know algebra, trig, and perhaps geometry to do this. I can do basic algebra, and that's it. This is part of the reason why I don't plan to start writing a 3D engine.
The deal is, I have consulted books. I've read as much as I can about this and it just doesn't make sense to me. My biggest problems are not understanding what software is used, how a world is made, how textures are added to the world, how to walk through it, look around or move up/down, and hit objects.
That really has me baffled.
I would be happy to read books on it, but again, what I have read didn't help. On top of that, I'm only looking for a good overview of how this is done, no source or anything.
Hey Unregistered, goto http://eqquinox.com/usuarios/oskilian/aurora
I could really use your help!
I really mean it.
Well, to start out work on 2d programming using books like these:
Tricks of the Game Programming Gurus
Real Time Strategy Game Programming using MS DirectX 6.0
then once you got that down, move to this book on 3d programming. it is REALLY good, but you have to have 2d programming down well before you can move on to this book:
3d Game Programming in C++
You can also find the source code to Doom 1/2 and Quake 1/2/3 at Id Software's website. That might be able to help you.
Well it doesn't look like I'm going to get a straight answer. I do have SEVERAL game programming books, and I have read them. I have owned Tricks for years.
I know you have to know 2D game programming very well, but I wasn't asking how to write them, but rather, a basic overview of how this is done.
Either nobody really knows, or just doesn't want to write about it.
It's a very large topic. Involving many areas of study. That's why books have been written about it. Unless you're looking for someone to type a small book and post here I don't think it's reasonable to tell all about 3D engines.
Maybe just ask one question at a time so you can get a more specific answer.
It's sort of like asking someone "how do I program?"
Well I don't really agree with that at all. I didn't ask how to program, or how to write a 3D engine.
I didn't ask how the physics are done. I simply asked for rough outlines, not how to write it. I'm sure the answers are long and involved. All I was after was a very basic overview. Such as "the world has x,y,z coordinates, and so does your player... when you move your x,y,z, the world around you updates with the new coordinates."
I have no clue if that is even right, I just made it up. The deal is, an answer like THAT isn't hard at all. I think perhaps you feel like I want extreme detail. I said all I was after was an overview, not a full book.
Perhaps I should not have asked for even an overview. At this point I will look elsewhere.
Nowhere in my message did I ask *how* to write it.