Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Vanilla Collision Testing

Author
Message
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th Aug 2007 21:13 Edited at: 27th Aug 2007 21:32
Karsten,

I won't be surprised if this stuff is my fault but I am testing VC and have noticed a couple things.

attached a run-ready zip file, but Ill try to explain....

1) My dynamic object wont wrap itself around the static track object, even though according to ShowObjectBounds(objNum,1)<--boxOnly shows the wireframe for the collision bounds says it should. (Picture an upside-down U over a monorail). The car object decends with gravity ok, but when it gets to the track it stops above the track, not wrapped around it. It moves forward, then obviously falls off the world because it wont follow the path of the track

2) Not an issue yet but will be, the 90 degree curves in the track show collision bounding that is not following the path but forms a box the overall size of the object itself.

you can see what I mean if you run the exe in the zip

here is the main source:


thanks

EDIT: forgot to mention the camera is controlled by the mouse so when the exe starts move the mouse down to see the test scene (the red object will already be falling and moving forward). You can zoom in by using the LMB, zoom out with RMB.

My DBP plugins page is now hosted [href]here[/href]

Attachments

Login to view attachments
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th Aug 2007 21:33 Edited at: 27th Aug 2007 21:34
Screen shot to help clarify

-grey floor and track all one object 1
-red car sep object 2

(altho its hard to tell in that pic, the red object is above the track, not wrapped around)



My DBP plugins page is now hosted [href]here[/href]

Attachments

Login to view attachments
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th Aug 2007 23:20
I was able to use a db_ cube and got it to fall inside the boundary of the yellow track, and collide with thetrack as if it were a wall. I realized the first arg in the collision line was to high (1.0). I changed it to 0.1 and altho there is jitter the cube behaved as expected. Then I moved my red object to the same place as the cube and remmed out the cube. The red object falls down with gravity to what should be an unobstructed center of the scene but again, it doesnt go inside the bounds of the track plane, it always rests on top. Its not behaving like the cube did.

confused.

My DBP plugins page is now hosted [href]here[/href]
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 28th Aug 2007 01:03
I think I found out the problem, it appears the object center didnt remain with the object when it was moved off of 0,0,0 in the XSI editor.

so I guess ignore this thread for now - I have to retest

btw the cube, when inside the yellow box did follow the curve in the corner regardless of what the collision box looks like so I guess its working so far.

My DBP plugins page is now hosted [href]here[/href]
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 28th Aug 2007 18:33 Edited at: 28th Aug 2007 18:37
Also, I realized I was working with a modelling scale that is too small for the collision tests, those rails and cubes are 1 dbp unit, which probably explains why my car object would not wrap around the track.

I like the step up feature of this dll, that was kinda cool

If this dll could incorporate a few more features I think it can be a good solution for dgdk.net
-internally handle and eliminate the jitters
-auto rotate dynamic collision objects based collided faces (in all axis)
-handle more than one static object for collision (ie Groups or Ranges. Like if the static world is made up of a group of objects)
-multiple dynamic objects (although I suspect it already does by adding another code call for a diff dynamic obj number)

just some ideas

Anyway, cheers to Karsten for his work on this

My DBP plugins page is now hosted [href]here[/href]
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 28th Aug 2007 23:14
Maybe a stupid ?. But what is 1 ddp unit?

Niels Henriksen
Working on a (MMO)RPG right now in LightEngine
http://noggs.netopcom.dk/forum/default.asp - Forum for the game
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 28th Aug 2007 23:47 Edited at: 28th Aug 2007 23:48
well, regardless of what 1 dbp unit is in relation to the real world (inches, feet, cm, etc) if I make a 1x1x1 cube in xsi 6, and make a 1x1x1 cube in dgdk (makecube) they are the same size. I am fairly certain dbp/dgdk uses DX units, which iirc are 1 unit = 1 foot, but I dont know for sure.

My comment in my previous post was because I noticed that the cube was sliding and coliding with what appeared to be a large empty gap between the objects instead of appearing to touch. I realized the smaller the object scale the larger the gap will appear visually. My cube is 1x1x1 but the collision is about 1/5th of that
(1.0 vs 0.2). Now if I scale up to say a 10x10x10 cube, but keep the collision arg at .2 things appear to touch when sliding/colliding. was just a visual issue really.

My DBP plugins page is now hosted [href]here[/href]
Karsten
17
Years of Service
User Offline
Joined: 24th Jan 2007
Location: N/A
Posted: 2nd Sep 2007 19:03
Hello,

Soz I'm, in spain at the mo on holiday ill pm u about it whenb i get back.

Karsten,

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 2nd Sep 2007 20:46
ah, I didnt realize you were away
enjoy

My DBP plugins page is now hosted [href]here[/href]
Karsten
17
Years of Service
User Offline
Joined: 24th Jan 2007
Location: N/A
Posted: 5th Sep 2007 03:33 Edited at: 5th Sep 2007 03:53
*Realized these forums dont have PMs :p

Cheers,

OK, back to good old Britain

Looking at your suggestions above, the auto rotate feature would be very useful for your monorail project. Unfortunately because our main project is based on motorbikes... when u crash into a wall the bike should crunch rather than rotate with the wall lol :p

I guess it would only work with box/cube collision and the code will be a lot like backwards and forwards. If u really need it I am sure I can bodge it together soon.

To handle more than one object rather than calling the function multiple times... perhaps setting up an array will be the best because we plan to do this with the rider/ wheels/main motorbike etc... not unlike ur monorail model made up of 3 objects.
So I will get working on this more as the motorbike game progresses and I'll always post the latest one.

Next step is to automatically create an invisible entity to do the collision detection and update the player object to that position if successful. This will probably be a sub such as MakeCollisionEntity(<shape size>,<shape > )

and then reserving an integer for this shape... Then simply change the current clsVanillaCollision.cs code where it references the player model, change that to the invisible entity model and then at the very end.. if collision == false... move player model to entity location...

At the mo I am very busy on the next step in our project. That is netcode... I could not get the inbuilt dgdk netcode working so I plan to release the one I made for the motorbike game as a class/dll

(based on sockets)

I'll call it Vanilla Netcode :p

Karsten,

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Sep 2007 03:59
Thanks for your reply. You might want to hold off on working on VC and possibly your motorbike project's collision aspects since it is in the works to get Sparky's Collision ported into dgdk.net asap. Apex is in touch with Paul J. on the issue. I would feel bad if I asked you to work on VC to then turn around and say I was going with Sparky's. I am not sure if you are familiar with Sparky's but its a long-proven, feature-rich, fast, collision solution for DBP and DGDK. I have used it with DBP back in the day and it would be my first choice as a solution. I just wanted to make you aware of this so you can decide what you are going to do going foward. I guess as developers we can never complain about having too many choices, so I am not going to say don't keep developing vc, but at this point it might benefit all of us to take a "wait and see" approach.

hopefully you see this as good news
cheers

My DBP plugins page is now hosted [href]here[/href]
Karsten
17
Years of Service
User Offline
Joined: 24th Jan 2007
Location: N/A
Posted: 5th Sep 2007 04:07
Look at it this way... If I can get Sparky's .NET to work... I also will probs use that haha

Do u know if the inbuilt dgdk netcode is possible to get working or is it broken? I dont see how I am going to make Vanilla Netcode into a simple class or DLL because it uses threading.

regards,

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th Sep 2007 17:15
ive never touched the built in netcode, so i dont know. I coded my own tcp/ip server app and client dll called ez_serv.

My DBP plugins page is now hosted [href]here[/href]
Karsten
17
Years of Service
User Offline
Joined: 24th Jan 2007
Location: N/A
Posted: 5th Sep 2007 19:33
Ah ok cool.. I will probs have a look at that!

Login to post a reply

Server time is: 2024-10-09 00:22:54
Your offset time is: 2024-10-09 00:22:54