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.

Author
Message
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 25th May 2012 18:08
You now know more about joints than I do.

For the Z and Y motion I suppose the 'normal' must be defined somewhere, it must me setting this to something automatically but not sure what to.

I have added commands to set the normals and the axis for both actors of a joint independently, although it seems to recommend using the convenience functions 'set global axis' etc which don't allow you to define a normal, so I too am a little confused there.

I am looking at the PhysX docs that come with the SDK.

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 29th May 2012 13:58 Edited at: 29th May 2012 14:01
Hi Matty. I'm implementing projectiles at the moment. What I want to do is create a pool of bullets (say 100), get them all ready as physics spheres, then exclude them from the simulation until they're needed.

Will the sleep commands you've added be suitable for this, or does that just stop actors moving until something else interacts with them? If I have 100 spheres excluded visually but still being processed by physx, it could be a significant overhead. Is there an "exclude actor from simulation" style command which would cause it to be totally ignored?

I may still implement bullets with ray casting, but in any case I'll need a pool of physics entities for things with more volume, like grenades, which need to be included and then excluded rapidly.

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 29th May 2012 15:04 Edited at: 29th May 2012 15:05
Yes, I use the sleep commands along with a new command that allows you to disable collision, this is taken from the bone ragdoll code and takes an object out of the simulation:



Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 29th May 2012 17:12 Edited at: 29th May 2012 17:12
Most splendid. I think I will go for ray casting on the bullet for now. It makes more sense I think, since bullets are long and thin (like rays!) and there will be lots of them, so performance is important. I'll try out that technique for the grenades and other projectiles though, once the patch it out.

Nice one.

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 30th May 2012 15:28 Edited at: 30th May 2012 15:31
Hi Matty. A question about the new force updates ...

Quote: "Add more commands to apply forces to limbs/bones. "


Will there be a command such as dynAddForceAtPos()? When a bullet hits a crate for example, I will want to add the force in the direction of the bullet (how it orientated to the world axis) but and at a global point (returned by collision data) on the crate.

I am experimenting now, but I believe ...
dynAddForce() will simply apply force to centre of the objects mass, which isn't suitable.
dynAddLocalForce() as above, but using the object's own axis for orientation, which I'm guessing it more appropriate for forces generated by the object itself (e.g. thrusters on the back of a ship)
dynAddLocalForceAtLocalPos() is almost there, as it'd allow me to specify where the bullet collides with the crate as the position the force is applied (after some funky conversion to it's own global axis), but the force would then need to be described using the object's axis, rather than the bullet's trajectory, which is along the global axis.

To me it feels like there is a missing command dynAddForceAtPos() for this scenario.

It may be possible for me the used EZRotate to calculate how a global axis force for a bullet translates to the local axis of an object, but it feels like this would be a common usage and dyn would benefit from having that sort of command.

As a side and a heads up dynAddLocalForceAtLocalPos () has these copy/paste types in the help file:
posX - Force to be applied along the x axis.
posY - Force to be applied along the y axis.
posZ - Force to be applied along the z axis.

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 30th May 2012 16:24 Edited at: 30th May 2012 16:26
Hi Matty,

In addition to the force related query above, I have a suggestion which you can of course feel free to ignore completely! Please add a comment to the dynRaycastClosest functions to advise the user to call dynRaycastHitGetData() afterwards. Because they return a boolean, I ended up doing an "if (dynRaycastClosest .... )" style call, then spent ages faffing about trying to figure out why the object being returned was nothing to do with what had just been hit.

Turns out I was just getting the object from the previous raycast call, because I hadn't asked for the next lot of hit data. Totally my own mistake, but intuitively (probably based on things like Dark Physics and Sparky's DLL), I felt that once a true had been returned, the other functions should return data for the last ray cast.

I don't think you should change it. It's a good system, but it may help others avoid pestering you with bug reports (as I almost did!
) if there's a reminder in the raycast function docs, as well as your other reminder, to keep on top of hit data using the getdata command.

Another thought is a dynRaycastClearHitData() command could be useful, in case a user has got all the data they want and want to stop iterating.

Just suggestions and definitely not necessities though!

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 30th May 2012 18:41 Edited at: 30th May 2012 18:42
I just checked and there are a few commands which should be added, I will put them in for the update, here is what is should have but some are missing. I will also add a command to change force to impulse and back again.

Thanks for pointing this out, I put the basic ones in for testing but forgot to return to add the rest.



I will do what you suggest for the raycast commands, I will put in an option to clear the data and perhaps an option to cap the amount of raycast data it collects?

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 30th May 2012 19:58
Sounds great. Yeah, flexibility to add force in different ways will make life a lot easier!

So far with the raycasts, I have only used the 'closest' commands. If I had have been using the others, I probably would've been used to using the getdata() command as it'd make sense, but I've not needed to iterate through multiple collisions yet.

Not sure if I can suggest the best course of action. I was more coming from the perspective that I might've cleared the collision data at the end of every loop, for example, to ensure there was no data left to trip me up. But that might not be best coding practice because it might hide the fact I'm not processing data I should be processing. So really, not sure Matty! Perhaps it's best to leave it as it is for now and see if anyone else chimes in the future with a suggestion.

At the moment it works and it makes sense, and that's the main thing!

T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 6th Jun 2012 19:37
hi, is there a way to put all the dll's in a separate folder? like a custom map or something. because i have everything sorted in 1 media map, and all the dll's outside the media map looks like a mess
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 7th Jun 2012 12:28
I still have not figured out a way to have the dll's located anywhere other than the same directory as the executable. If anyone knows how to do this then let me know and I will do whatever is needed.

In the past I have created an executable just for the purpose of running the main executable, this is a workaround. If you finally create an installer for your game then it's not as much of an issue.

But I agree with you, it is messy during development.

Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 9th Jun 2012 06:01
Hi Matty, How's that v1.2 coming along ? Just curious and no rush from me...... .... .

ExoDev.Com - A Game Development Tools Website! Featuring: XBOX360 CONTROLLER LIBRARY
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 9th Jun 2012 23:40
Hi Todd, I have added tons of commands, should only be a few days away now I think.

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 12th Jun 2012 17:44
I will send the update to TGC on Monday(18th June), hopefully they can get it out the same day. Sorry for the long delay, it's a pretty big update.

Most things from the list are in or will be in by this weekend.

Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 13th Jun 2012 02:46
Thanks for the update on the update, Matty. Sounds like it's gonna be full of fun!

ExoDev.Com - A Game Development Tools Website! Featuring: XBOX360 CONTROLLER LIBRARY
basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 14th Jun 2012 06:45
until now I couldn't see the reason of leaving Dphysics for dynamics.

I wish someone categorize the difference.

one other question, how to pack Dark dynamics game to work at intel app store.

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 14th Jun 2012 13:14
Good news Matty. Looking forward to it!

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 14th Jun 2012 14:26 Edited at: 14th Jun 2012 17:43
Btw Matty, did I see somewhere you were adding sphere and capsule CCD shapes? I've just added CCD to my grenades, and as you can imagine, spheres with box shaped CCDs don't bounce quite as you'd expect.

Edit: Scratch that Matty. I read through your CCD example in the post on this board and saw you mentioned putting the cube inside the object. Did that and my grenade rolls properly.

_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 15th Jun 2012 22:08
Hey Matty,

you're really doing great with this! Looks like your the Newton (or even Einstein?!) of TGC game physics!
I'm not considering using a third-party physics solution at the moment, but yours is definitly on top of the list.

Great job!

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 16th Jun 2012 00:05
Hey Pauli, good to hear from you, sorry I have not been in touch recently.

I'm thinking about making a racing game pretty soon with GDK or Irrlicht, I have part of the track creator working, still lots to do if I can find the time. What you up to?

_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 16th Jun 2012 01:08 Edited at: 16th Jun 2012 01:10
Great to hear you're still with the racing game idea! I guess doing the physics for it will be easy for you!

You can always contact me if you need support with something, but I'm quite busy myself. I'm working hard on a football game. Unfortunatly I couldn't get anything out to the public in time for the current tournament because I want to achieve a high level of quality and it's a lot more work then expected... (preparations for a W.I.P. thread are being made though)

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 16th Jun 2012 18:45
Thanks Pauli, look forward to your WIP, hopefully I can get a WIP up soon too.

L3mmy
15
Years of Service
User Offline
Joined: 19th Jun 2009
Location: England, Sheffield
Posted: 17th Jun 2012 20:42
Hey Matty, Gonna purchase this soon to help me get going on my game, What are the limits with the vehicles?..As i'd like to get an advanced vehicle setup eventually, E.g Realistic Suspention and roll, Sliding etc..

It's mainly the suspension factor that I want to get spot on..
GTA Styled: http://www.youtube.com/watch?v=WOu45-qFVgs

Tom

www.monsterwareltd.co.uk <--Visit today

Software, Games, Themes, Hosting, Wallpapers and more to come!
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 18th Jun 2012 01:29
Just working on a more advanced vehicle example right now, its took a little longer than I thought so update will be sent to TGC on Tuesday now, sorry anyone who is waiting.

Suspension is not too hard, you set the size(length) and then you can set spring, stiffness etc.

Slide and roll are possible, in fact I spend most of my time trying to set it up not to roll Slide is also possible but a little harder to get a good balance.

For a serious car game you would need to be able to adjust all the variables in real time to get the handling you want, changing a few variables then compile and running works to a point but you would eventually need to really fine tune everything so a small program to do this would probably be needed.

L3mmy
15
Years of Service
User Offline
Joined: 19th Jun 2009
Location: England, Sheffield
Posted: 18th Jun 2012 15:29
Well my plan is to read all variables for each vehicle from a .cfg file, which will contain everything, since I'm quite familiar with this since gta uses the same setup And I know enough there.. Anyway, will await that update for a couple of examples

www.monsterwareltd.co.uk <--Visit today

Software, Games, Themes, Hosting, Wallpapers and more to come!
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 19th Jun 2012 00:10
take your time Matty, better a good update than one with bugs =)
Inflictive
15
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 19th Jun 2012 05:07 Edited at: 19th Jun 2012 10:47
It seems like joints between static and dynamic objects don't work...? Joints between dynamic and kinematic do, but please look into joints between static and dynamic.

edit: Also, there does not seem to be a way to set the limits for linear motion on joints. You can set limits for rotation, but for linear movement the commands are strangley missing.

"This plan is so perfect... it's retarded."
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 19th Jun 2012 17:39
You can't create a joint between a static and a dynamic actor, what you do is join the dynamic actor to the world by passing in 0 for the other actor. It is the same effect since static actors do not move.

Not sure about the linear limits, I will look into it.

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 19th Jun 2012 18:46
The update was sent to TGC late last night so it will be released when they have done their thing

I will be staring a new thread soon for v1.2.

@Inflictive Studios - I have had a quick look and it seems you are probably right about the linear limits. It's too late for this update but it will go straight on the list for v1.2. Hopefully you can continue your project without it for now, if it gets to a point you can't continue with your project because of this issue then let me know and I will try to sort something out.

Inflictive
15
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 19th Jun 2012 23:56 Edited at: 20th Jun 2012 02:24
Along with linear limits(for distance joints, for example) you should add linear motors, for pistons and things

"This plan is so perfect... it's retarded."
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 20th Jun 2012 00:51
Quote: "Along with linear limits you should add linear motors, for pistons and things"


They are in, I have updated the first post of this thread with all the new commands listed.

T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 26th Jun 2012 19:49
waited 7 days, when is TGC releasing the update?

i really want to experiment with it
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 26th Jun 2012 20:10
I will email them tomorrow and make sure they have not forgotten

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 26th Jun 2012 20:56
Looking forward to it mate. Stage 1 = get crusher working, stage 2 = rag dolls!

Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 26th Jun 2012 21:38 Edited at: 26th Jun 2012 21:40
Quote: "Stage 1 = get crusher working, stage 2 = rag dolls!"


Weehee, deadly combo mate!

Am planning to buy dynamix as soon as the v1.1 hits the shelves. Matty, do you mind sharing the updated docs?


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Kezzla
16
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 27th Jun 2012 11:12
sits on edge of chair...

Sometimes I like to use words out of contents
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 27th Jun 2012 18:06
I have attached the updated help file.

TGC will do their best to release the update on Friday.

Attachments

Login to view attachments
Olby
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 27th Jun 2012 19:19
Thanks a lot!


Intel Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP2, PureBasic 4.61 + DarkGDK 2.0
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 29th Jun 2012 15:24
v1.1 should now be available to download, let me know if you have any problems, thanks.

Kezzla
16
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 29th Jun 2012 15:49
sweeeeet!!!!!

Sometimes I like to use words out of contents
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 29th Jun 2012 19:10 Edited at: 29th Jun 2012 19:16
nvm. used the wrong email address -.-

works great now!

time to add physics to my game
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 29th Jun 2012 19:38
Cheers for the update Matty. After some persuasion, I am using the new libs. I don't get it though! Sometimes I delete all trace of the old ones, clean my project and blatt everything manually, and still seem to be using the old libs.

I can confirm two things: my character controller can now collide with other groups, thanks to your new parameter in controller move, and my annoying pop ups seem to have vanished. Woohoo!

Also the crusher walls are now moving, but not as expected. Some more work needed to get them moving right, but it's close.

Inflictive
15
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 2nd Jul 2012 03:09
How does dynamic vs dynamic ccd work? I don't see a command to enable it, is it just turned on when you turn on ccd?

"The GOVERNMENT wants you to listen to COUNTRY MUSIC, y'all, COUNTRY MUSIC!!!" (gta:sa)
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Jul 2012 16:16
Quote: "How does dynamic vs dynamic ccd work? I don't see a command to enable it, is it just turned on when you turn on ccd?"


Yes, the default is that it is on.

Inflictive
15
Years of Service
User Offline
Joined: 16th Jun 2009
Location: Altis
Posted: 6th Jul 2012 08:39
What is the default ccd motion threshold? Is it calculated based on the size of the shape? I'm trying to decide if it is necessary to set the threshold manually, as none of the examples set the motion threshold.

"The GOVERNMENT wants you to listen to COUNTRY MUSIC, y'all, COUNTRY MUSIC!!!" (gta:sa)
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 6th Jul 2012 16:31
I just looked into this, I'm not sure what the default is but the motion threshold is the amount that an actor needs to move in one time-step before CCD is tested for.

So you should be sure the motion threshold is set to a value smaller(or the same) than the objects diameter plus the thickness of your walls.

I would only change it if it is not working for any reason, I will add the command to get the threshold in the next update.

Login to post a reply

Server time is: 2024-11-24 12:46:07
Your offset time is: 2024-11-24 12:46:07