Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: Writing a game engine from the scratch

  1. #1

    Writing a game engine from the scratch

    Hi all

    I 'm new here. Game development has been my hobby for a long time, and i am plannning to write my own game-engine from the scratch. (only with some DirectX headers).

    I will first write the graphics part, wich should have hardware accelerated 2d graphics using Direct3d 7
    (My pc still only hardware-supports DX7 ).
    So my engine will use both, directdraw and direct3d (just as delphix does).
    but before i start i need to know some things first:

    A. Is it meaningfull to use Directdraw in my engine and will it still work under Windows Vista?? Or is it better and faster to use 100% Direct3d7 and draw the whole game using vertex quads??

    B. Has any of you guys ever written a Directdraw/Direct3d engine from the scratch??
    Is it worthwile, to write it from the scratch and decide wich features must be implented and wich not (for some extra speed, and efficiency)??

    C. Are there any good tutorials or open-source games available, wich show how to write DirectDraw/Direct3d from the scratch??


    Thanks in advance
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  2. #2

    Writing a game engine from the scratch

    Hi chronozphere,

    First, let me welcome you to PGD. I hope you'll enjoy your stay.

    Writing an engine is a huge task. I'm currently writing one (using opengl) for my PGD entry (and future projects), and let me tell you, it is difficult and a lot of work. However, it is also very rewarding, so dont let the difficulty stop you there.

    First thing you should consider is do you want to go 2D or 3D. If you go for Directdraw then it's going to be a huge task converting to 3D, if in the future you decide to go 3D.
    I'm not sure about Windows Vista. I haven't really looked into that much, but I doubt Directdraw is not going to be supported in some way.
    It is also not perse better to use D3D. It really depends on your needs. Writing a pixelperfect collision detection routine for example, is a whole lot harder since you can't easily detect pixels. D3D is however a whole lot faster.

    I dont know about DirectDraw sources, but there are a couple people on PGD that have quite a bit of experience with D3D.

  3. #3

    Writing a game engine from the scratch

    If you are going for DirectX, i'd recommend making the use of latest possible headers. There may be many publishers, pick one that seems much used
    I started an OpenGL based engine about a year ago too (GLEngine). It has been much work but it works so well in every task i give it so i'm pleased with its progress. Just recent addition was fast frame based animation of 3D models.

  4. #4

    Writing a game engine from the scratch

    Thanx for your replies

    Quote Originally Posted by Traveler
    Hi chronozphere,

    First, let me welcome you to PGD. I hope you'll enjoy your stay.
    Thanx

    The game i want to make with my engine is 2d but must also use hardware acceleration for special fx.
    So i defenitly want D3D support in my engine.

    Quote Originally Posted by traveler
    If you go for Directdraw then it's going to be a huge task converting to 3D, if in the future you decide to go 3D.
    Okay, so if i definitly want D3D in my project, it will be difficult to use it with DirectDraw.
    Is it a good idea to drop directdraw and make a 100% Direct3d engine (even if i want to make 2d games with it)??

    About collision detection, i am only planning to use rectangles, circles, lines and points. So reading pixels for Collision detection wont be nessecary.
    Is there more 2d stuff that will become harder when using D3D

    Quote Originally Posted by user137
    If you are going for DirectX, i'd recommend making the use of latest possible headers. There may be many publishers, pick one that seems much used
    Remember that i only can use DX7 hardware until i have a better videocard installed.
    I decided to use the specs of my machine as 'minimum system requirements' for my engine.

    >> Is it worthwhile to use the latest headers, even if i begin with DX7?? (might use DX8 or DX9 later)
    >>Is it hard to convert an engine to a newer DX version??
    >>And, most important, wich headers would you recommend??
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5

    Writing a game engine from the scratch

    Sorry, can't help you with headers as i haven't used directx. But as for their version, you should still use DirectX 9 headers. They work fine with every graphics card, even old ones. DirectX9 just brings new additions that you can use or make them available to others who use your programs, but basic functions should work for everyone.

    Try not to make just another DelphiX It use DX7 and everyone's complaining about it.

  6. #6

    Writing a game engine from the scratch

    Hi chronozphere,

    Any reason why you want to make a gfx engine? There are so many now available - they all do similar things and the support for them is being divided.

    Is your goal to try and make an engine then cool. If your goal is to make a game then I would suggest putting effort into the actual game itself using one of the other engine's on offer.

    Have a look at the DanJetX engine on www.dan.mirg.ru it does the lot including 3d animation and looks promising.
    The views expressed on this programme are bloody good ones. - Fred Dagg

  7. #7

    Writing a game engine from the scratch

    One reason could be the knowledge he gains. It is the #1 reason for me as well.

  8. #8

    Writing a game engine from the scratch

    Quote Originally Posted by user137
    Try not to make just another DelphiX Wink It use DX7 and everyone's complaining about it.
    Is DX7 that bad, or is Delphix buggy?? :?
    The main difference between DelphiX and my engine is that mine is gonna be 100% Direct3d. As Traveler mentioned, writing an engine wich uses both DirectDraw and direct3d is quite hard (and may not work well).
    Or is it better to buy a DX8.1 GFX card for about 30/40 Euro's (maybe second hand), and try clooties DX8.1 SDK to write an engine??

    @czar: Indeed DanJetFX looks pretty cool. I've tested some examples on an other machine (Wich has DX9) and they look awesome.
    However i dont need that much features.
    I assume DanJetFX uses DX9, if that is true, i rather use something else because i want my engine to be compatible with older machines witch probably use DX7 or DX8.1.
    2D drawing using vertex quads, and a few blending and transformation tricks will do.

    Quote Originally Posted by traveler
    One reason could be the knowledge he gains. It is the #1 reason for me as well.
    You're totally right :lol:
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  9. #9

    Writing a game engine from the scratch

    Quote Originally Posted by chronozphere
    Is DX7 that bad, or is Delphix buggy?? :?
    Or is it better to buy a DX8.1 GFX card for about 30/40 Euro's (maybe second hand), and try clooties DX8.1 SDK to write an engine??
    Maybe there is some bugs but that is not header's fault. UnDelphiX is actually DirectX 8.1 but it cannot take use of latest graphics cards speed and visual tricks.

    What i meant with old graphics cards, i mean like Riva TNT, GeForce 1, Radeon 8xxx series from time when computers were like 300MHz "Speedbusters" :lol: Every one of those can run program made with DX9 headers. There are things like Pixel shaders that are maybe supported by DX9 header but they also require high end graphics card, so simply don't code with them Advanced tricks anyway...

    Here's few DX9 ones:
    http://sourceforge.net/projects/delphi-dx9sdk/
    .. and.. that's about all i could find

  10. #10

    Writing a game engine from the scratch

    Thanks, User137 for explaining the whole thing.

    So, that was the reason why i could run the basic D3D examples for Clooties DX8.1 SDK on my DX7 GFX card (See Samples/Tutorial directory). They just don't use the fancy Pixel-shader thing(or whatever it might be).

    So, if i use the DX8.1 SDK for my games. All user need to install DirectX 8.1, but will not always need a 100% DirectX 8.1 Compatilbe GFX card. This depends on whether the game uses the newest features or not).

    For example if my game uses DX8.1 but only uses the features that where available in DX6, then the user only needs a DX6 compatilbe GFX card, but must have DirectX 8.1 installed.

    Can someone verify this for me??
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •