|
-
Jan 16th, 2003, 01:29 PM
#1
Thread Starter
Member
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
-
Jan 18th, 2003, 08:44 AM
#2
Frenzied Member
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)
-
Jan 18th, 2003, 03:08 PM
#3
Thread Starter
Member
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
-
Jan 18th, 2003, 03:50 PM
#4
Frenzied Member
Hmm, you should look for a tutorial on transformation matrices, that's what you use to move and rotate objects and stuff I think
-
Jan 18th, 2003, 05:24 PM
#5
Good Ol' Platypus
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)
-
Jan 19th, 2003, 01:59 PM
#6
Thread Starter
Member
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).
-
Jan 19th, 2003, 02:38 PM
#7
Frenzied Member
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:
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
'We got a collision!
End If
-
Jan 19th, 2003, 05:55 PM
#8
Frenzied Member
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.
-
Jan 19th, 2003, 06:45 PM
#9
Frenzied Member
Yeah, you're right Zaei. Sorry, I wrote that in a hurry 
Try this one instead:
VB Code:
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
'We got a collision!
End If
-
Jan 20th, 2003, 01:56 PM
#10
Thread Starter
Member
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
-
Jan 20th, 2003, 02:52 PM
#11
Frenzied Member
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).
-
Jan 20th, 2003, 04:08 PM
#12
Good Ol' Platypus
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)
-
Jan 21st, 2003, 05:09 AM
#13
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|