Coding assistance needed...

SephirothSephiroth Fayetteville, NC, USA
I need somebody that can either help explain to me the operation of a 3D engine (no more advanced than the one used in Hexen/Strife), or somebody who is willing to code one with me for my game. I've got the rest of the code squared away, but I cannot grasp the 3D concept for the life of me. I've been told it uses sin/cos, but I've never used those before and don't know what they do or what value they hold. Once again, I'm not looking for information on or help coding some new "Unreal" or "Quake" engine. A simple Doom engine would be perfect. I appreciate any help that anybody can offer. Oh, and I am posting this in the Games Programming messageboard as well, since it's a game engine that I am looking for.

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]

Comments

  • What are you looking at putting the graphics out on? Is this a dos game or are you using windows?




  • SephirothSephiroth Fayetteville, NC, USA
    It's Win9X, of course.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • : It's Win9X, of course.

    In which case, why bother going to the metal on a 3D engine, when you can simply use Direct3D (or OpenGL)? As long as you can grasp the concept of 3D space, you shouldn't have any difficulty with it, and it'll be much faster.

    Try the tutorials in the DirectX 8 SDK. They'll have you loading meshes and texture-mapping in no time.
    --
    [italic][blue]Sunlight[/blue][/italic]


  • SephirothSephiroth Fayetteville, NC, USA
    Ah, I didn't realize that Direct3D had a 3D engine built-in. I knew OpenGL did (I am also an avid gamer and run everything in OpenGL with all the effects :P), but since this is my first hack at a 3D game, wouldn't Direct 3D or OpenGL be like, way over my head? If not, could you send me a link to the Direct3D or OpenGL SDK site(s)? Thanks Sunlight, I appreciate the help.


    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • : Ah, I didn't realize that Direct3D had a 3D engine built-in. I knew OpenGL did

    It's not quite like that. At the base level, Direct3D and OpenGL are simply triangle processors. They can do a lot with triangles - transform them between coordinate spaces, texture map them, light them, even procedurally process them (with the new vertex shaders in DX8) and render them with spectacular results. However, you still have to get the triangles in there.

    However, Direct3D supplies a utility library (D3DX) that will load meshes, textures and materials for you. It's then simply a matter of determining where in 3D space you want to put them, where your viewpoint is (and what orientation it is), and drawing the meshes.

    I'm oversimplifying, of course. There is quite a bit more to a reasonable 3D engine (level-of-detail, curved surfaces, even determining whether to draw something) - but you'd have to do this anyway...

    : but since this is my first hack at a 3D game, wouldn't Direct 3D or OpenGL be like, way over my head?

    Not at all. Far better you start using Direct3D than trying to implement all the maths yourself... and you'll pick up the maths on the way, without even noticing.

    : If not, could you send me a link to the Direct3D or OpenGL SDK site(s)?

    http://msdn.microsoft.com/directx/ for DirectX 8 (don't use the earlier versions!). The SDK is *big* (140Mb), but you can download it piecemeal, or order the CD for very little (highly recommended!). It comes with probably the best DirectX tutorials, masses of sample code and great tools.

    http://www.opengl.org for OpenGL, but you'll almost certainly have the OpenGL headers already (don't bother with Mesa). You just need good tutorials and samples, and unfortunately most OpenGL tutorials seem to concentrate on drawing triangles and shapes... mesh support is not standard in OpenGL, and so getting started can be much harder.

    I have a personal preference for Direct3D, since you need the rest of DirectX anyway to do the sound, input and network code - why not use the same interface for your graphics? It also seems to have the better tutorials. Many people prefer OpenGL, though. At the end of the day, it matters little which one you choose now, since you'll be able to transfer to the other easily later.

    A word of warning: I have not (yet) been able to get DX8 to work in Dev/C++. VC++ is highly recommended for DirectX development.
    --
    [italic][blue]Sunlight[/blue][/italic]


  • SephirothSephiroth Fayetteville, NC, USA
    Thanks Sunlight. I'll check out those sites. And I don't use visual anything. Since my Atari 400 with the casette drive, I have been a hardcore programmer, hehe. I prefer typing out the code myself, even though it can be annoying at times! I use Borland C++ 5.02. I REALLY need to upgrade to their latest release, but I don't think I can for free, lol!

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories