Results 1 to 13 of 13

Thread: Help with DirectX 8 Game Engine

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2002
    Location
    Netherlands
    Posts
    43

    Question Help with DirectX 8 Game Engine

    Greetz everyone,

    I'm working on a game called The Calafornia Files. We've build quite a nice adventure with this game there's only one big problem. It used pre rendered scenes. Therefore I want to rebuild the game with an interactive 3D environment. I'm a reasonably advanced vb6 programmer but I have just started to learn DirectX programming. Any programming help or advice is greatly appreciated.

    For more info on TCF have a look at

    My TCF Website

    Mister_J

  2. #2
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    This website has some nice tutorials:

    http://www.directx4vb.com/

    There are many others but that should be enough to get you started. Good luck

    (Btw, for a point-and-click adventure I think it would be best if you just stick to pre-rendered scenes)
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2002
    Location
    Netherlands
    Posts
    43
    Thnx, but i alre knew that one. It is a poin't and click adventure at the moment but I want to adept it and create a more interactive 3d environment. That's I why I want to learn DirectX.

    I've another question. If I load a .x object inot my 3d world how can i move it to a different point in 3d space without afecting the other objects??

    Jordi

  4. #4
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Hmm, you should look for a tutorial on transformation matrices, that's what you use to move and rotate objects and stuff I think
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  5. #5
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    What you do is set the transformation matrix, render the object, then unset (clear, reset, whatever) that matrix.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  6. #6

    Thread Starter
    Member
    Join Date
    Jun 2002
    Location
    Netherlands
    Posts
    43
    Thnx for the advice,

    have you also got some tips on 3d collision detection? This should be a routine that returns wether there is a collision in x, y or z direction (when moving the player).

  7. #7
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Well, if you want simple collision detection between objects, you can use a sphere (or more) for each one of them. It's the simplest method I think. Hmm... Like this:

    VB Code:
    1. If (Obj1.X - Obj2.X) * (Obj1.X - Obj2.X) + (Obj1.Y - Obj2.Y) * (Obj1.Y - Obj2.Y) + (Obj1.Z - Obj2.Z) * (Obj1.Z - Obj2.Z) <= Obj1.Radius + Obj2.Radius Then
    2.     'We got a collision!
    3. End If
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  8. #8
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Jotaf: You dont complete the distance formula in your collision, so you need to square the minimum distance between the two points you want to test.

    Z.

  9. #9
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Yeah, you're right Zaei. Sorry, I wrote that in a hurry

    Try this one instead:

    VB Code:
    1. If (Obj1.X - Obj2.X) * (Obj1.X - Obj2.X) + (Obj1.Y - Obj2.Y) * (Obj1.Y - Obj2.Y) + (Obj1.Z - Obj2.Z) * (Obj1.Z - Obj2.Z) <= (Obj1.Radius + Obj2.Radius) * (Obj1.Radius + Obj2.Radius) Then
    2.     'We got a collision!
    3. End If
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  10. #10

    Thread Starter
    Member
    Join Date
    Jun 2002
    Location
    Netherlands
    Posts
    43
    Well thnx again but it's a little bit more complicated, there is a player who turns around and can walk in every direction. If the player collides with a wall he shouldnt go through it but move alongside with it.

    I know it isnt really easy but if i've got a little bit more time I'll figure it out myself with some good old pen and paper work, but maybe you've got some experience with this and have a good solution.

    Jordi

  11. #11
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Can you make your terrain just a tile/height map? That would be a LOT easier to code... And if you're not worried about having different "floors" in the game, huh you can use a simple algorythm that detects collisions between 2 lines to see if you're hitting the wall (imagine a 2D top-down view).
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  12. #12
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Mister_J, are you trying to do a resident-evil style game?
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  13. #13

    Thread Starter
    Member
    Join Date
    Jun 2002
    Location
    Netherlands
    Posts
    43
    The game should become something like hitman or so. You're a detective called Johnson. First you work for the Calafornia Police Department (nice alternative aint it) and have ot solve murders, etc. But in the end you decide to work on your own and fight crime for yourself. All this in a 3d environment. I know it's quite ambitious but I'm just starting and I'l expand it as time goes on.

    Btw if there is a programmer who wants to join our team (currently I'm the only programmer thought there's someone for the graphics and sound, etc.) just contact me, all help is welcome!

    Jordi

Posting Permissions

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



Click Here to Expand Forum to Full Width