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
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 7th Dec 2007 13:26 Edited at: 7th Dec 2007 13:38
Quote: "I don't know if Sparky is still looking at this thread but if he is then I have a feature request:

SC_SaveObjectCollision
SC_LoadObjectCollision

I have a map level that I need complex collision on. To ease things I make a simple version of the map using plains where I need collision, then I use SC_SetupComplexObject to define the collision. I can then delete the map object that I used to make the collision object because I don't need it anymore.
The thing is that whole process takes much longer to perform than loading the level and all the textures."


That is an excellent idea. I'm doing similar things, creating collision bodies then replacing the object with a plain. Loading an object, setting up collision, then deleting the object is very slow.

Also, you mentioned at the convention that you'd sorted out the problem with collision on instanced objects. Is that DLL available? I'd sure love to be able to instance my collision bodies rather than cloning them.

Also, how about a command like this?
SC_CloneCollision(destinationObject, sourceObject)

Then if we were creating multiple copies of something we wouldn't have to reload or re-setup every time, we could just copy the collision data.


Come see the WIP!
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 8th Dec 2007 01:29
Great idea
Ive struggling about this too and found the slower method what you guys posted.. Tough it was still pretty fast


Click For Details!

Mike Inel
21
Years of Service
User Offline
Joined: 14th Feb 2003
Location: Sa upuan ko po...
Posted: 13th Dec 2007 03:42
Until now, this plugin still rocks!
The UV collision feature would be cool though...
=w=

cassius
21
Years of Service
User Offline
Joined: 31st Oct 2003
Location:
Posted: 18th Dec 2007 07:10
I just started setting up the use of this dll in my engine, and I was wondering about something. In some of the posts, it states that some people needed the extra power that this dll provides. So my question is this...Is this suppose to replace the DBpro built-in collision system entirely? Can I still use some aspects of the built in DBPro collision system AND this? Or is the answer really, use this DLL OR DBPro collision, but not both at the same time?

Thoughts anyone?

Cassius
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 18th Dec 2007 23:04
@cassius
You can use them both perfectly well together, the real question is, is there any point??? This dll can do all that DBP can do and much more, much faster

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 19th Dec 2007 16:26
Quote: "Fri Oct 31st 2003"

Oh my. There's no point in using the DBP collision system when using Sparky's, it doesn't do a single thing that Sparky's can't. If there's a feature that seems to be missing from Sparky's, rest assured that it doesn't actually work in DBP.

Question for everyone else - I don't think that Paul checks this thread. Does anyone have his e-mail address? I'd like to e-mail him some feature requests.


Come see the WIP!
cassius
21
Years of Service
User Offline
Joined: 31st Oct 2003
Location:
Posted: 21st Dec 2007 05:36
Thanks for the responses.

@ Cash Curtis II

Yes I have been around awhile, just mostly learning and watching. I wish I had more time to devote to Game Dev, but I get time in when I can.

Thanks everyone.

Cassius
SageTech
19
Years of Service
User Offline
Joined: 3rd Dec 2004
Location: Orlando, Florida
Posted: 5th Jan 2008 08:51
First, may I say, this plugin is awesome, I had been using the character controller on dark physics but i finally kicked that after putting up with the innumerable problems it had.

However, Ive not been to successful getting this dll to do what i need, either. The problem lies in sphere casting. I have a humanoid character, and it is nothing like the shape of a sphere. Ive tried multiple sphere casts to make more of an elliptical shape, however I cant get it to work. I know this has had to have been done by someone, but I cant for the life of me figure it out on my own. Any ideas?


The world is doomed...unless you >>>>>> Click Here <<<<<<
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 5th Jan 2008 15:19
Its been a while since I've done anything collision-wise but IIRC the last time I needed a quick fix on eliptical collision, I made two collision spheres, one ontop of the other, and placed them at my character's position constantly. If either collision sphere detected a collision, I would get the slide xyz positions returned from both of them. Once the collision check was over, I'd compare the differences in the user's current position with the newly projected sliding positions from each sphere. Whichever sphere's difference was better, the user would be repositioned with that sphere's axis coordinate.

I dont think I explained that too well but this pseudo code might help:



Not sure if that makes sense or not. It's basically combining collision info from two spheres. There is another way to do it but its not as accurate. You can take the average position of the two collision spheres (if there is a collision, otherwise dont bother) and position the user at that.

C0wbox
18
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 19th Feb 2008 00:51 Edited at: 19th Feb 2008 00:56
I have no idea if this has ever come up before but due to the fact I'm having some troubles with the DLL in my projects, is there any kind of fix for the fact that sliding sphere collision doesn't work if:
The X position of the collision sphere is bigger than 2000 at the same time as the Z position of the collision sphere is bigger than 2000?

(This applies for negatives too of course.)

Its just that this annoying fact has killed my WIP:
http://forum.thegamecreators.com/?m=forum_view&t=119297&b=8
And I can't carry on until this is resolved.

But all the fans of the WIP want me to carry on. What can I do? (Preferabley I'd like Paul/Sparky to see if he can help, seeming as he made the DLL but if anyone else knows of a fix, please tell me.)



Mazuru
16
Years of Service
User Offline
Joined: 28th Feb 2008
Location:
Posted: 3rd Mar 2008 03:44
I am having the same problem as C0wbox. Would be nice to know if theres a possible fix for it.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 13th Mar 2008 02:32
Sorry for the lack of replies in this thread, I'll try and keep a closer eye on it.

I've released version 2.04 of the dll (check the first post for the download link), if you use SC_SetupComplexObject or sliding collision consider this a beta as those two things have had some big changes.

There was a bug in the sliding collision code for values over 2000, annoying floating point stuff where 2000+0.0001 = 2000 (floats can only hold about 7 significant figures) but this should now handle all ranges correctly.

SC_SetupComplexObject (only) has been changed to read vertex data instead of going through meshes/memblocks this should make it much faster but may produce different results on some models (e.g. boned, animated)

Let me know if you have any problems, I'll try to fix any bugs but new features/commands probably won't make it.
Ian T
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 16th Mar 2008 05:57
Sounded great, but...

---------------------------
Error
---------------------------
Could not find function '?setMaxCollisions@@YAXH@Z' in 12:SC_Collision.dll

and...

---------------------------
Error
---------------------------
Could not find function '?intersectObject@@YAKHMMMMMMH@Z' in 47:SC_Collision.dll

Everything I had that worked with the last one doesn't seem to function/compile with this.

6.6 / DBP.
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 16th Mar 2008 17:28
I've downloaded the link in my post and double checked both of those commands, both seem to function.

Can you check there are no older versions of the SC_Collision.dll laying around in the project or plugins-user folder? The newest should be dated 13/03/2008 and is 192kb in size.
Ian T
22
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 16th Mar 2008 23:31
Sorry man, my bad; seems I made some stupid mistake earlier.

However, I am certain that the new version's complex objects seem to have some accuracy issues compared to the old one. I'll get some specifics and a test for you in a bit, in case you're interested in tweaking it. I'm throwing some pretty large objects at it, so it could just be getting overloaded.
andycb
16
Years of Service
User Offline
Joined: 12th Jan 2008
Location:
Posted: 20th Mar 2008 21:25
i have recently downloaded V2.04 and i haven't used any of the previous versions. I was trying to set up the terrain collision with
but i don't understand what the freeObject is meant to be.

I would appreciate any help any one can give me with this.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 21st Mar 2008 09:41
Hi Paul,
Since you seem to be revamping this plugin again, may I remind you of a feature request that I would dearly love to see?

SC_SaveObjectCollision
SC_LoadObjectCollision


Setting up complex collision can be a very slow process. If the collision data could be saved and then reloaded when the level is loaded, the end user would never have to see the delay.

Is that something you could do?

Thanks



dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 21st Mar 2008 11:19
And hopefully you won't forget about us GDK users?

Paul08
16
Years of Service
User Offline
Joined: 20th Feb 2008
Location: Oxford, UK
Posted: 23rd Mar 2008 00:12
Paul / Sparky can i draw your attention to this bug im having:
http://forum.thegamecreators.com/?m=forum_view&t=126441&b=7

I haven't yet found a solution for this?

Any help is much appreciated.

Paul
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 24th Mar 2008 01:59 Edited at: 24th Mar 2008 02:02
@Ian T - If you find any problems post an example and I'll see if I can track down the bug.

@andycb - the free object is just somewhere for the dll to store object details whilst it builds collision data. The number you provide should be an object that is not currently in use, and will be deleted when the command is finished

@Scraggle - The complex object command should now be much faster than before. The save/load would require a few changes so I'm reluctant, maybe if I ever work on expanding the plugin.

@dark coder - GDK version attached and linked in first post

@Paul08 - I've replied in your thread

Attachments

Login to view attachments
tobi453
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location:
Posted: 26th Mar 2008 00:51
Hi Paul,

my game crashes when I call SC_SetupObject() on an instanced object. Of course I could programm a workaround, but it would be really awesome if you could fix that.



FINAL VERSION RELEASED!!!!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 27th Mar 2008 03:32
Bug report for GDK version:


Ok... when the Object is created, you'll notice the object bounds are offset almost halfway up the model. (her feet sink through the floor) This is a model that comes with DarkGDK vs2008 FRee Version.

------------------
Also - not related to you necessarily - in fact - I'm pretty sure NOT - but you should know about it. Intermittantly - though once the issue is found its repeatable... if you take an object and strafe via this hack (Let's assume position and angle are 0,0,0 and 0,0,0 respectively):



The ask DarkGDK or DBPro immediately AFTERWARDS what the Y ANGLE is - its WRONG - yet the model is in the right position on screen! (Usually would report back 90 as if you didn't perform the second dbTurn... command.


The Fix? Usually turning on another axis fixes it. In this example -
SHOULD fix it up just fine meaning a subsequent read:

would report correctly.

This effects everyone - and I witnessed it tonight effecting the object bounds as well. did the same test above without the rotate and fix object, and the strafe code made the object bounds flip totoally to the left of the model or to the right depending which way I strafed and I WAS calling SC_Update AFTER moving the model and before the sync command.

Thank You for your time.

Best Regards,
Jason P Sage

Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 29th Mar 2008 20:16
Quote: "my game crashes when I call SC_SetupObject() on an instanced object."


It seems that MAKE MESH FROM OBJECT doesn't work on instanced objects, put that in the bug forum and see what Lee says, if it should even work at all.

Quote: "when the Object is created, you'll notice the object bounds are offset almost halfway up the model."


This was a problem with boned models, does it still occur with the latest version (2.04)?

Quote: "immediately AFTERWARDS what the Y ANGLE is - its WRONG - yet the model is in the right position on screen"


This sounds like the old "Euler angles are wrong" question that keeps coming up, I'll try and explain it.

With Euler angles the Y angle only makes sense if compared to both the X and Z angles. For example if you start with an object looking straight forward with angles (0,0,0) turn it 180 on the X axis so it's looking straight backwards with angles (180,0,0), then turn it 180 degrees on the Y axis so that it is now upside down facing forwards again it has the angles (180,180,0)

However you can put the object in the same position by just rotating it 180 degrees on the Z axis so it is looking forward upside down with angles (0,0,180)

Which one of these is the 'wrong' set of angles for the object's position? Neither because there are multiple ways to get an object into a certain position each reached with a different set of turns.

Anyway this isn't the thread for a discussion of angles. If there is a thread where you want to continue the discussion, please point me to it.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 29th Mar 2008 21:29
Quote: "Quote: "when the Object is created, you'll notice the object bounds are offset almost halfway up the model."

This was a problem with boned models, does it still occur with the latest version (2.04)?"


Well, it happens with that Mita model and I don't know if she's boned or not (hehe) but its version 2.03 Direct GDK version I'm running. I'll upgrade and post if the issue remains.

dale2507
16
Years of Service
User Offline
Joined: 1st Apr 2008
Location: My own little world...
Posted: 1st Apr 2008 20:21
Hey,

I've just downloaded the dll and the example. I've also found a pool game that someone made using the dll. I have installed all of the files as stated by the readme however when i run my game an error says that sc_start must be called first but when i call sc_start, it doesn't turn blue and it isn't recognised as code when i run the game. This is also the case for the pool game and in the example the terrain functions don't work.

Help please!

Thanks
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Apr 2008 18:36
Quote: "when i run my game an error says that sc_start must be called first but when i call sc_start, it doesn't turn blue and it isn't recognised as code when i run the game."


SC_Start is only required for the GDK version, the DBPro version should automatically call the required function when it loads the dll.

Make sure the dll is in the "plugins-user" folder (not the project folder) and that you are using the latest version of DBPro
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 17th Apr 2008 01:29 Edited at: 17th Apr 2008 01:32
For those of you getting the "Could not find function'?intersectObjectOld@@YAKHMMMMMM@Z' in 6:SC_Collision.dll" error with the latest plugin see this post for a fix.

Paul Johnston:
The sc_intersectobject command is using the wrong exported function name in the string table. It should be ?SC_IntersectObject@@YAKHMMMMMM@Z instead of ?intersectObjectOld@@YAKHMMMMMM@Z.

http://forum.thegamecreators.com/?m=forum_view&t=127946&b=18&p=0

http://3dfolio.com
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 27th Apr 2008 04:45
Quote: "The sc_intersectobject command is using the wrong exported function name in the string table."


Thanks, I've uploaded v2.04b with this fix, see my first post.
RedFlames
17
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 16th May 2008 19:12 Edited at: 16th May 2008 19:13
First of all, this dll is awesome ()

But i got a question and dont really know where to ask, so i'll just ask it here:
How would i check the group-number of an object? there's no function for that, is there? How would i do that ( maybe within DBP ?)...

Juggalo Memnoch
16
Years of Service
User Offline
Joined: 22nd Apr 2008
Location:
Posted: 5th Jun 2008 16:59
Yeah I just downloaded 2.04b and I have a problem.
When I use the command SC_SetupComplexObject my game wont start it loads but once the game trys to start it just crashes.
Just to let you know, You might want to look in to that

Other than that it works perfect. Keep up the good work.
Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 14th Jun 2008 15:29 Edited at: 14th Jun 2008 20:55
Juggalo,
Did you include a memblock command in your project?

Paul,
The command SC_SetupComplexObject does not properly apply collision information. I can see this by applying SC_DrawObjectBounds.

So far I have found that it only works on the floor, it's the same with .x or .dbo object files.
I am using raycasting to figure out if the player is able to jump (if he stands on the ground). It returns a value of 0 (no object intersected) if I stand on a stair or a second floor, etc.

It could be me coding it wrong, but I am using the same method that I've always used .


Edit:
I use DBPro U69 now, and not U66.

Edit:
This is odd. I tried re-installing DBPro and then install U66b (which was the last update I used this plugin in) and it still doesn't work. Nor does the old code I used last.


Edit3:
Problem solved.

I had to setup the collision object BEFORE I scaled it. Then use the command SC_UpdateObject. I don't know why this was required all of a sudden. Maybe I haven't used this version of the dll yet.

I allways afraided from a clowns. aww..
Tv Xxx
17
Years of Service
User Offline
Joined: 23rd Sep 2007
Location: Behind You!
Posted: 15th Jun 2008 02:11 Edited at: 15th Jun 2008 02:15
Hi,

I am Having Trouble With Raycasting Using Sparky's Dll (2.04 I Think The Version Is), The Problem Is That Even When The Camera Isn't Facing The Complex Object, It Still Thinks There Is A Collision.

Here Is How I've Set Everything Up....

The Object



The Camera



The Shooting Procedure





Notice Top Left Corner, Any Ideas?

Cheers Tv.

Lukas W
21
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 15th Jun 2008 17:32
Tv Xxx,
My post above yours covers this problem.
I can understand if you did not get it as I had described it rather different than you.

But the problem is this:
In v2.04 of the dll, if you are scaling a complexObject you need to do follow this procedure:

Load Object
SC_SetupComplexObject
SC_AllowObjectScaling
Scale Object
SC_UpdateObject

I allways afraided from a clowns. aww..
cyangamer
16
Years of Service
User Offline
Joined: 2nd Jun 2008
Location: Houston, TX, USA
Posted: 9th Jul 2008 02:35 Edited at: 10th Jul 2008 09:29
This is a great plugin, but there's one thing I must know:

how do you make an elliptical collision? Everyone talks about it, but I see no code for it, and I'm too much of a newb to just go by text alone. There's RUCCUS's psuedo code, but I'm using his Commented Example and they don't go together.

I'm stuck.

a total noob.
Currently working on - getting Sparky's collision DLL to work!
Carl CLD
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Watch your back!
Posted: 11th Jul 2008 00:53
@cyangamer

I'm not sure, but think that if you use multiple collision
spheres, it shoud work. Just try to find the right combination:

-1 sphere on the feets of the character
-1 sphere on the feets of the character and one on his head
-Several spheres from the feets to the head

In hope that I helped.
(But that would not surprise me if it don't )

Ne pas mélanger périphérique et féerique, car l'informatique n'est pas du tout un conte de fées...
dc740
16
Years of Service
User Offline
Joined: 11th Jul 2008
Location:
Posted: 13th Jul 2008 05:05
Great DLL... I'm currently testing it on GDK with Visual C++ 2008 and it works great. The only bad thin is that the GDK Terrain example doesn't run because it doesn't have the level.x and 1.jpg files included. They are included in the dbp version.


Anyway. It's great!!! it's a MUST HAVE. Simple, easy...



using the terrain demo from this post and combining it to use the terrain found on the Tutorials folder (in the GDK installation dir) there is some strange problem, it gets stuck when you try to walk over a flat surface (the only one on the map, just look around)
Encrypto Studios
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: Virginia
Posted: 22nd Jul 2008 02:06
for some reason all of the demos except for the simple demo does not work, it loads then exits,no error messages. i am using the latest version of DBpro.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jul 2008 16:31 Edited at: 25th Jul 2008 16:33
Question... I use this plugin in all of my games, which leads me to wonder...
Is this incredible plugin royalty free? Could one use it in a commercial game? Sorry if that has been asked already...

Thanks,
-Sixty Squares

cyangamer
16
Years of Service
User Offline
Joined: 2nd Jun 2008
Location: Houston, TX, USA
Posted: 26th Jul 2008 03:25 Edited at: 26th Jul 2008 22:49
Hi. I have another problem:

For my non-player models (NPCs) I'm using box collision. Despite that, my player (who uses ellipse collision) can either:

A) Climb over (or almost climb over) the NPCs with low slope (0.9)

or

B) The screen shakes really violently on collision, which dizzifies me. This is when the slope is raised (to 1.0)

Help?

Also, do I need to do this:

for EVERY model I want to collide? Right now my enemies aren't colliding and since they're controlled by AI, their movement coding is going to be longer than even that.

Please respond soon, thanks.

a total noob.
Currently working on - Enemy AI and Battle Algorithms
DB PROgrammer
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location: Nowhere But Everywhere
Posted: 9th Aug 2008 07:31 Edited at: 9th Aug 2008 07:32
I am also having a problem with this dll.



This code crashes for me. I am using DBPro 6.9 with version 2.04b of this dll. I think the bug may have been caused when this bug was fixed.

http://forum.thegamecreators.com/?m=forum_view&t=120212&b=15

I'm probably wrong about that but I thought i'd mention it. Please fix this


I'm Pro grammer.
Uncle Sam
19
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 19th Aug 2008 06:21
Could it be possible to make it work for instanced objects in the future?

Choinkees
16
Years of Service
User Offline
Joined: 24th Jul 2008
Location: my chair
Posted: 20th Aug 2008 05:49
Hi Paul/Sparky,
Just wanted to write a quick message to say thank you for creating such an awesome plugin

I have only had a chance to play with DBPro (trial) for 2 nights so far, but your plugin has pretty much convinced me that I can create the third-person action games I want in DBPro.

My experience was something like:
Night 1: make simple program of a test guy and a walk animation on a plain blue background. Try use the DarkPhysics demo character controller to make him walk on a basic surface... have heaps of trouble and get frustrated.

Night 2: download your DLL and look at your advanced sliding collision demo. Within an hour I had a third-person view of my test guy walking the basic environment. I then loaded in a more complex environment map I ripped from a Dark Physics demo (just replaced the map object being loaded), and my test guy instantly walked around that map perfectly without any modification needed! (camera still goes through walls but I'm not testing for collisions on that yet)

I'm really impressed at how easy it is so far, and your example programs were really helpful! Are you still working on this project (any way to donate or motivate you with it?) or are you now working on other things?

games and stuff that I've made: www.rickyvuckovic.com
cyangamer
16
Years of Service
User Offline
Joined: 2nd Jun 2008
Location: Houston, TX, USA
Posted: 15th Sep 2008 02:33 Edited at: 15th Sep 2008 02:34
Hi, it me again.

Do the global variables:

global vx# as double float
global vy# as double float
global vz# as double float

global gravity# as double float : gravity# = -0.1
global slope# as double float : slope# = 0.5
global ground as integer : ground = 1
global jumptimer as integer : jumptimer = 0

have to be made for every moving entity? Cause I plan on having hundreds of moving entities, and they're all very different from one another.

By "moving" I mean AI. These models will have AI coded into them that is identical to the movement commands of the player model.

Currently working on - Enemy AI and Action Battle System
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 16th Sep 2008 18:16
just make a function.

if you have a for - to loop for all your characters, it'll be like:

for char=1 to 60
entity_gravity(char,vx#,vy#,vz,gravity#,slop#,ground,jumptimer)
**you will obviously need to replace the variables with the actual X,y,Z positions etc**
next char

then you have your function itself:


function entity_gravity(entitynumber,vx#,vy#,vz,gravity#,slop#,ground,jumptimer)
**here you do the collision code**
endfunction


Check out the tutorial on functions (search the newcomers DBpro forum).

cyangamer
16
Years of Service
User Offline
Joined: 2nd Jun 2008
Location: Houston, TX, USA
Posted: 18th Sep 2008 06:38 Edited at: 18th Sep 2008 06:46
2 things:

1) What about the variables concerning which model is affected? Adding that argument still leads to quite a few those function calls. Not to mention the for loop would be pointless.

here's my function call:

entity_gravity(char,0,0,-0.2,0.5,1,SessetaMDL)

function:

entity_gravity(entitynumber,vx#,vz#,gravity#,slope#,ground,model)

I took vy# and jumptimer out because they caused problems for reasons I can't figure out.

Currently working on - Enemy AI and Action Battle System
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 19th Sep 2008 19:13
Uncle Sam, I don't think that he will be able to implement collision for instanced objects. You can however do it yourself by:
1) Create/Load an object
2) setup collision for the object
3) delete the object
4) re-create the object by instancing a master object
white boy kyle
17
Years of Service
User Offline
Joined: 5th Feb 2007
Location:
Posted: 3rd Oct 2008 02:39
Alright i dono why i am getting errors but i have Microsoft Visual C++ 2008 Express Edition. I copied all the files in the proper places. But when i do


I get an error saying
"Error During Collision Check Object(1)"
Any Help?
cyangamer
16
Years of Service
User Offline
Joined: 2nd Jun 2008
Location: Houston, TX, USA
Posted: 13th Oct 2008 02:51 Edited at: 13th Oct 2008 02:52
What do you do when your object has AI and has multiple movements (ie, run, walk, roam randomly). Do I have to encase all the functions inside a collision function, or can I just put the collision commands in a function of their own and leave out the movement commands?

Currently working on - Enemy AI and Action Battle System

the sig limit needs to be raised...
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Oct 2008 15:36
Well the important thing IMHO is to SAVE Where you ARE - Move the object, then check for collision. The reason you "Save where you are first is so you can place the object back as though it didn't move .. this gives a smooth "ran into wall, can't go anyfurther" sorta visual.

So, I'd personally make a function call they all use to "Save where they are" - do the whatever kind of "move" run, jump, whatever, then call another "funtion" that handles the "reaction" to whatever collisions - and you have that "saved position" handy in case you just want to prevent walking through a wall, rock or whatever.

--Jason

zeeenza
18
Years of Service
User Offline
Joined: 2nd Jul 2006
Location:
Posted: 20th Oct 2008 03:22 Edited at: 20th Oct 2008 03:24
Are there still old versions of the DarkGDK version of the DLL available? Versions 2.03 and 2.04 won't work with the sliding demo. If you want to read about my problem, here's the link:

http://forum.thegamecreators.com/?m=forum_view&t=137757&b=22

I used to have a version that worked (I think it was 2.02) and loved it, but I deleted it when I got the new version, unaware that I would have issues with it. I have given up trying to get the new version to work, and I just want one that works. So if anyone knows where I could download an older version (ideally 2.02), please let me know.

Other than this problem, the DLL is great. I don't know what I would do without it. Keep up the good work.

Thanks

Windows Vista Home Premium (32-bit) :: Intel Core 2 Duo - 2.2Ghz :: 2GB DDR2 SDRAM :: nVidia GeForce 8600M GS - 256 MB

Login to post a reply

Server time is: 2024-11-23 08:16:59
Your offset time is: 2024-11-23 08:16:59