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.

Program Announcements / DBP Collision DLL v2.05

Author
Message
heyufool1
10
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 18th Aug 2009 02:49
For some reason if I scale an object before I set it up it doesn't include the scaled object in the setup. So is there anyway to fix this without using SC_AllowObjectScaling ( ). I'm using Dark GDK version.

Use Google first... it's not rocket surgery!
bobbel
10
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 18th Aug 2009 20:26
Scale the object in some kind of editor and then save it that size

heyufool1
10
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 18th Aug 2009 21:29
Quote: "Scale the object in some kind of editor and then save it that size"

Lol true but it's sooo much easier to do with code

Games are like life, they should never stand still.
dark coder
16
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 19th Aug 2009 18:00 Edited at: 19th Aug 2009 18:01
Quote: "For some reason if I scale an object before I set it up it doesn't include the scaled object in the setup. So is there anyway to fix this without using SC_AllowObjectScaling ( ). I'm using Dark GDK version."


Yes, read up(though you still have to call that to allow the scaling, duh).

heyufool1
10
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 19th Aug 2009 19:13
Yea the thing is, is that it's not an instance. So I have to call SC_AllowObjectScaling even if I scale before I set it up (and the object isn't an instance)?

Games are like life, they should never stand still.
jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th Aug 2009 20:29
There used to be a setting to "allow Scaling" I thought for sparky's. The other trick I've used with physics engines is to load model, scale it, create a mesh from it, them replace the "scaled mesh" on top of the original one.

Basically when you scale, the mesh doesn't change, it's constant math that causes sclae to work ORIGNAL * SCALE = RENDER-ME.

Problem is this doesn't translate to sparky I guess for ya.

The other recommendation to make the model the "right scale" outside of the application you are writing, though requiring alot of trial and error often, is probably the best way to go to avoid the whole mess.

Now, I recommend your first "scaling" attempt (outside the application) be of something that once you get correct you can use as a guide for your other models. Like a person (roughly 6ft tall say) would help making a house or shack, or door way etc the right size.

The other trick is to find the numbers that work in your modeling package. I was advised in DB and DarkGDK land that 1 db unit = 1 meter is say a good "scale to build to". Once you have a "starting point" like this and translate that to your modeling program so you know what size things will be in db or darkgdk before you even try them (that is become really familiar with your modeling software and db/darkgdk) this whole business will become easier.

Case and point: The FPS Creator has models that ALL are built to a common scale (from what I've seen) which makes them easily interchangable.

Sorry I've been a stranger people - and sorry to rant so much... just trying to help.

--Jason P Sage

dark coder
16
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 20th Aug 2009 05:45
Quote: "Yea the thing is, is that it's not an instance."


Then great! "You must scale objects to 100%, apply the collision, enable scaling on the object then finally scale it and call update on the object for scaling to work."

heyufool1
10
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 20th Aug 2009 05:55
That's what I'm trying to avoid! I said that in my first post about this. The reason being is that apparently the allow object scaling is slower then if I didn't do that so I want all the speed advantages I can have.

Games are like life, they should never stand still.
dark coder
16
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 20th Aug 2009 06:00
Then read what Jason said, if you want scaling you have to enable it. Otherwise you could scale the object via Vertex Data before sending it to the lib.

heyufool1
10
Years of Service
User Offline
Joined: 14th Feb 2009
Location: My quiet place
Posted: 20th Aug 2009 06:04
Ok, thanks for the help! I didn't quite understand what jason was talking about the first time I read it but 2nd time through it clicked.

Games are like life, they should never stand still.
CuCuMBeR
16
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 20th Aug 2009 16:25
Those instanced object scale problem is probably related with this confirmed bug.

Instanced objects return original object sizes

There is always one more imbecile than you counted on.
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Aug 2009 14:43
Quote: "The reason being is that apparently the allow object scaling is slower then if I didn't"


Ever so slightly, but unless you're doing thousands of ray casts per frame I doubt you'd notice.

Quote: "Those instanced object scale problem is probably related with this confirmed bug"


Yes, that command is used by the DLL.
Libervurto
12
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 24th Aug 2009 20:52 Edited at: 24th Aug 2009 20:53
@Paul
Can this be used with DBC?
Are you the famous sparky?

TGC Forum - converting error messages into sarcasm since 2002.
Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 25th Aug 2009 16:32
Quote: "Can this be used with DBC?"


There is an old version around that works on DBC: http://forum.thegamecreators.com/?m=forum_view&t=31051&b=5 (no sliding collision unfortunately)

Quote: "Are you the famous sparky?"


Yes
KISTech
11
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 25th Aug 2009 18:34
Does this work with GDK.Net?

Paul Johnston
TGC Developer
16
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 1st Sep 2009 17:30
I've updated the GDK version to 2.05c which fixes the small problem of "vc80.pdb" warnings appearing when compiling a project in debug mode. No change in functionality.

Quote: "Does this work with GDK.Net?"


It doesn't, and currently I have no plans to do so.
Freddy 007
14
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 5th Sep 2009 02:17 Edited at: 21st Sep 2009 12:11
[EDIT] Asked in a separate thread.

"If making games is a hobby for you then it's not about the tools you use to make the game, but the games you produce with the tools you have." - Jeku
Cujo Canada
9
Years of Service
User Offline
Joined: 8th Nov 2009
Location:
Posted: 8th Nov 2009 07:07
Hey i'm switching over from Blitz3d and i was looking for a effective collision command for terrains and height maps and i came across this. I'm trying the demo and it is comming up with error "Could not determine parameter type of 'terrain 1' at line 23" this may be because i am using the trial while i wait for my copy in slowly traveling through the mail. All i need is a object to terrain collision system

http://i342.photobucket.com/albums/o430/CaptainEllipsis/Sigs%20and%20Wallpapers/MetroidPrime3wallpaperv3.png
Mage
12
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 11th Nov 2009 01:11 Edited at: 11th Nov 2009 02:09
I setup objects like trees with differently sizes collision boxes than max dimensions of object so the box for example only blocks the tree trunks. (Scale object to desired collision box dimensions, setup collision, scale object back) But after setting up the object and collision, i position the object, update again, and the collision box is all scaled wrong again.

What this means is that if you want a collision box sized to something other than objects max dimensions, its difficult to setup, and even worse if you try to move the object, everything needs to be rescaled.

[b]Suggested Feature[b]
Add a special update command that just updates position and angle, and preserves existing dimensions of bounding box. Plz Thanx.

nhx
9
Years of Service
User Offline
Joined: 15th Apr 2009
Location:
Posted: 12th Nov 2009 18:40
I'm having a problem with this:

Quote: ""You must scale objects to 100%, apply the collision, enable scaling on the object then finally scale it and call update on the object for scaling to work.""


Showing the collision bounds shows that the collision has updated properly, but now sc_objectcollision doesn't acknowledge any collisions whatsoever. Anyone else encounter this?
jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Nov 2009 22:00
There is some code kicking around where you scale your object, make a new mesh from it, then replace your object's mesh with your new one. Presumably the new "copied" mesh is scaled, then replacing the object's mesh with the new scaled one can help with the collision stuff.

I don't know if this approach will help your problem, but its food for thought at the minimum.

--Jason

Chamill
10
Years of Service
User Offline
Joined: 29th Sep 2008
Location:
Posted: 17th Nov 2009 13:30
As some1 said in an earlier post, you have to scale something 100%, create a collision for it, enable scaling for it, scale it to desired value and finally update for enabling the whole scaling system.

My problem is, terrain scaling. If I create a collision for terrain then it has to be after dbBuildTerrain, and changing the terrain scale after that is impossible >_<""!

Any suggestions?

Any help appreciated,
Chamillion

You can only get smarter by playing a smarter opponent.
jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 17th Nov 2009 13:44
Well, when
Quote: "As some1 said in an earlier post, you have to scale something 100%, create a collision for it, enable scaling for it, scale it to desired value and finally update for enabling the whole scaling system."
doesn't work - you need the mesh swap trick.

if you're talking native "terrain", than look at my demo here and see how it's done: http://code.google.com/p/ironinfantrydbpro/

Chamill
10
Years of Service
User Offline
Joined: 29th Sep 2008
Location:
Posted: 17th Nov 2009 14:27
Im afraid im using Dark GDK, so I cant really read what you have written in your code =)

Mind If you type the text in a snippet?

Very appreciated,
Chamillion

You can only get smarter by playing a smarter opponent.
jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 17th Nov 2009 16:15
on a tech call with a client ATM - but have some darkgdk demo code at: http://code.google.com/p/darkgdkoop/

I hope that can help... (was on three different calls with clients while trying to get this url out to you)

Chamill
10
Years of Service
User Offline
Joined: 29th Sep 2008
Location:
Posted: 17th Nov 2009 19:44
Very appreciated mate, thanks.

But as you see the link that comes up shows me about 23 different links there.

What I finally came to ( I believe that is what you mean <.< ) is the JGC library ( Am I right? ).

And as you ( maybe ) know about me, Im lazy . So I just scroll down the whole manual to wherever it says something about terrain, I know I should care more but w/e.

Still appreciating your help, thanks,
Chamillion

You can only get smarter by playing a smarter opponent.
Hotline
10
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 17th Nov 2009 23:19
Nice and extremely fast dll ... But i really miss box or capsule or cylinder collision detection.
Any chance for box collision in future versions ?! With this feature i could finish my game !!!
jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 18th Nov 2009 01:15
Chamillion, there is a "TAB" at the top called "Downloads".

What you get is a quite extensive DarkGDK source code library (for darkgdk prior to the nov08, 2008 "Beta" release... note that beta broke all the mesh manipulation, so if its installed, the terrain will look 100% broken.

There is like 30,000 lines of compilable source, and many demos - all DarkGDK... and Sparky's is in the mix... and there are flags to include sparky or not, ageia/nvidia physics or not, etc.

Perhaps the latest version of sparky's you are referring is a different animal (Hotline wrote about there being no box collision... I thought that was a given)...

Anyway... have fun and good luck with it!
--Jason

Chamill
10
Years of Service
User Offline
Joined: 29th Sep 2008
Location:
Posted: 18th Nov 2009 12:33
Ok, so I believe I should check the JGC library codes and see if anything fits me right?

Thanks mate, and in addition, you mentioned the mesh swap trick. Is that a special way of putting together sum certain functions, or is it a completely different function only found in sum libraries?

Very thanks,
Chamillion

You can only get smarter by playing a smarter opponent.
Vues3d on Kalimee
14
Years of Service
User Offline
Joined: 12th May 2004
Location: NYON (SWITZERLAND)
Posted: 18th Nov 2009 13:32
little question..
is there a maximum amount of object that can be assigned to a group?
Asking this because I used the DLL... and it works quite well except on the fact that not EVERY object included in the group reacts on the collision.
For example I added several plants, rocks, tables and a character it works..
I added a building in the same group and I can walk through it...
I made the same parameters as the other object.. but seems that it doesn't work..
Any idea?



jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 18th Nov 2009 13:44
I'm not the guy who came up with it... and it might only be applicable with the Ageia physics not "working right" ... I'm a little rusty as I've been focusing on my business and simply haven't had to much time for much of anything else... (Game coding is still more a hobby thing for me.. maybe some day...)

It wasn't that tricky though - and the mesh thing was just:
Load Model
Scale Model
Make Mesh from Model as Temp
Delete Mesh from Model
Make the Temp Mesh the Model's new Mesh
Done.

That was the jist of it: a work around for sure...

--Jason

jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 18th Nov 2009 13:48
@Vues3d on Kalimee

Try updating your objects before playing.. might be they are not all updated right ... e.g. sparky doesn't know where you placed them

Chamill
10
Years of Service
User Offline
Joined: 29th Sep 2008
Location:
Posted: 18th Nov 2009 18:52
Last question, have been holding on to you for long now.

How do I make a temporary mesh? ( Especially in Dark GDK. Is it a cloneobject? )

Thanks for all,
Chamillion

You can only get smarter by playing a smarter opponent.
jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th Nov 2009 03:50
I think it's dbMakeMeshFromObject or something REALLY close to that

Hotline
10
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 19th Nov 2009 13:08 Edited at: 19th Nov 2009 13:23
So Sparky is there any chance for sc_boxslide(x1#,y1#,z1#,x2#,y2#,z2#,width#,hight#) or something like that ?
Please i must know because if you won`t add this command (or similar to this) i must find a completely different way for character controlling in my game which means a complete replacement of my current 500 line character_controller.dba source
which was able to handle animated elevators ,moving platforms , and vehicles.
prasoc
10
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 16th Dec 2009 00:11
There seems to be a problem with gluing objects (which have collision) to limbs. They seem to lose their collision :S not sure if it does it in DBP as well but it does it in DGDK. Any ideas why it doesn't work?

zydeoN
9
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 3rd Jan 2010 20:32
Are you moving the objects at high speed ? If so, i am having the same problem... Please go check my problem and see what it is wrong, please (http://forum.thegamecreators.com/?m=forum_view&t=163671&b=22)
jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2010 20:44
High Speed issues are not generally the fault of the collision system. When I was working actively on Iron Infantry (will get back to it but time has permitted me to do so yet) I was as one point making the shells shot from the tank do an arc in the air, gravity etc. I used the math from real tank information to find out how fast these shells needed to travel to give realistic time delays between shooting and hitting something far away etc.

Well, my bullets were traveling VERY fast and they would in one frame be in front of something and the next behind something efectively going through the intended target. I combined two techniques to deal with this...

Technique One: MAKE the BULLET LONG to lessen chance of flying through things. I made my bullets (which you couldn't see anyway) into LONG JAVELINS versus making them the length of the actual shells.. these javelins where long... like a scaled 50 feet or something (Same width/height as real shell of course).

Technique Two: Move the fast mover a couple times per frame and test for collision each move. Basically; in the game everything moves according to timer based code so things are smooth... and the same is true with these bullets EXCEPT I would calculate how far the bullet "travelled" and then would break that up into steps small enough that the long javelin couldn't not go through something... so if I have a 50 foot long invisible bullet, and it travelled 1000feet, I would move it along it's flight path in 20 increments, each time moving it 50 feet per cycle and I'd test collision each time if I recall correctly. Now, this can incur serious overhead when you multiple having multiple tanks all firing at the same etc... but there lies the challenge.

Video game stuff always is a compromise .. fix one issue and then you have something else to fix as a consequence - try to find a workable balance of it all - good luck!
--Jason P Sage

Airslide
14
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 3rd Jan 2010 21:03 Edited at: 3rd Jan 2010 21:05
For bullets, I'd use raycasting. For things like shells, a spherecast might be ideal but I'm not sure how fast it would be.

EDIT: When I mean to use a spherecast for shells, I wouldn't necessarily make the shells hit their target instantly. I'd calculate where I want my shell to be, then perform the cast from the old position to the new position (updating the old position to the new position afterwards). I did it for rifle grenades in an old project and it worked pretty well.

jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2010 21:09
yeah, the same technique can certainly done with raycasting, but raycasting alone won't give you an Arc without some extra code. The issue I think these folks are having is models not colliding because they are moving to fast; I don't know if they are bullets or not... but the skipping about like I recommend MIGHT allow them to get pixel perfect collision at speed. Dunno...

I think they should explore ray casting and whatever tricks they can pull from their sleeves to get through their issue. I know that no software is perfect but Sparky's collision has been pretty stable in my experience. Usually undesirable issues I've encountered were my own.

--Jason

zydeoN
9
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 3rd Jan 2010 21:16
Tried increasing the size of the bullet of no chance.
Quote: "I'd calculate where I want my shell to be, then perform the cast from the old position to the new position (updating the old position to the new position afterwards)."

I guess i will try this one later when i get home, but my problem is that i wanted the bullets to be seen. So the were moving and when they hit the new position (of the collision) they would disappear, but i will think about that...

Quote: "Now, this can incur serious overhead when you multiple having multiple tanks all firing at the same etc... but there lies the challenge."

Why not using group collision ?
Airslide
14
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 3rd Jan 2010 21:18
If you are moving the bullet forward manually and taking a raycast from it's old position to it's new position every frame it should still be visible

jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2010 21:18
If group works - use it - I am just giving ideas and sharing what I've run into. I don't have a finished game so I can't proclaim I've mastered this - just made progress lol

zydeoN
9
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 3rd Jan 2010 23:13 Edited at: 3rd Jan 2010 23:22
Fixed I used sphere cast... First i was doing this:



But if i was pointing to one of the walls of the map, the bullet as soon as it was created, would immediately be deleted, but if i pointed to the sky the bullet moved... So i tried decreasing the distance the bullet would move when it was created (to find the newx, newy...) So if i used 50 for example, the bullet would only appear if i was 50 units or greater distant from the wall... So i changed to this:


Which is kind of weird
zydeoN
9
Years of Service
User Offline
Joined: 25th Sep 2009
Location:
Posted: 13th Jan 2010 18:08
Back with another problem -.-
Im loading a model with different animations... And when the model is playing a specific animation it detects invisible collisions that may correspond to the collisions when the model is in a different animation (different position...) Is there a solution for that ? I didnt want to create a model for each animation...
Rapidrory
9
Years of Service
User Offline
Joined: 21st Aug 2009
Location:
Posted: 13th Jan 2010 22:30
Just downloaded the new collision dll, but every time i try to run a dark basic program with it in, it crashes and says "This application has failed to start because d3dx9_35.dll was not found."(d3dx9_35.dll being a Directx 9.0 dll).
This is probably caused by me just not being very intelligent and installing it badly, but i copied the sc_collision.dll into the plugins-user folder... any thoughts as to what might be causing it?

There is no such thing as "Too Fast!"
Alfa x
12
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 14th Jan 2010 18:22 Edited at: 14th Jan 2010 18:22
Thats supposed to happen even without sparky.

Download the required Dll and put it in the system32 of your machine.
MES
11
Years of Service
User Offline
Joined: 9th Feb 2008
Location: AFK
Posted: 17th Jan 2010 12:03
Hi,

What license is Sparkys Collision using?

Do I have to pay anything, when I want to sell a game and I use Sparkys Collision?

Regards

jason p sage
11
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 17th Jan 2010 17:18
@MES - it's been free as far as I know for years now.

--Jason

Rainbow Evil
8
Years of Service
User Offline
Joined: 31st Mar 2010
Location:
Posted: 31st Mar 2010 22:26
how do you install the GDK Collisions stuff?

good things come to those who rate!

"I hate you all" - Simon Nicholls

Login to post a reply

Server time is: 2019-03-27 02:01:32
Your offset time is: 2019-03-27 02:01:32