Jump to content


Photo

Gmnewton 2.0


  • Please log in to reply
371 replies to this topic

#121 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 07 August 2009 - 06:01 PM

Any ETA of the an update with CCD?
  • 0

#122 orange451

orange451

    GMC Member

  • GMC Member
  • 984 posts
  • Version:GM8

Posted 07 August 2009 - 11:33 PM

yah, I'd like to fix my 3rd person shooter game I've ben working on. an update would be nice :medieval:
  • 0

#123 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 15 August 2009 - 01:51 AM

Super nice.
  • 0

#124 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 18 August 2009 - 02:03 PM

Ah - finally back from camps for the summer! Now I can get a little work done in newton :P While making a major change in the dll I introduced a bug resulting in nothing moving when it is supposed to fall(That'll teach me to make more backups). It's not frozen - I can still look around with the camera. Once I get this figured out I will add CCD. I have no clue why this is happening so I can't estimate how long it will take to fix. It's a ghost bug 'cause I didn't change anything that should affect that...

-hanson

Update: Making progress! Expect an update including CCD, Convex hulls, and one other surprise this month.

Edited by hanson, 19 August 2009 - 02:15 AM.

  • 0

#125 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 20 August 2009 - 05:17 PM

and one other surprise this month.

I hope it's source code or portals xP

Edited by Skarik, 20 August 2009 - 05:17 PM.

  • 0

#126 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 29 August 2009 - 05:06 PM

Version 1.0 is released!

Download: v1.0

Key new features:
Complete re-write with fixed bugs and added features
Continuous Collision Detection
Auto-updating bodies
Hinge Joints
Simple Fully Commented Example

Released in conjunction with two demos:

Waterslide Demo
Posted Image
[yoyogames] [gmc]
Youtube Video
GMNewton 1.0 physics demonstration
by hanson and Asdam

Domino Simulator 1.0
Posted Image
[yoyogames] [gmc]
Youtube Video
Design your own domino chains with intuitive designer then watch them fall in a realistic manner
by hanson

Enjoy!
-hanson

Edited by hanson, 29 August 2009 - 05:09 PM.

  • 0

#127 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 29 August 2009 - 06:12 PM

Cool. I'll definitely try this out tomorrow. Finally might be able to have the guts flying around at higher velocities and allow for some better grenades.

I'm guessing you had to rewrite because of something with those weird callbacks, eh?

Edited by Skarik, 29 August 2009 - 06:15 PM.

  • 0

#128 dadio

dadio

    I miss my cupcake

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

Posted 30 August 2009 - 03:53 PM

Very cool.

Will play around with this alot for sure.
Real nice demos! :GM060:
Great work!
  • 0

#129 dadio

dadio

    I miss my cupcake

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

Posted 30 August 2009 - 10:15 PM

This has such potential... serious potential.
It's nice & fast... & free.

Question:
How to use this best for a purely 2D game? (lock that z)

Suggestion:
.gmks with scripts covering every function available/examples/documentation...
but definitely at least first .gmk with all the functions, don't make people dig around elsewhere for info.

Very best of luck.

(More examples/docs will probably make this the no.1 physics solution for GM).
  • 0

#130 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 05 September 2009 - 12:49 PM

I rewrote mostly because my other code was a big mess - a bowl of code soup. It does make it easier to do callbacks now!

I'll look into the z-locking. I don't think it's too hard.

.gmks with scripts covering every function available/examples/documentation

do you mean that I should make more examples so that together they cover usage of the whole range of functions? That's a good idea!

thanks,
-hanson
  • 0

#131 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 05 September 2009 - 05:36 PM

So, I finally got time to look at this, and first thing I'd like to ask : how the f?ck did you manage to use Newton's callback updating like that? I mean, that's plain awesome, even if my game can't use it. You make me sad now at how I totally based my physics code on my GMBullet to U3D code.

I mean, I'm probably not even reading this right, but what I see is removing the need to use the same code over and over again, just like one of the C++ projects I'm working on. Just like the real Newton.

Anyhow, there's continuous collision detection, which makes me very happy. I'm off to convert my Stickman project so I can finally have the grenade launcher and the gore working properly.

Edited by Skarik, 05 September 2009 - 05:36 PM.

  • 0

#132 gandalf20000

gandalf20000

    GMC Member

  • New Member
  • 478 posts

Posted 06 September 2009 - 02:29 AM

Ooh, a new Newton release! I hope it's easier to use...
  • 0

#133 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 06 September 2009 - 10:40 PM

Thanks for the replies!

@Skarik: I implemented the callbacks in C++, and in the callback I use theGmaker C/c++ lib to automatically update the positions.
Just a note - more accurately sizing might help prevent intersecting bodies. Where one unit is one meter unless you scale your forces, so scale your world accordingly :P

@gandalf20000: I hope it's easier to use too! Auto-updating bodies should help a tad.

-hanson
  • 0

#134 Skarik

Skarik

    GMC member

  • GMC Member
  • 1067 posts

Posted 07 September 2009 - 01:42 AM

Just a note - more accurately sizing might help prevent intersecting bodies. Where one unit is one meter unless you scale your forces, so scale your world accordingly

Well, that also explains it. 30 units is one meter over here. Damn! I guess I shouldn't be applying 500000 Newtons to a grenade that's 3 heavy just to get it to move at a slow speed, huh?

Edited by Skarik, 07 September 2009 - 01:42 AM.

  • 0

#135 Hepolite

Hepolite

    GMC Member

  • GMC Member
  • 130 posts
  • Version:Unknown

Posted 07 September 2009 - 07:10 PM

Awesome!

Well, I did run into a problem. I tried to change the d3d to U3D, which was successful, but there's some weird issues with the collision. The blocks bounces around for no apparent reason and I don't know why...

I have some files here, if you want to take a look at this:
http://fileshost.com...hp?id=2EC488BD1

All I did was to remove the d3d stuff, and changed the scripts a bit so they would work better with U3D.

Also, do you have any source-code for the waterslide demo that you can share? I'd love to have a look at it's code.
  • 0

#136 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 07 September 2009 - 08:47 PM

The problem I see here is that GMNewton and d3d apply rotations in the order X*Y*Z, while U3D applies them in the order X*Z*Y.

Skarik created an example that demonstrates how to get GMNewton and U3D working together. You can download the gm6 here. Basically what he does is to transform the matrix to the u3d standard before applying it to the 3d object. In the future I hope to add an option to GMNewton to set weather to return d3d or U3D style rotations. This would simplify using this with U3D a lot :)

Concerning the release of source for the waterslide demo, I will consider that. I would like to talk to my friend who helped make it and see what he thinks.

-hanson
  • 0

#137 RamboFox

RamboFox

    Tainted Fortune

  • New Member
  • 992 posts

Posted 08 September 2009 - 01:08 AM

JOINTS! SLIDING JOINTS! HINGES! *orgasms*

This dll is turning out to be pretty slick, fast and efficient - I'm definitely going to use this for my 3D projects (when I get around to learning it ;P)

*thumbsup*

Just one thing, why aren't there any springs just to make life easier? Oh well, I guess I'll have to find the distance manually between two objects and then give it a "springy force feedback".
I'll experiment with making a simple box car :)
  • 0

#138 dadio

dadio

    I miss my cupcake

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

Posted 08 September 2009 - 11:56 AM

It's really great stuff, have to say!

By the way did I mention that it would be fantastic if you could put some kind of "z locking" in...

& also consider "locking the z" ...

& "keeping that z locked".

Yep (very subtle) :)
Keep it up!
  • 0

#139 Hepolite

Hepolite

    GMC Member

  • GMC Member
  • 130 posts
  • Version:Unknown

Posted 08 September 2009 - 01:59 PM

The problem I see here is that GMNewton and d3d apply rotations in the order X*Y*Z, while U3D applies them in the order X*Z*Y.

Bah, how could I forget! Well, that fixed this issue, so now it's working perfectly, thanks :)
  • 0

#140 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 09 September 2009 - 03:09 AM

@dadio: By "locking the z" do you mean locking position only(still can rotate in 3d, but only move in 2d), or position and rotation(Like... A 2d physics engine?)?

@RamboFox: Thanks! I'd love to see anything you make with this :) I'll consider built-in springs for a future release!

@Hepolite: I'm glad you got it working!

If you have any more questions, please ask! I'm always(where "always"=="usually") happy to help!

Edit:
If you support GMNewton, please consider copying the following into your sig:
[url=\\\"http://gmc.yoyogames.com/index.php?showtopic=375858&st=0\\\"][img]http://i561.photobucket.com/albums/ss54/samisaham/gmnewton.jpg[/img][/url]
Makes: [url="http://\\\"http://gmc.yoyogames.com/index.php?showtopic=375858&st=0\\\""]Posted Image[/url]


God bless,
-hanson

Edited by hanson, 09 September 2009 - 12:28 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users