Jump to content


Photo

Extremephysics - 2d Physics Engine For Game Maker


  • Please log in to reply
1138 replies to this topic

#1101 xsonicvision

xsonicvision

    GMC Member

  • New Member
  • 2 posts
  • Version:GM8

Posted 19 July 2012 - 12:01 AM

Hi there, I have a question, and i need a little help. I've just started using extremephysics, I think its amazing, I'm just not very familiar with the language.

For the rolling ball example, i would like to set the angle of the sprite to the angle at which the ball is moving if possible.

I've also noticed on the testbed example in test number two (and all other tests i believe) when i activate the drawing debug for velocity, in pink it shows me the angle that im looking for, but i can't seem to figure out which variable it is??
Can some one help me please?

I found this but it doesnt seem to work

dir = point_direction(0,0,ep_body_get_xvel_center(global.world,body),ep_body_get_yvel_center(global.world,body)); // 'direction'sp = point_distance(0,0,ep_body_get_xvel_center(global.world,body),ep_body_get_yvel_center(global.world,body));

i read through the topic, its been brought up a couple times and i saw you posted a code that worked in that instance but the code was removed
btw thanks maarten your engine is a miracle


Edited by xsonicvision, 19 July 2012 - 01:18 AM.

  • 0

#1102 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 12 August 2012 - 06:13 PM

Sorry for the late reply, I was on holiday :).

How do you use the joints?
I'm trying to have one object dangle from another object, and I can't get it to work.

Have you read the tutorial?
http://www.maartenbaert.be/extremephysics/tutorials/joints/

Hi there, I have a question, and i need a little help. I've just started using extremephysics, I think its amazing, I'm just not very familiar with the language.

For the rolling ball example, i would like to set the angle of the sprite to the angle at which the ball is moving if possible.

I've also noticed on the testbed example in test number two (and all other tests i believe) when i activate the drawing debug for velocity, in pink it shows me the angle that im looking for, but i can't seem to figure out which variable it is??
Can some one help me please?

I found this but it doesnt seem to work

dir = point_direction(0,0,ep_body_get_xvel_center(global.world,body),ep_body_get_yvel_center(global.world,body)); // 'direction'
sp = point_distance(0,0,ep_body_get_xvel_center(global.world,body),ep_body_get_yvel_center(global.world,body));

i read through the topic, its been brought up a couple times and i saw you posted a code that worked in that instance but the code was removed
btw thanks maarten your engine is a miracle

The code you posted is exactly what you asked, it should work ...
  • 0

#1103 PoniesForPeace

PoniesForPeace

    puzzling

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

Posted 25 August 2012 - 04:16 AM

Hi I'm using Extreme Physics for a project and I am getting lag spikes at random times. They last for about a minute and go away. I am trying to rule things out but I'm not really getting anywhere. Do you know if ExtremePhysics would have anything to do with it?

Here is the topic if you want to know more...http://gmc.yoyogames.com/index.php?showtopic=551947&st=0&p=4066847&fromsearch=1&#entry4066847

Edited by PoniesForPeace, 25 August 2012 - 04:17 AM.

  • 0

#1104 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 25 August 2012 - 12:52 PM

I've never seen that happen before with ExtremePhysics, except when you create lots of new bodies at the same time, but that's not what's happening here I think. I will reply in your thread as I don't think this is caused by ExtremePhysics.
  • 0

#1105 PoniesForPeace

PoniesForPeace

    puzzling

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

Posted 25 August 2012 - 05:49 PM

I've never seen that happen before with ExtremePhysics, except when you create lots of new bodies at the same time, but that's not what's happening here I think. I will reply in your thread as I don't think this is caused by ExtremePhysics.


Yes I don't think it was caused by ExtremePhysics either I think my laptop was acting up.
  • 0

#1106 shahrooz232

shahrooz232

    GMC Member

  • New Member
  • 23 posts
  • Version:GM8

Posted 30 August 2012 - 09:33 AM

This is awesome ! thanks for your hard work. this is the best physics engine I've ever seen in game maker.

Edited by shahrooz232, 04 September 2012 - 09:48 AM.

  • 0

#1107 Snoutmol

Snoutmol

    GMC Member

  • New Member
  • 17 posts
  • Version:Mac

Posted 04 September 2012 - 12:16 AM

I've been trying to use this but keep coming up with a lot of problems...
Before I attempt to resolve them, does ExtremePhysics work on GM4Mac?


Nevermind I think I figured it out. I was just a little overwhelmed by all the files that are installed and didn't know that all I had to do was add the .gex extension. Plue the examples don't work in GM4Mac.

Edited by Snoutmol, 04 September 2012 - 12:28 AM.

  • 0

#1108 fantastichumore

fantastichumore

    GMC Member

  • GMC Member
  • 117 posts
  • Version:GM8

Posted 04 September 2012 - 09:44 AM

I have trouble with this!
global.world = ep_world_create();

This function doesn't go 'global' it only works when its in the create of a rig doll or body or something. and I have no idea why :/
After I do it in another way, the game crashes because there are to much worlds/bodies? :((

Please help me I'm really frustrated :(

Edited by fantastichumore, 04 September 2012 - 09:44 AM.

  • 0

#1109 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 04 September 2012 - 09:32 PM

I have trouble with this!

global.world = ep_world_create();

This function doesn't go 'global' it only works when its in the create of a rig doll or body or something. and I have no idea why :/
After I do it in another way, the game crashes because there are to much worlds/bodies? :((

Please help me I'm really frustrated :(

I need more information than that to help you. The code you posted should be in the create event of your controller, your controller should have the highest depth of all objects, and you should place the controller in your room FIRST, before any other objects. If that doesn't solve your problem, post more code :).
  • 0

#1110 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14385 posts
  • Version:GM:Studio

Posted 05 September 2012 - 01:54 AM

I have trouble with this!

global.world = ep_world_create();

This function doesn't go 'global' it only works when its in the create of a rig doll or body or something. and I have no idea why :/
After I do it in another way, the game crashes because there are to much worlds/bodies? :((

Please help me I'm really frustrated :(


1) Make a boot room, empty, first in the GM room resource
2) Make a persistent main controller, drop it in that room
3) On GAME start event, init the system (load the dll), create the world, create all your game global variables there as well, it's a good place for them
5) The last line of your game start event, put room_goto_next()
4) On Game end event, clean up the world, unload the dll

The controller will stick with you for the duration of the game. It will catch the game start end event because it's in the first room. and it will catch the game end event when you quit or perform a game_restart() because it follows you through all the rooms.

You should no longer have trouble with objects trying to use the world in their create event in the other rooms.
  • 0

#1111 kayla15

kayla15

    GMC Member

  • New Member
  • 8 posts
  • Version:GM8

Posted 13 September 2012 - 12:09 AM

Hello, I'm making a 3d car racing game. My main problem is how will the other cars (enemy/computer) automatically rotate on every turn. It follows the path but it stays only in one angle. I've executed a code on Step event image_angle=direction+180; but it doesn't work. The car follows the path but cannot rotate every turn. How can I fix this? Please help me. I need to finish my game ASAP because it is our project in school and due date is near. Thank you. :) Hope someone will respond
  • 0

#1112 PoniesForPeace

PoniesForPeace

    puzzling

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

Posted 13 September 2012 - 12:50 AM

Hello, I'm making a 3d car racing game. My main problem is how will the other cars (enemy/computer) automatically rotate on every turn. It follows the path but it stays only in one angle. I've executed a code on Step event image_angle=direction+180; but it doesn't work. The car follows the path but cannot rotate every turn. How can I fix this? Please help me. I need to finish my game ASAP because it is our project in school and due date is near. Thank you. :) Hope someone will respond

Are you using Extreme Physics()? You have to use a function called ep_body_get_rot().
  • 0

#1113 PoniesForPeace

PoniesForPeace

    puzzling

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

Posted 21 September 2012 - 02:28 PM

Is this compatible with Studio?
  • 0

#1114 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 30 September 2012 - 03:29 PM

I assume it is for Windows, but debug draw may not work (studio uses the new runner IIRC). Maybe for mac too - check the ExtremePhysics for Mac topic. Other platforms, no.
  • 0

#1115 THE_GAME_EDITOR

THE_GAME_EDITOR

    GMC Member

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

Posted 16 October 2012 - 10:01 AM

This is pretty cool. But can't this dll make use of collision masks?
Because I'm using curved terrains and it's a hard job to build it out of vertex.
  • 0

#1116 PoniesForPeace

PoniesForPeace

    puzzling

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

Posted 16 October 2012 - 02:58 PM

This is pretty cool. But can't this dll make use of collision masks?
Because I'm using curved terrains and it's a hard job to build it out of vertex.


Haven't tried it yet but in the OP there is a program that might help: http://sprites.3dn.r...ygonCreator.rar
  • 0

#1117 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 16 October 2012 - 03:27 PM

You could also try box chains. I added them specifically for curved terrain.
  • 0

#1118 THE_GAME_EDITOR

THE_GAME_EDITOR

    GMC Member

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

Posted 16 October 2012 - 03:32 PM

PoniesForPeace
Thanks for the program. It's fairly easy to recreate the sprite now. Posted Image

Maarten Baert
What are box chains? Posted Image
  • 0

#1119 PoniesForPeace

PoniesForPeace

    puzzling

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

Posted 17 October 2012 - 01:07 AM

PoniesForPeace
Thanks for the program. It's fairly easy to recreate the sprite now. Posted Image

Maarten Baert
What are box chains? Posted Image


Don't thank me, thank the guy who made it. I just copied it from the OP... :whistle:
  • 0

#1120 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 18 October 2012 - 12:11 PM

What are box chains? Posted Image

There's a box chain example in testbed.gmk, and another one is called rolling_ball.gmk. Just look at those and you will see what it does.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users