Jump to content


Photo

Gmnewton 2.0


  • Please log in to reply
371 replies to this topic

#81 redrover

redrover

    GMC Member

  • New Member
  • 38 posts

Posted 21 March 2009 - 06:18 PM

I can definetly see myself using this. It's the only 3d physics engine that I know of that works with d3d. You have all of my encouragement too keep developing GM Newton.
  • 0

#82 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 21 March 2009 - 08:41 PM

So, are we ever going to get a gravity function? That's really all I need, and I don't want to spam the DLL with force calls. That, or a function that makes things go faster. That would be awesome.

Edit: 'Things' as in the simulation.

Edited by Skarik, 21 March 2009 - 08:41 PM.

  • 0

#83 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 04 April 2009 - 01:40 PM

Thanks, and sorry everyone! I was out of town when the last replies were made and for that reason didn't respond. I've made a few improvements on the 0.03 version and can update it with better gravity control if you'd like. That'll be quicker than waiting for the next release I think.

-hanson
  • 0

#84 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 08 April 2009 - 03:03 AM

So, is there any ETA on the next version? Or do I have to pester you again? <_<

Edited by Skarik, 08 April 2009 - 03:03 AM.

  • 0

#85 RithiX

RithiX

    GMC Member

  • New Member
  • 65 posts

Posted 08 April 2009 - 03:06 AM

Yeah I wan't an update :- (
  • 0

#86 RamboFox

RamboFox

    Tainted Fortune

  • New Member
  • 992 posts

Posted 08 April 2009 - 03:43 AM

Same here, I would love to see some springs, joints (rotating ones too!) and sliding joints with constraints to be added.

Once those functions have been included, I'll quit nagging ;D
  • 0

#87 Sin99

Sin99

    GMC Member

  • New Member
  • 121 posts

Posted 09 April 2009 - 11:54 PM

How would i put this in a game? , i don't under stand alot of the code , i would like to make something with this but i might need an example that has just the basic collision between the camera object and the map model like an fps.
  • 0

#88 RamboFox

RamboFox

    Tainted Fortune

  • New Member
  • 992 posts

Posted 10 April 2009 - 01:54 AM

How would i put this in a game? , i don't under stand alot of the code , i would like to make something with this but i might need an example that has just the basic collision between the camera object and the map model like an fps.

This could be used to create a basic 3D-FPS with accurate physics.

If you don't know how to use this - chances are that you probably don't need to use this.

Edited by RamboFox, 20 April 2009 - 03:12 AM.

  • 0

#89 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 10 April 2009 - 03:51 AM

Pestering is great in moderation :D

Joints will be coming(breakable of course). I just have to think up the most efficient way to handle them. Currently I'm working on collision responses and that's coming along nicely. I did just recently realize that I had made some adjustments to the community released version and have not posted it yet. That should be coming along after I add two things to it. Completed. Look down vv or in original post ^^

@Sin99: There is actually no good way to do camera collisions yet, but I will wrap the raycasting code eventually. As RamboFox said, it is somewhat complex. Is there any specific point you're having trouble with?

@Everybody: There is a beta release out for the next version of NGD that is supposed to be pretty stable. I might switch over to that version. Any thoughts?

Edit: Here is a small update that lets you do a little more: http://host-a.net/ha...Newton_0.04.zip
You can now(in addition to all previous features):
  • SetGravity
  • GetGravity
  • BodySetAngularDamping
  • BodySetLinearDamping
This is not all I have done, however. The rewrite is going good and I have had a little more time to work on it the last few days. The basic material system is done, and the collision response system is nearing completion. Then will come model loading, some more joint types(3?), and hopefully a couple easy-to-understand demos. If anyone requested something I said I'd do, please do remind me. I sometimes forget things and I've been clearing out my PMs because I'm running out of space. I should get a little more organized and keep a to-do list and figure out my versioning system so it's not confusing. I'm also looking into auto-balancing(up joint) and vehicle support. Anyhow, enjoy!

God bless,
-hanson

Edited by hanson, 11 April 2009 - 04:07 AM.

  • 0

#90 qwertyuiop23

qwertyuiop23

    GMC Member

  • New Member
  • 940 posts

Posted 02 May 2009 - 10:16 PM

Is it possible to write a function that returns what the z height of the player should be if it was colliding with the model without the player actually colliding with it?

EDIT:: Haha I think it maybe real simple to do it with this. Just use the collision line function in the direction of gravity to return that z point (I assume there is such function in this dll?)? Of course that depends on whether or not speed becomes an issue. I know there is a similar collision line function in ModModCollisions so I will write a program that checks the speeds between the two DLLs and see which is faster.

Edited by qwertyuiop23, 02 May 2009 - 10:18 PM.

  • 0

#91 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 02 May 2009 - 11:54 PM

Yeah, this engine pretty much rocks and seems to be faster than Bullet (at least on my computers). I haven't had any crashes using this engine which is a VERY good thing. Hopefully I can get a demo of my game out soon which shows my new use of physics.
  • 0

#92 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 03 May 2009 - 03:14 AM

NGD does support something similar to what you ask. It supports ray tracing, and also convex casting(I think that's what it's called) which is like a ray tracing but instead of a ray it projects the object. Unfortunately this wrapper does not support either of those yet. What are you trying to achieve?

Skarik - I look forward to seeing your game!

On a sad note, I haven't got much done in the past month on this or any of my personal projects :) My school takes precedence over my hobbies, and my summer is jam-packed with busy-ness. I will be a counselor at a camp this summer, and that does not leave a lot of free-time because I'll be busy working with kids from the time I get up to the time I go to bed. This does not mean that I am halting development though. I really want and plan keep this going. Not that that all matters to you :P, I just wanted to keep everyone updated on the development (or lack thereof).

-hanson
  • 0

#93 qwertyuiop23

qwertyuiop23

    GMC Member

  • New Member
  • 940 posts

Posted 03 May 2009 - 06:13 AM

A character walking over a terrain, not possible with the way that the DLL is set up at the moment i think?
  • 0

#94 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 03 May 2009 - 02:06 PM

A character walking over a terrain, not possible with the way that the DLL is set up at the moment i think?


Ah. You are correct. I hope to have a solution for this next release.
  • 0

#95 qwertyuiop23

qwertyuiop23

    GMC Member

  • New Member
  • 940 posts

Posted 04 May 2009 - 08:21 AM

Thanks
  • 0

#96 orange451

orange451

    GMC Member

  • GMC Member
  • 984 posts
  • Version:GM8

Posted 05 May 2009 - 03:21 AM

hey hanson, Its been awhile since ive seen this, Great Work on it now. Its alot better then before.
  • 0

#97 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 06 May 2009 - 04:02 AM

Ooh, thanks to the function of being able to set the gravity, I now have my racing game going upside down with still having physics. Yeah, this stuff rocks, and it's fast too.
  • 0

#98 slayer 64

slayer 64

    GMC Member

  • GMC Member
  • 3278 posts
  • Version:GM8.1

Posted 07 May 2009 - 10:30 PM

excellent! its great that we can set the gravity now. that was annoying me the most before. good job. i'm glad your still working on this. :D
  • 0

#99 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 10 May 2009 - 06:36 PM

Thanks!
Just a quick update, I got collision callback interface working with the next version(unreleased as of now). Would've been a lot quicker if I knew C++ better, but I'm thankful for the experience I am gaining :D I have made a list of features I plan to complete before the next release. Here they are along with status:

[100%] Collision event interface (manual)
[100%] Linking/un-linking bodied and objects
[ 80% ] Character joint
[100%] add/set forces
[100%] add/set torque
[100%] Definable gravity force and direction
[ 0% ] Rigid joints
[ 0% ] Dry rolling friction joint

And the three that are left should be fairly easy to implement once I get back from my trip.

-hanson

edit: Progress updated! 5/10/09 10:26 PM

Edited by hanson, 11 May 2009 - 03:29 AM.

  • 0

#100 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 12 May 2009 - 04:28 AM

Nice.

A thing that I would find useful would be a keep-upright force or constraint where the syntax is about:
GmnBodyAddUprightForce( world, body, xup, yup, zup, damping );
GmnBodyAddUprightTorque( world, body, xup, yup, zup, damping );
The reason for this is that I'm finding more and more the need for such a function when dealing with non-standard gravity...and it's a pain to figure out. Friction is also a bit hard to implement, and it would probably be faster to just have a function defining regular or angular friction.

I don't know if this is relevant, but in the current version of Bullet, my scripts fail when calling GmnCollisionEventGetContactPoint() in any way shape or form. Well, when calling in the same spot as the other three collision scripts. What could be the cause of this? I know that this same thing happens with U3D when calling invalid code.

This is basically my code. I narrowed it down to the function I pointed out above.
var i, i_max, i_i_collision, i_i_collision2;
var x_pos, y_pos, z_pos, i_i_i_inst;
i_max = GmnCollisionEventCount();

for (i = 0; i < i_max; i += 1)
{
	i_i_collision = GmnCollisionEventGet(i,0);
	i_i_collision2 = GmnCollisionEventGet(i,1);
	
	if (i_i_collision <= 0)||(i_i_collision2 <= 0)
	{
		continue;
	}
	
	if (i > 4)
	{
		break;
	}
	
	if ((i_i_collision == id))
	{
		var i_i, i_i_max;
		i_i_max = GmnCollisionEventGetContactCount(i);
		for (i_i = 0; i_i < i_i_max; i_i += 1)
		{
			if (i_i > 3)
			{
				break;
			}
			x_pos = GmnCollisionEventGetContactPoint(i,i_i,0);
			y_pos = GmnCollisionEventGetContactPoint(i,i_i,1);
			z_pos = GmnCollisionEventGetContactPoint(i,i_i,2);
			
			my_sparks.x = x_pos;
			my_sparks.y = y_pos;
			my_sparks.z = z_pos;
	
			with (my_sparks)
			{
				SetParticleCount(3,5,150);
				ParticleSystemStep();
				SetParticleCount(0,0,150);
			}
		}
	}
}

But hey, cool! And keep on working!

Edit: One more thing. Sometimes when colliding into things at high speeds (it's an attempt at a trippy racing game), my Newton body goes flying off. Same thing when colliding with certain complex trimeshes. It may have to do with my using of the GmnBodyGetOmega() to do angular friction, but I doubt it. Is there anything that comes up off the top of your head?

Edited by Skarik, 12 May 2009 - 04:29 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users