GMNewton - Newton Game Dynamics for Game Maker

Share with us how are you using the powerrrr of the force

Moderator: Alain

GMNewton - Newton Game Dynamics for Game Maker

Postby samisaham » Sun Sep 06, 2009 8:14 pm

Hello,

I have been creating a wrapper so that Game Maker can interact with this wonderful physics engine :)
It is still in progress, but with the it is to a point that games can be made with it. It uses NGD 2 for the physics now.
If you use Game Maker, please check it out!

You can either download through the Game Maker Forums topic, or directly from host-a.net

Game Maker Forums topic: http://gmc.yoyogames.com/index.php?showtopic=375858
Host-a.net: http://www.host-a.net/u/hanson/GMNewton_2_core.zip

I have created a couple demos that demonstrate GMNewtons capacity so far. They are executables for Windows, so please feel welcome to try them even if you don't use Game Maker.

Waterslide Demo
Image
[yoyogames] [gmc]
GMNewton 1.0 physics demonstration
Please rate this game on yoyogames! I'd greatly appreciate it!
by hanson and Asdam

Domino Simulator 1.0
Image
[yoyogames] [gmc]
Please rate this game on yoyogames! I'd greatly appreciate it!
Design your own domino chains with intuitive designer then watch them fall in a realistic manner
by hanson





Thanks for looking!
-hanson
Last edited by samisaham on Mon Mar 21, 2011 10:23 am, edited 1 time in total.
samisaham
 
Posts: 15
Joined: Mon Mar 24, 2008 11:59 am

Re: GMNewton - Newton Game Dynamics for Game Maker

Postby Julio Jerez » Sun Sep 06, 2009 9:58 pm

Please please go to 2.00 when you have time, please.
Maybe you can get the water slide to have more realistc water sliding down, If you knwo what I mean :roll:
Julio Jerez
Moderator
Moderator
 
Posts: 10916
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: GMNewton - Newton Game Dynamics for Game Maker

Postby hpesoj » Mon Sep 07, 2009 5:39 am

The dominos editor looks nice, but you should set the gravity a lot higher, they topple like they've been set up on the moon.
hpesoj
 
Posts: 90
Joined: Sun Jan 09, 2005 4:36 pm
Location: Cambridge/Bristol, UK

Re: GMNewton - Newton Game Dynamics for Game Maker

Postby Dave Gravel » Mon Sep 07, 2009 1:47 pm

Nice work, use real gravity because if you use so much gravity it can generate strange behav when many dimino piece go over others.
It's important to have real gravity fitting with real domino size.
If you like to speedup the simulation use a gameloop, On this way you can speedup the global simulation without use more gravity or more mass.
You just have to multiply the sliced times for make it coming faster or slower.

Exemple something like
Code: Select all
accumulator += (deltaTime*yourslicetimevalue);

http://gafferongames.com/game-physics/f ... -timestep/

PS: On this way you have more chance to get same speed simulation on other computer's.
If you use higher gravity or mass it is really not the case.
Good luck and nice project.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://www.facebook.com/dave.gravel1
http://orionx3d.googlepages.com/
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 687
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: GMNewton - Newton Game Dynamics for Game Maker

Postby samisaham » Wed Sep 30, 2009 12:45 am

Thanks for the tips! I'm currently in the process of upgrading to Newton 2(lovin' it so far), and will see what I can do to implement the time-slice accumulator method.

Unfortunately I don't know of any way to make the water more realistic... Game Maker is really quite limited in some aspects(especially speed issues and 3d) because it is an interpreted language and I don't think it's optimized as well as it could be. That is one reason I am wrapping this awesome physics engine for it. The only data types Game Maker supports for communication with dlls are doubles and strings. This makes it a pain to directly wrap NGD so I have to make some work-arounds.

Anyhow.... Thanks again for input. It will make this wrapper better and benefit both Newton Game Dynamics and Game Maker.

-hanson
samisaham
 
Posts: 15
Joined: Mon Mar 24, 2008 11:59 am

Re: GMNewton - Newton Game Dynamics for Game Maker

Postby Dr_D » Mon Nov 30, 2009 12:14 am

Dave Gravel wrote:Nice work, use real gravity because if you use so much gravity it can generate strange behav when many dimino piece go over others.
It's important to have real gravity fitting with real domino size.
If you like to speedup the simulation use a gameloop, On this way you can speedup the global simulation without use more gravity or more mass.
You just have to multiply the sliced times for make it coming faster or slower.

Exemple something like
Code: Select all
accumulator += (deltaTime*yourslicetimevalue);

http://gafferongames.com/game-physics/f ... -timestep/

PS: On this way you have more chance to get same speed simulation on other computer's.
If you use higher gravity or mass it is really not the case.
Good luck and nice project.


Hey, I just wanted to thank you for posting that little piece of information. I don't know why I never tried that before, but it works perfectly! I've been using high mass for a long time, instead of actually extending the simulation loop time with a scalar. Very nice. :)

By the way, samisaham... nice project you have there. I'm sure there are a lot of people who will appreciate your efforts. :)
User avatar
Dr_D
 
Posts: 26
Joined: Sun Feb 19, 2006 3:13 am

Re: GMNewton - Newton Game Dynamics for Game Maker

Postby samisaham » Mon Mar 21, 2011 10:24 am

Just an update, this is now using NGD 2. It has been for quite a while, I just forgot to update here :)
samisaham
 
Posts: 15
Joined: Mon Mar 24, 2008 11:59 am

Re: GMNewton - Newton Game Dynamics for Game Maker

Postby Julio Jerez » Mon Mar 21, 2011 10:49 am

are you using 2.32 (it is open source now)
Julio Jerez
Moderator
Moderator
 
Posts: 10916
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: GMNewton - Newton Game Dynamics for Game Maker

Postby samisaham » Mon Mar 21, 2011 10:59 am

I am in the process of moving to 2.32 currently. Although I didn't do much work on the wrapper for a time, I am hoping to make some more progress soon and get it up to date with your latest release.
It's slow work for me, since I don't really know C++ all that well, but I'm learning as I go!
samisaham
 
Posts: 15
Joined: Mon Mar 24, 2008 11:59 am

Re: GMNewton - Newton Game Dynamics for Game Maker

Postby raisins » Fri Oct 02, 2015 6:32 am

Hi, sorry for this necropost but I need help.

So I'm using GameMaker & GMNewton for my physics. I've setup playercontroller. I've changed the compatibility mode to GMOgre to switch newton to support the Y UP orientation (Game Maker uses Z UP).

The problem I have is with the playercontroller constraints. The playercontroller->setvelocity function doesn't work. I assume it's because the axis orientation hasn't changed even though I've called the GMNSetcompatibility option to 2. It's possible the hanson or sam forgot to change the script for playercontroller.

Please sam, fix this error if you can read this.

Thanks.
raisins
 
Posts: 12
Joined: Tue Aug 04, 2015 11:08 am


Return to User Gallery

Who is online

Users browsing this forum: No registered users and 2 guests