Jump to content


Photo

Gmnewton 2.0


  • Please log in to reply
371 replies to this topic

#61 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 23 December 2008 - 04:22 PM

@C.Zorg
I suppose one could joints to connect a bunch of objects to make cloth. I don't believe that Newton Game Dynamics has built-in support for cloth though.



@Phantom107 + all
A little bit of progress has been made as needed for my game, but right now I'm really focusing all my efforts on developing my game for the the competition. It's really gonna be a squeeze to get it done in 12 days. Sorry for the delay in progress ;)

-hanson
  • 0

#62 Red Fedora

Red Fedora

    GMC Member

  • New Member
  • 155 posts

Posted 31 December 2008 - 05:25 AM

Thats sweet, dude! Someone can use this to make games like Boom Blox!
  • 0

#63 gandalf20000

gandalf20000

    GMC Member

  • New Member
  • 478 posts

Posted 05 January 2009 - 08:25 PM

So, um, not to rush you or anything, but do you have an estimate on when you might have the next version finished?
  • 0

#64 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 08 January 2009 - 05:17 PM

Sorry! I've been so busy lately. I'm going to start working on it again soon.
-hanson
  • 0

#65 gandalf20000

gandalf20000

    GMC Member

  • New Member
  • 478 posts

Posted 09 January 2009 - 11:26 PM

Wow, because the next version of Newton will support joints, one could, theoretically, get good ragdoll physics.
  • 0

#66 biggoron

biggoron

    dura lex sed lex

  • New Member
  • 652 posts

Posted 10 January 2009 - 02:33 PM

http://www.newtondyn...s.com/news.html

01/08/2005 Newton SDK 1.31 is available for download.
This patch includes:

* Added full support for custom joints. These joints allow the application to have more control over joint functionality than the fixed set provided by the engine.
* A complete library of user defined joints. You can use this library as templates to implement different types of joints.


  • 0

#67 6&chest

6&chest

    GMC Member

  • New Member
  • 183 posts

Posted 06 February 2009 - 08:43 PM

Awesome.Keep up the good work. :(
I want to ask, is there a special function to move a body?Or you just use GM's variables?
  • 0

#68 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 07 February 2009 - 05:01 AM

Thanks! There is a function to move a body. I'm not on my main computer so I can't look, but I think it is GmnBodySetPosition().

And, just so everybody knows, I am still developing this ^_^. I am sorry if the long wait is bugging some of ya', but I only have so much time as of late. Be reassured that I will release another version(or four) this year(and if not, double your money back...)

-hanson
  • 0

#69 Phantom107

Phantom107

    Engineer

  • GMC Member
  • 2593 posts
  • Version:GM:Studio

Posted 07 February 2009 - 04:51 PM

I'm very pleased to hear that you're still developing this! Keep up the good work! ^_^

PS: Be sure to add functions for checking the current forces. I can't make hovertank physics without those.

Phantom107
  • 0

#70 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 09 March 2009 - 03:58 AM

Any ETA for the next version? I could make a U3D script that loads a trimesh via a loop through a locked mesh, but do I really want to?

I also know it says no ETA in the first post, but do I really care what it says in the first post besides the download link? No, not at all, and I'm sure that's a pretty accurate estimate of everybody else.

Well, I'll probably off to either salvage my broken hard drive, make a new bloom effect instead of salvaging my old hard drive, working on a Half Life 2 mod, modeling stuff for the Half Life 2 mod, or just working on the script I said before which would lead to a new example by me.

Yay for awesome.
  • 0

#71 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 10 March 2009 - 01:50 PM

@Phantom107: I've added the functions to check the forces. They'll be in GMNewton 1.0

@Skarik: I'll make up an ETA for you :) How about April 24th. That should give me enough time to finish up with my planned functions. I haven't had much luck sticking to ETA's for my hobby programming because my priorities are in a different order, but I'll try! Sorry to hear about your Hard Drive. I hope you didn't loose too much.

-hanson
  • 0

#72 mrsmes

mrsmes

    GMC Member

  • GMC Member
  • 972 posts
  • Version:Unknown

Posted 11 March 2009 - 01:39 PM

GMN.DLL never heard of it, but not that I am aware of, or I might have misplaced it.
  • 0

#73 gandalf20000

gandalf20000

    GMC Member

  • New Member
  • 478 posts

Posted 14 March 2009 - 07:36 PM

Well, I'll probably off to either salvage my broken hard drive, make a new bloom effect instead of salvaging my old hard drive

Why are people's hard drives always failing? I've never had a problem like that.
  • 0

#74 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 14 March 2009 - 07:42 PM

Well, I'll probably off to either salvage my broken hard drive, make a new bloom effect instead of salvaging my old hard drive

Why are people's hard drives always failing? I've never had a problem like that.

It because you live in Arizona, where nothing can happen to your hard drive. :lol:


I'd like to know how exactly the tree collisions work. I've managed to get a locked mesh and convert it into a tree, but from there, I have no idea on what to do. I'll look at the GM D3D example some more and see if I can find some answers.
  • 0

#75 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 15 March 2009 - 02:20 AM

Once you have the collision tree, you can use it like any other collision object and create a body with the tree for it's collision. The only drawback is that the a body with a tree for collision cannot be dynamic - that is it will always have a mass of 0.

-hanson
  • 0

#76 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 15 March 2009 - 03:22 AM

Once you have the collision tree, you can use it like any other collision object and create a body with the tree for it's collision. The only drawback is that the a body with a tree for collision cannot be dynamic - that is it will always have a mass of 0.

-hanson

Okay, so I'm pretty much doing everything right. Does the third argument of a body matter, or whatever argument of the tree collision? Like, that ID argument at the end. For example, this is my code:
// PhysXMasterAddStaticWorld(u3d_index,x,y,z)
//   Locks a specified u3d_index, takes the coordinates
// and gets a physics mesh from that.

var i, i_max, current_tree_collision;
i_max = GetMeshCount();
for (i = 0; i < i_max; i += 1)
{
	external_call(global.u3d_lock_mesh,0,argument0,i,0,0);
	
	// Create the collision
	current_tree_collision = GmnCreateTreeCollision(physX_master.o_world);
	// Begin the tree
	GmnTreeCollisionBeginBuild(current_tree_collision);
	
	var j, j_max, x1, x2, x3, y1, y2, y3, z1, z2, z3, ct;
	j_max = GetLockedMeshTriangleCount(0);
	for (j = 0; j < j_max; j += 1)
	{
	
		ct = GetLockedMeshTriangle(0,j,0);
		x1 = GetLockedMeshVertex(0,ct,0);
		y1 = GetLockedMeshVertex(0,ct,1);
		z1 = GetLockedMeshVertex(0,ct,2);
		
		ct = GetLockedMeshTriangle(0,j,1);
		x2 = GetLockedMeshVertex(0,ct,0);
		y2 = GetLockedMeshVertex(0,ct,1);
		z2 = GetLockedMeshVertex(0,ct,2);
		
		ct = GetLockedMeshTriangle(0,j,2);
		x3 = GetLockedMeshVertex(0,ct,0);
		y3 = GetLockedMeshVertex(0,ct,1);
		z3 = GetLockedMeshVertex(0,ct,2);
		
		GmnTreeCollisionAddFace(current_tree_collision,
			x1,y1,z1,
			x2,y2,z2,
			x3,y3,z3,
			(i+1)*id
		);
		
	}
	// End the tree
	GmnTreeCollisionEndBuild(current_tree_collision,true);
	// save the tree
	ds_list_add(physX_master.list_static_mesh,current_tree_col
lision);
	// Unlock the mesh
	UnlockMesh(0);
	
	// Create a colliding body
	var new_body;
	new_body = GmnCreateBody(physX_master.o_world,current_tree_collision,id);
	GmnBodySetMass(physX_master.o_world,new_body,0);
	GmnBodySetPosition(physX_master.o_world,new_body,argument1,argume
nt2,argument3);
	ds_list_add(physX_master.list_static_object,new_body);
	
	//GmnReleaseCollision(current_tree_collision);
}

return true;

I usually have up to four meshes in one file, however, I can't really get any to collide. I dunno.

I know I didn't have to post the whole thing, but I don't know about any specifics, so would there be anything else I need to know about collision trees? Everything else works fine.
  • 0

#77 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 15 March 2009 - 01:01 PM

The 'id' in GmnTreeCollisionAddFace is there so one can make different physical responses on different faces on the same model(some parts grass, some frictionless, some bouncy, etc.). I just don't have the functionality to support that yet. I'll need a workaround to the callback it is supposed to use for that. For now it is useless - maybe I should have left it out. Any number will do as well for that.

The 'id' in GmnCreateBody is the object id of the object that represents the body in GM. This is so that it can tell which objects in GM collided.

One more thing. Collision trees don't support backface collisions, so you have to make sure the normals are facing the right direction. Maybe try flipping all the normals and see if it works then.

-hanson
  • 0

#78 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 15 March 2009 - 05:01 PM

The 'id' in GmnTreeCollisionAddFace is there so one can make different physical responses on different faces on the same model(some parts grass, some frictionless, some bouncy, etc.). I just don't have the functionality to support that yet. I'll need a workaround to the callback it is supposed to use for that. For now it is useless - maybe I should have left it out. Any number will do as well for that.

The 'id' in GmnCreateBody is the object id of the object that represents the body in GM. This is so that it can tell which objects in GM collided.

One more thing. Collision trees don't support backface collisions, so you have to make sure the normals are facing the right direction. Maybe try flipping all the normals and see if it works then.

-hanson


Well, actually, I forgot that U3D flips Y and Z coordinates internally. But thank you for the info and suggestions. I still have a few triangles not colliding, so I'll take your advice and see if I can get 'em working.
  • 0

#79 dadio

dadio

    I miss my cupcake

  • GMC Member
  • 1845 posts
  • Version:GM:Studio

Posted 16 March 2009 - 06:41 PM

Just popping in to say -
*fantastic work!*
please continue with this & I really look forward to seeing V.1 (eventually).

I think the great thing about this dll is that it is completely *free* to use for any use in games (including commercial) the licensing is very clear -
I've tinkered around a bit with 0.03 & am sure that the final result of your hard work will be great!

Thanks for contributing so much to the community - I'm sure we'll see a load of good physics games when V.1 gets out.
Goodluck! :(
  • 0

#80 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 19 March 2009 - 11:55 PM

This engine owns. So much faster, and soo funny to watch body parts bounce around like boxes. Heh heh.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users