Jump to content


Photo

Gmode Physics V0.50b - Gm 6/7/8 Support


  • Please log in to reply
80 replies to this topic

#41 them4n!ac

them4n!ac

    GMC Member

  • New Member
  • 1170 posts

Posted 25 September 2008 - 02:37 PM

3. 0.038849 (sin float) + 0.038351 (cos float) = 0.0772
0.055449 (tan float)
so, 0.055449 / 0.0772 = 0.71825 = 28% faster.
Similar result I told in previous post. :)


1. you forgot float division, that's a heavy cpu instruction too
2. GM uses doubles and converts them to floats for Direct3D, that is one of the reasons GM is slow.
3. you said:

It speeds up around 25% instead of using tan

quite different.
But at least you know how it is really, and that's good :)

btw, Box2D is easy to learn.
//somewhere
b2World* world;
//creation
world = new b2World( worldAABB, gravity, true );
//step
world.Step( timeDelta, iteration_count );

Edited by them4n!ac, 25 September 2008 - 02:37 PM.

  • 0

#42 Billyro

Billyro

    GMC Member

  • New Member
  • 57 posts

Posted 15 October 2008 - 06:54 AM

This is very good! :(
But I guess it would be very difficult to make a fighting game with this... :P
But fun to play with!

Edited by Billyro, 15 October 2008 - 06:54 AM.

  • 0

#43 GearGOD

GearGOD

    Deus Verus

  • GMC Member
  • 2153 posts

Posted 15 October 2008 - 07:47 AM

GM uses doubles and converts them to floats for Direct3D, that is one of the reasons GM is slow

No it isn't. The cast is negligible.
  • 0

#44 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 16 October 2008 - 05:46 PM

To use a double as a float in Delphi, I think you just need to round it.

I agree that someone should make a Dox2D DLL but it would be extraordinarily hard, Box2D would need to be rewritten or coded so well that it would work.

Box2D uses OOP and is static, it may be impossible to just wrap the functions unless you add more. The types prevent a lot too, you'd need to use an array and return index numbers. It gets hard.

It's easier to use Allegro (Graphics) with Box2D in C++.
  • 0

#45 them4n!ac

them4n!ac

    GMC Member

  • New Member
  • 1170 posts

Posted 18 October 2008 - 10:57 AM

No it isn't. The cast is negligible.

oh, I said wrong. I just looked at the test results with my barely opened eyes.. :)
I looked at one book now and did some tests, that's right, they are very fast.

Edited by them4n!ac, 18 October 2008 - 11:01 AM.

  • 0

#46 coolsmile

coolsmile

    Programmer

  • New Member
  • 1346 posts

Posted 20 October 2008 - 10:05 PM

It just takes up a whole bunch of memory >_<
This is pretty interesting, I think it would be fun to create a dll from Box2D
  • 0

#47 them4n!ac

them4n!ac

    GMC Member

  • New Member
  • 1170 posts

Posted 24 October 2008 - 11:29 AM

Ok ok, but let's not spam the topic. If someone tries to make something with Box2D, he will make another topic.
  • 0

#48 heyufool1

heyufool1

    Fail

  • GMC Member
  • 1651 posts
  • Version:GM8

Posted 04 May 2009 - 12:42 AM

I realize that this is an old topic and i'm sorry for bringing it back, but i'm using this DLL right now, and sometimes doing the smallest change in code make the game come up with an error saying "unknown variable (global.)_002". I have the physx_start and everything but i don't know what's happening. Even when i change the code back to how it was i get the same error. Anyone know why? Thanks!

EDIT: I found out that even i declared global._002 in the create event of an object it still says that it's an unknown variable. So what could be causing this?
EDIT 2: I also just found that if i put the physx_start and the physx_world_set_gravity lines in the object that first causes the error it works. But i would still like to know why this is happening

Edited by heyufool1, 04 May 2009 - 02:25 AM.

  • 0

#49 fhd

fhd

    GMC Member

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

Posted 20 August 2009 - 01:47 PM

Is there any update for GM7 ?

Edited by fhd, 20 August 2009 - 01:48 PM.

  • 0

#50 posva

posva

    GMC Member

  • New Member
  • 610 posts
  • Version:GM8

Posted 01 October 2009 - 05:48 PM

i noticed that set_rotation make an unexpected error appear or an acces violation or freez game...
can you fix that?
  • 0

#51 SerMSYS

SerMSYS

    GMC Member

  • New Member
  • 180 posts

Posted 09 October 2009 - 03:02 AM

Make sure that World_Create returns a double so that it works in GM7
  • 0

#52 posva

posva

    GMC Member

  • New Member
  • 610 posts
  • Version:GM8

Posted 12 October 2009 - 11:28 AM

im in GM6.1 ...
  • 0

#53 wituz

wituz

    GMC Member

  • New Member
  • 11 posts

Posted 26 December 2009 - 09:22 AM

Your ridid_bodies.gmk does not work .. Unexpected error while running the game ..
  • 0

#54 tomster1996

tomster1996

    GMC Member

  • New Member
  • 312 posts

Posted 26 December 2009 - 01:30 PM

Does this work in GM8?
  • 0

#55 Keth

Keth

    GMC Member

  • New Member
  • 164 posts

Posted 01 May 2010 - 08:54 PM

Make sure that World_Create returns a double so that it works in GM7


Thanks. You saved me time :D
New version up supporting Gamemaker 7 and 8.
  • 0

#56 Lbckf

Lbckf

    GMC Member

  • New Member
  • 243 posts
  • Version:GM:Studio

Posted 05 May 2010 - 01:02 AM

COMPILATION ERROR in code action
Error in code at line 2:
h = physx_body_create(x,y,density,SHAPE_BOX,32,32,0);
^
at position 6: Unknown function or script: physx_body_create
  • 0

#57 Keth

Keth

    GMC Member

  • New Member
  • 164 posts

Posted 05 May 2010 - 11:58 AM

COMPILATION ERROR in code action
Error in code at line 2:
h = physx_body_create(x,y,density,SHAPE_BOX,32,32,0);
^
at position 6: Unknown function or script: physx_body_create


You need to install the GEX if you're using GM7 or GM8.

Edited by Keth, 05 May 2010 - 11:59 AM.

  • 0

#58 Consoft

Consoft

    GMC Member

  • GMC Member
  • 449 posts

Posted 14 May 2010 - 04:26 AM

Does this have support for concave bodies? :lol:
  • 0

#59 Exylex

Exylex

    GMC Member

  • New Member
  • 216 posts

Posted 24 May 2010 - 04:57 PM

I like this, physx_body_get_vspeed() is broken though.
:)

Edited by Exylex, 24 May 2010 - 09:20 PM.

  • 0

#60 Keth

Keth

    GMC Member

  • New Member
  • 164 posts

Posted 03 June 2010 - 05:49 PM

I like this, physx_body_get_vspeed() is broken though.
:wacko:


This is going to be fixed in the upcoming version.
Documentation video (progress of the engine so far): http://www.youtube.c...h?v=BIjSvkT8nKk
Stress test of fluid: http://www.youtube.c...h?v=yoV9N8Yw3pI
Follow progress on Twitter: http://twitter.com/GMODE_Physics

Edited by Keth, 06 June 2010 - 08:59 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users