Posted: 16th Dec 2002 7:04
Hi all,

As promised I uploaded a small race game with models and code to;

www.gamedevvault.com/dbpro/race/race.zip

It includes an opponent who races against you. It's not textured all the way, but it's really just a resource to learn from.
Posted: 16th Dec 2002 9:26
Hmm.. i wonder if this i a problem with my PC or... the problem is; the screen stays black and does nothing.

I'm having more problems so if no one else has this :-(
Posted: 16th Dec 2002 9:30
Yeap, the same happens to me.

Try running it in debug mode ...
Posted: 16th Dec 2002 17:01
it takes a moment before it pops up. It does here on mine as well.
Posted: 16th Dec 2002 20:51
maybe it's a patch issue, do you have the latest for DBPro?

cypher
Posted: 17th Dec 2002 3:42
Not a patch issue but cypher, dude, did you know you were using Polygon collision. Either it's a buggy command (likely) or our machines/cards can't cope with models:

Body.x: 1190 Verts 2032 Faces
And
Track1.x: 10150 Verts 20240 Faces

Having Poly collision between them!

I'd suggest reworking this with a BSP. Do the BSP Collision commands work yet??

Anyway I turned off the collision and enjoyed the race all the same

BTW you might be interested in my DB1 tutorial for creating tracks such as this. Unfortunately, the limb commands in DPPro still seems bugged so it may not work for that but in theory it should http://www.actinic.hiway.co.uk
Posted: 17th Dec 2002 6:13
Well, I also get the same error with your example Angus. The problem seems to occur when the objects are loaded.

Only that this time I could neither get the program running in Debug Mode.
Posted: 17th Dec 2002 6:26
ok, under Debug Mode I happened to get a message like this when trying to run Angus program: "Runtime Error 1: Broke from nested subroutine. Cannot resume program after CLI usage."
Posted: 17th Dec 2002 15:58
Yeah, Bighead I'm afraid the tutorial is DB1 only, plus if you're just downloading the DB1 compiled .exe you'll need the media files download as well
ie
http://www.actinic.hiway.co.uk/webpro_files/SCTut.zip
AND
http://www.actinic.hiway.co.uk/webpro_files/Sliding.zip

extracting both to the same dir.
Posted: 18th Dec 2002 0:04
Um, it flikers, u didn't turn on sync
just sync on,

u got everythin else
Posted: 18th Dec 2002 6:49
Thanx for the advice Angus. So is using Polygon collision a bad thing?

I am new to this, so any info is appreciated.

tx,
cypher
Posted: 18th Dec 2002 7:41
OK, cypher I'll put my 2p worth in please don't take as gospel though just my own observations really:

As I understand it, most games wouldn't have Poly collision between two complex models, far too slow, rather the models would be approximated in some way (like having a box or simple model applied) to work out the collisions.

The other nasty thing I've found with poly collision in DB is that the functions that determine if a hit or collision has occured (Object hit and Object Collsion) don't return the angle of the Normal of the Poly you hit. In other words you don't get any info on the direction the poly you hit was facing, making it "imposible" to work out any kind of sliding collision response.

BSPs in DBPro are a little different tho as they're made from simple "closed" units, like a box or wedge, the BSP is then compiled into something manageble well before your game loop, allowing for HUGE levels to be constructed. However I believe that the DB collision commands are not working yet so your code will never know if you hit the wall, although an "auto collide" object will simply glide along it regardless of your code knowing anything about it or not. Basically, especially with the bugs reported, you seem to loose a level of control using BSP at present.

If you don't use Pro & BSP and you don't want to use static, non rotated (and bugged - see below) DB collision boxes, what have you got if you want to create something like a winding race track in a 3D package and have fast Collision Detection (ie simple shapes) and a Sliding Collision Response for your track barriers?

Well that's what I was trying to get some way to solving with my little tut. It isn't the best solution to all of this by any means, seems only to work in DB1, doesn't cater for "hills" and does require alot of mucking about in 3D Studio or whatever, rotating and sizing Plains into position to get it to work.

What it does demonstrate tho is how to "manually" insert the simplest of objects that will be hidden in your game to act as the "collision boundries". Also because they're broken into seperate objects (Plains) if a hit is detected the angle of the rotation can be retrieved from the objects parameters (object angle y(n)) to enable us to work out our sliding response.

Having said all that tho, in DB Classic the easiest way to do all this would be to just use non rotated boxes in your 3D model (like a city grid - very UNLIKE your track tho) and then use similar code to pull out each limb and create a Static Box to replicate it, thus enabling you to use DB1's built in Sliding collision response (there's a tutorial on this in the standard DB help files). A word of warning though - rotating the boxes is not allowed as DB will no longer give sliding response data and I believe there's a bug with Static objects and GeForce Cards (as I have) which will crash your proggie.

Finally, I saw DarkGT the other day, posted elswhere on this forum, where he'd got (quite nice) Collision detection on his hand modelled track - it even did hills (lol). Unfortunatly he's not telling anyone how's he's implemented that, saying only that he's hand modelled each polygon. Possibly he's storing some data in a file in a similar manner to my "array to hold the widths of your plains". Again though, even in that example he's not got Sliding Response, it looks more of a "bump and test" routine.

Sorry to ramble on, hope this info helps you a little
Posted: 1st Jan 2003 11:31
I can not make good games...

DBWinner