Jump to content


Photo

Extremephysics - 2d Physics Engine For Game Maker


  • Please log in to reply
1178 replies to this topic

#1 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 20 September 2009 - 10:12 PM

Posted Image


ExtremePhysics is a 2D physics simulation engine designed for Game Maker. It allows you to use complex physics in your games without having to worry about the math involved.

ExtremePhysics is written in C++, which is a lot faster than GML. You can easily add hundreds of objects that collide with each other to your game without slowing it down.

Screenshots:
Posted Image
1600 bodies at 40fps on my computer: Intel Core2 Duo 2.5Ghz - using only one core. Without drawing it's even faster (85-90 fps).

Posted Image
Fluid simulation example

Posted Image
Another example

Youtube: ExtremePhysics Fluid Simulation with 40.000 particles

Documentation and tutorials:
http://www.maartenba...extremephysics/

Download:
Download ExtremePhysics 2.2 release 15 (with source code)
Download executable examples

Download ExtremePhysics 2.1 release 14 (with source code)
Download ExtremePhysics 2.0 release 6 (with source code)

Thanks to SapperEngineer there's also a Mac version. His topic is here. The Mac version should be almost identical to the Windows version, however this zip file only contains the GEX and the fluid simulation example. If you want more examples, you can copy the GMKs from the Windows version.

I've also made a Python version as a proof of concept, more info is on my website.

License
Posted Image
ExtremePhysics is distributed under the terms of the GNU Lesser General Public License.

Polygon generator
GamerXP has made a program that generates code for ExtremePhysics polygons. You can use it to draw polygons for your sprites. You can download it here:
http://sprites.3dn.r...ygonCreator.rar

Edited by Maarten Baert, 24 February 2013 - 12:58 AM.

  • 28
Posted Image

#2 13bgarli

13bgarli

    GMC Member

  • New Member
  • 177 posts

Posted 20 September 2009 - 10:32 PM

This is really good i like it i get about the same as you do with the 1003 objects, with a core i7 920 tho lol
I like this its cool lol and it works on Vista/Windows 7
  • 0

#3 fluffalafagaus@gmail.com

fluffalafagaus@gmail.com

    GMC Member

  • New Member
  • 66 posts

Posted 20 September 2009 - 11:54 PM

Awsome
  • 0

#4 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16629 posts
  • Version:GM:Studio

Posted 21 September 2009 - 12:08 AM

Good, now we can talk about this right here
From other thread

Version 1.0 doesn't draw anything in the DLL. Version 2.0 does, but only for debugging. When using the extension (instead of the scripts), drawing objects in GM instead of in the DLL won't make a huge difference. The scripts and external_call function calls are slow, not GM's drawing functions. I am using the scripts instead of the extension in 2.0 for now, because it makes testing the DLL a lot easier.

shouldnt that be

if(obj1.group & obj2.group) && (obj1.collide || obj2.collide){


No, group and collide are both 32-bit unsigned integers:
- 'group' defines the group(s) the component belongs to (for example, 0101 (binary) means "this component belongs to group 1<<0 and 1<<2")
- 'collide' defines the group(s) the component should collide with (for example, 0011 (binary) means "this component collides with components of group 1<<0 and 1<<1")


Oh I see the variable name confused me. And I get the bit method for grouping, that's what gmbullet does.

Actually, drawing from GML, you have to ask for the position and rotation of the instance via your get variable, I assume... That seriously limits the number of instances. In 2d, that's just x,y,image_abgle. but in 3d that's x,y,z,rx,ry,rz. Looks at the gmbullet topic. In short, calling APIs in gml is very slow. SO calling 3 apis for each instance reduces the number of possible instances drastically. Since you are drawing from the dll, you dont see that hapening right now (Using gmapi I assume)

In gmbullet, various methods have been tried...

The fastest that still involves GML is me passing you a ds_list which you fill up with
instance id
x
y
image_angle (in degrees because the extra rad to deg is also costly)

I can then ask for the positions in one sigle call

var thelist; thelist = ds_list_create();
getinstancesdata(thelist); //your dll api does the ds_list_add, you can exclude deactivated bodies
var i; i = 0;
var sz; sz = ds_list_size(thelist)/4;
repeat(sz)
{
with(ds_list_find_value(thelist,i))
{
x =ds_list_find_value(thelist,i+1)
y =ds_list_find_value(thelist,i+2)
image_angle =ds_list_find_value(thelist,i+4)
}
i+=4;
}
ds_list_destroy(thelist)

asking for ds_ elements is faster than calling api functions.

But the fastest way is you drawing for me. it looks like you are already setup to take over the drawing. I suggest you do that if possible. all you need is the sprite index of the instance and possibly how to draw it (image_blend, scales and blend mode)

Useful functions to add
associatebody(bodyid,instanceid)
if you can draw for me, meaning a hell of a lot of instances can have physics not impeded with me having to ask, in gml, for the position of the instance
setbodydrawinfo(bodyid,spriteindex,imageindex,imag
e_blend,image_xscale,image_yscale,image_alpha,blen
d
_mode)

which you can use in the dll via gmapi, to call draw_sprite_ext for each intances associated with a body
drawForMe() in the draw event.
I guaranty, this will beat the crap out of GMPhysics for the number of object you can handle.

Edited by icuurd12b42, 21 September 2009 - 12:09 AM.

  • 0

#5 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 21 September 2009 - 08:38 AM

I have thought about that problem but I couldn't find a good solution. I am using gmlib, and as far as I know there is no fast way to change the value of local variables. If it was possible, I could add something like this:
ep_object_set_localvars(global.world,object,id,"x","y","image_angle")
This would tell the DLL to write the new position to id.x, id.y and id.z. But I don't think this is possible.

The ds_list method is probably faster when using scripts, but I am not so sure if it will still be faster when using the extension. The downside is the code will waste a lot of time updating objects the player can't see anyway. Also I don't want to make the DLL dependent on gmlib because I am not sure it will be possible to use the same hack in GM8 (the runner was converted to C++). But I will test this method to see if it makes the dll faster.

I don't want to add the drawing code to the DLL because it will make drawing very limited. And I don't want to add 100 functions just to get reasonable drawing and a small performance boost. If this is still not fast enough, you should use the physics engine in C++ directly instead of using GM (it will be open source).
  • 1
Posted Image

#6 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16629 posts
  • Version:GM:Studio

Posted 21 September 2009 - 09:57 AM

...


GM8 being the same core system as 6 and 7 (no it's not c++ yet), I'm pretty sure it wont take long for gmlib to have the gm8 interface defined.

Not sure about APIs being faster when using extentions. You can do the benchmark yourself or talk with andbna. But I'm pretty sure ds list is faster, extention or not. You can alway pass the view coords and size to the function so it does not populate the list with things out of view... That is if the user really wants to disable movement out of the view. Great idea, the view system BTW...

You can also play with script_execute... Initialising the system you can pass a script index you can then call from the dll (via script_execute(scriptindex,args)) and pass intanceid,x,y,image_angle. I tried it myself but not on a system that I could compare with multiple getxy API calls... In a private version of gm3dpartsys to do owner draw of particles if you ever want to draw the particle in a way not definable by the system...

script updateobjects (assumes you call associatebody and pass this script index to the dll)
//argument0 is id
//argument1 is x
//argument2 is y
//argument3 is image_angle

with(argument0)
{
x = argument1;
y = argument2;
image_angle = argument3;
}


BTW, drawing yourself is not a small performance boost... I can have 10 to 30 times the number of particles drawing in gm3dpartsys vs GML

Yep, being open source, I can see myself adding the features I want though so you dont have to take these suggestion on. Just be sure your class or struct allows adding user data easily (such as extra info to store instance id and sprites and such).
  • 0

#7 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 21 September 2009 - 04:53 PM

No problem, I am using normal C++ classes for the entire engine, the functions in GM are actually just wrapper functions. You could even rewrite all wrapper functions yourself if you want.

The callback-script method sounds interesting, I will try that too.

Do you know if a ds_map is slower/faster than a ds_list? I could use maps for all variables and use the (EP) id of the object as the key.
  • 0
Posted Image

#8 MrOpposite

MrOpposite

    Yesterdays games

  • New Member
  • 744 posts

Posted 21 September 2009 - 08:08 PM

I used the old version on the .nl forum... do you have a change-log of anything new? it would be fun to know :D
  • 0
I'm working on a new project. The project name is "Timeline"

Reinventing the wheel is stupid, but stealing a car is illegal.

#9 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 21 September 2009 - 08:15 PM

Is it me or are physics dlls, all the rage lately? :D
  • 0
GM 8.1 / GM:HTML5 User

#10 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16629 posts
  • Version:GM:Studio

Posted 21 September 2009 - 10:43 PM

No problem, I am using normal C++ classes for the entire engine, the functions in GM are actually just wrapper functions. You could even rewrite all wrapper functions yourself if you want.

The callback-script method sounds interesting, I will try that too.

Do you know if a ds_map is slower/faster than a ds_list? I could use maps for all variables and use the (EP) id of the object as the key.


Maps are slower than lists. But faster if you access data non sequentialy. If I run through the entire list, list is what you need. With maps, youwould only be able to associate one variable data anyway.

ds_map_add(themap,thekey,thevalue). So you would need a 3 keys and use strings for making the key

ds_map_find_value(themap,string(id) + "_x",thevalue).
ds_map_find_value(themap,string(id) + "_y",thevalue).
ds_map_find_value(themap,string(id) + "_angle",thevalue).

calling a script has potential to be faster... Especially if you would pass a lot of arguments. In your case though, only id,x,y,angle, it may not be the optimal solution

from my implementation
inline void script_execute(int script, double inst,double x,double y,double z,double rx,double ry,double rz,double xscl,double yscl,double zscl,double alpha,double color)
{
gm::CGMVariable args[] = {inst, x, y, z, rx, ry, rz, xscl, yscl, zscl, alpha, color};
gm::script_execute( script, args, 12);
}
  • 0

#11 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 22 September 2009 - 11:58 AM

ds_map_find_value(themap,string(id) + "_x",thevalue).
ds_map_find_value(themap,string(id) + "_y",thevalue).
ds_map_find_value(themap,string(id) + "_angle",thevalue).

That's not what I mean, I mean this:
ds_map_find_value(themap_x,id,thevalue)
ds_map_find_value(themap_y,id,thevalue)
ds_map_find_value(themap_angle,id,thevalue)

  • 0
Posted Image

#12 Postality

Postality

    GMC Member

  • New Member
  • 244 posts

Posted 22 September 2009 - 09:02 PM

Is it me or are physics dlls, all the rage lately? :D


That's because there isn't any easy / complete ones out there. GMPhysics was, but it was canceled... PhysX was looking good, but then that was canceled...
Most other ones are 3D that are good (GMNewton) that is now getting 2D scripts, but it still simulates the Z axis which makes it slightly slower.

I'm going to give this one a try now... but that's the issue with Physics DLL's in the GMC. all the good ones are canceled and don't work right / missing functionality...

That's why I asked if you could make one as you're active in the GM and seem to know what you're doing when it comes to quality DLL's (I use a few of your other ones =))

Personally I liked the way PhyzX worked, but alas, Revel isn't going to be continuing it...

Gonna look at this one for now...

Thanx for the GMC contribution with the Physics engine.

Edited by Postality, 22 September 2009 - 09:04 PM.

  • 0

#13 Syynth

Syynth

    GMC Member

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

Posted 22 September 2009 - 09:27 PM

In the room with all 1003 objects, I got 45 at the lowest, usually 50. Also, it's really really fun to set the vel. iterations to 1, then quickly move the slider way up, and watch all the balls go flying away. I like this though, keep up the good work.
  • 0
Posted Image

#14 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16629 posts
  • Version:GM:Studio

Posted 22 September 2009 - 10:06 PM

ds_map_find_value(themap,string(id) + "_x",thevalue).
ds_map_find_value(themap,string(id) + "_y",thevalue).
ds_map_find_value(themap,string(id) + "_angle",thevalue).

That's not what I mean, I mean this:
ds_map_find_value(themap_x,id,thevalue)
ds_map_find_value(themap_y,id,thevalue)
ds_map_find_value(themap_angle,id,thevalue)


Oh yeah, good thinking... Possibly this would work too. but I did not benchmark ds_maps against API calls, only ds_list in one sequential run VS api getx/y/z/rx/ry/rz() calls in one sequentila run...


I compared ds_maps vs ds_lists a while ago and they are quite slower. It is possible that a ds_map call is as slow as an API call.

This to show you to be careful you dont waste time implementing stuff for nothing.
  • 0

#15 cactus

cactus

    GMC Member

  • GMC Member
  • 367 posts

Posted 01 October 2009 - 02:38 PM

This seems awesome. I'm really looking forward to giving it a go once there's a more easily understandable example to work from. Great job, man!
  • 0

#16 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 02 October 2009 - 04:45 PM

Very nice stuff!

I was heartbroken when CoderChris abandon GMphysics and its nice to see someone create a physics engine that rivals GMphysics. Since GMphysics dosent work for vista I have been searching for a decent 2D engine and this one makes the cut. I look forward to see future development and I cant wait until its stable enough for me to create a game.

Keep it coming :)
  • 0

#17 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 02 October 2009 - 05:18 PM

to show my appreciation for extreme physics, I've whipped up a quick banner for you:

Posted Image

EDIT: whoops, double post :)

Edited by theludicrous, 02 October 2009 - 05:20 PM.

  • 0

#18 MrOpposite

MrOpposite

    Yesterdays games

  • New Member
  • 744 posts

Posted 04 October 2009 - 05:21 PM

to show my appreciation for extreme physics, I've whipped up a quick banner for you:

Posted Image

EDIT: whoops, double post -_-

Nice, but could you add something physics-ish to it? it seems not that physics-ish right now :chikin
  • 0
I'm working on a new project. The project name is "Timeline"

Reinventing the wheel is stupid, but stealing a car is illegal.

#19 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 04 October 2009 - 05:48 PM

to show my appreciation for extreme physics, I've whipped up a quick banner for you:

Posted Image

EDIT: whoops, double post -_-

Nice, but could you add something physics-ish to it? it seems not that physics-ish right now :chikin


hmm, I have an idea

Edited by theludicrous, 04 October 2009 - 06:51 PM.

  • 0

#20 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 07 October 2009 - 01:22 PM

to show my appreciation for extreme physics, I've whipped up a quick banner for you:

<...>

WOW, great! If you could change the background color from green to gray/silver it would be perfect! The green doesn't go very well with my color scheme :D.
  • 0
Posted Image

#21 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 07 October 2009 - 09:07 PM

wow, it looks a lot better when its gray, here you go:
Posted Image

thanks for the complement :D
  • 0

#22 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 07 October 2009 - 10:01 PM

Great! And with alpha channel :D!

Unfortunately I haven't had that much time to work on the code because I had to study. It will take a bit longer than I expected to finish v2.0.
  • 0
Posted Image

#23 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 07 October 2009 - 11:15 PM

Great! And with alpha channel :D!

Unfortunately I haven't had that much time to work on the code because I had to study. It will take a bit longer than I expected to finish v2.0.


I cant wait (literally) but take your time, its better to release a quality engine slowly than a sketchy engine quickly :D
  • 0

#24 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 08 October 2009 - 06:17 PM

During the rewrite I got stuck all the time because I was trying to add too many new features at the same time. So I have decided to finish the rewrite first without these features and release it (v2.0) and add the features later (v2.1). That way I will be able to release it faster, and it will probably be more stable as I am only reusing features I have tested already.
  • 0
Posted Image

#25 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 08 October 2009 - 08:26 PM

During the rewrite I got stuck all the time because I was trying to add too many new features at the same time. So I have decided to finish the rewrite first without these features and release it (v2.0) and add the features later (v2.1). That way I will be able to release it faster, and it will probably be more stable as I am only reusing features I have tested already.


What are these features you talk about? B)
  • 0

#26 wargasm

wargasm

    GMC Member

  • GMC Member
  • 189 posts

Posted 09 October 2009 - 11:17 AM

/*

I used this program to test if all functions of the DLL worked. This is NOT a good example for using ExtremePhysics
in a game. All tests use debugdraw for graphics because this is easier, but you should NOT do this in a real game!
If you need an empty engine, use empty_engine.gmk

*/


Where is this empty_engine.gmk file? It's not packaged with the zip and I've searched the forum to see if there's a download but can't find one.

Edited by wargasm, 09 October 2009 - 11:18 AM.

  • 0

#27 wargasm

wargasm

    GMC Member

  • GMC Member
  • 189 posts

Posted 09 October 2009 - 01:00 PM

I'm playing around (while learning GML) and here is what I have so far. I'm simply attempting to create a box with gravity. The comments are what I assume i'm doing.....

// Initiate the dll? Not sure how this works yet.
ExtremePhysics_init();

// Initiate the GML functions?
ep_gmfunctions_init();

// Create a world for the physics objects. I'm assuming the function returns the world id which I am setting to the arena variable. No parameters to set the world position and dimensions? Default = room size?
arena = ep_world_create();

// Create a box (is this just a collision box or should it be visible?) for my player object which atm is just a 64x64 box sprite. I'm assuming the last 2 parameters are a boolean and float. (rotation 0/1, density 0-X.....X being whatever the maximum density is).
ep_object_component_create_box( arena, ob_Player, 64, 64, 320, 320 ,1, 1 );

// Set the gravity of the player object. Assuming last 2 parameters (x, y) to be floats.
ep_object_set_gravity( arena, ob_Player, 0.5, 0 );

// Set the mass of the player object. Assuming the last parameter (mass) to be a float.
ep_object_set_mass( arena, ob_Player, 0.5 );

When running this im given the error "ep_object_set_gravity: Can not set gravity of ground object in world 1".

Where am I going wrong and can someone please clarify on the questions in the comments? Thanks.

Edited by wargasm, 09 October 2009 - 01:08 PM.

  • 0

#28 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 10 October 2009 - 06:44 PM

/*

I used this program to test if all functions of the DLL worked. This is NOT a good example for using ExtremePhysics
in a game. All tests use debugdraw for graphics because this is easier, but you should NOT do this in a real game!
If you need an empty engine, use empty_engine.gmk

*/


Where is this empty_engine.gmk file? It's not packaged with the zip and I've searched the forum to see if there's a download but can't find one.


yeah, where is it?
  • 0

#29 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 11 October 2009 - 08:46 PM

It's not finished yet and I had forgotten I had mentioned it. This is just an alpha version, not the final engine (I still have to make a .gex and a help file).
  • 0
Posted Image

#30 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 13 October 2009 - 08:33 PM

So, hows the engine going?
  • 0

#31 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 14 October 2009 - 08:00 PM

Better, I finally managed to install Visual C++ on this computer, so I can compile the DLL in VC++ now. VC++ seems to generate faster code so this will make the DLL even faster :lol:. But there is still a lot of work to do, though.

I was wondering, what would be the best way to use the engine in C++?
  • adding all source files to the project and compiling it yourself:
    + no external files
    + works with all compilers
  • using one header file and a library:
    + no external files
    + easy to switch to a newer version
  • using one header file and a dll:
    + generates the same code for all compilers
    + easy to switch to a newer version
    + possible use the same DLL for both C++ and GM
What do you think?
  • 0
Posted Image

#32 PsichiX

PsichiX

    GMC Member

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

Posted 14 October 2009 - 08:53 PM

IMO

using one header file and a dll:

good idea

possible use the same DLL for both C++ and GM

bad idea. some data types for c++ version will be better than double. So make LIB for c++ version, and wrap it to GM version.
  • 0

freckles_sign.png


#33 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 14 October 2009 - 09:01 PM

No, I meant putting all functions in one DLL: C++ classes and c-style (GM) functions. GM will just ignore the classes and C++ can use them.

So make LIB for c++ version, and wrap it to GM version.

I don't want to recompile two projects every time I make a change to the code, just to test it :lol:.
  • 0
Posted Image

#34 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 15 October 2009 - 01:47 AM

I wish I could help you on this Maarten but I know little to nothing in C++ :)
  • 0

#35 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 15 October 2009 - 02:24 AM

I don't want to recompile two projects every time I make a change to the code, just to test it :).


In that case, I would suggest a dll that is usable by both C++ and GM. The file size would be slightly increased, but would be easier for you to maintain. Basically one would create the functions optimized for C++ and then create wrapper functions for GM that recast value types as needed. There's my 2 cents.

-hanson
  • 0

#36 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 16 October 2009 - 07:16 PM

Never mind, I found the solution:

Using project dependencies
Project dependencies are a simple way to tell Code::Blocks that a given project "depends" on another (in the same workspace, always).
Thus imagine in your workspace you have a library project and an executable project which depends on the library. Then you could (and should) tell Code::Blocks about this dependency. To do this, you select "Project->Properties" and click the "Project's dependencies.." button.


I will just create a GCC library and a DLL for GM using that library, and I will create libraries for other compilers later.
  • 0
Posted Image

#37 posva

posva

    GMC Member

  • New Member
  • 610 posts
  • Version:GM8

Posted 20 October 2009 - 09:01 PM

i hope you realease a beta version soon, and of course qith a simple example for introducing your DLL :)
  • 0

#38 ash47

ash47

    O_o

  • GMC Member
  • 1347 posts

Posted 21 October 2009 - 06:30 AM

Please put 2D or something similar into the topic title, :) thanks ;) P.S. That is pretty awesome, i get like 23-28 FPS though, lol...
  • 0
Posted Image

Rate this topic: 0 | 1 | 2 | 3 | 4 | 5

PRESS IT
\/


#39 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 23 October 2009 - 07:17 PM

any progress?
  • 0

#40 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 25 October 2009 - 06:35 PM

I have finished the structure of the engine, but there's still a lot of code that has to be rewritten.
  • 0
Posted Image

#41 esak

esak

    GMC Member

  • New Member
  • 21 posts

Posted 03 November 2009 - 09:04 PM

And how is it going? Almost done or do you still need to do a lot rewritting?
  • 0

#42 theludicrous

theludicrous

    GMC Member

  • New Member
  • 241 posts

Posted 08 November 2009 - 10:42 PM

Please don't pull a 'coder-Chris' on us! :)

Edited by theludicrous, 09 November 2009 - 01:22 AM.

  • 0

#43 Dylijn

Dylijn

    GMC Member

  • New Member
  • 553 posts

Posted 11 November 2009 - 12:31 PM

No please dont :P
  • 0


#44 Consoft

Consoft

    GMC Member

  • GMC Member
  • 449 posts

Posted 13 November 2009 - 01:43 PM

Does it support concave polygons?
  • 0
19 / Australia. [GML/Java/C++] Known as kkg, HeXeN and elimzke as well.
Make games in GML, compile them in C++! http://www.enigma-dev.org [Windows/Linux/Mac]

KUICS Australia PTY LTD

#45 Mordi

Mordi

    Maker of Menus

  • New Member
  • 3635 posts

Posted 14 November 2009 - 04:39 PM

This is great. Seems to be really fast. Finally we can have physics in Vista and 7.
  • 0

#46 michael pw

michael pw

    GMC Member

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

Posted 14 November 2009 - 07:31 PM

this is awesome!!
in the future can you please make a stack of tutorials, complex ones and simple ones, i just found the one there now hard to understand, btw what let GmPhysics down was lack of documentation and explanation on lots of the functions.

Please don't let that happen to this, it seems to good!
  • 0

Known as MishMash on the internet, If only my username could be changed :D?

Posted Image

Working on Sharp Edge, a 3D Level designer which exports to GMMOD and textures, with a vast toolset, and fancy GUI. ( So far, software is only going to be distributed with my game, in the future, it will be up for public use and with the ability to customise the software using the Plugin System to suite your games needs.)
Also working on 3D Multiplayer FPS Global Anarchy Denied Operations.


#47 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 19 November 2009 - 02:37 PM

I'm still working on this. :)

Does it support concave polygons?

No, but you can create concave polygons by dividing them into multiple convex polygons. I could even try to make the engine do that automatically, but it's very hard to generate a good subdivision.
Posted Image
This is what I want to do, but I haven't found a good algorithm yet.
  • 0
Posted Image

#48 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16629 posts
  • Version:GM:Studio

Posted 20 November 2009 - 12:40 AM

http://blog.touchmyp...s-ear-clipping/
  • 0

#49 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 21 November 2009 - 08:07 PM

http://blog.touchmyp...s-ear-clipping/

The first example looks very good, I will add that in v2.1 if possible.

I've rewritten half of the code so far (100kb :whistle:). The other half should be easier because I don't have to change it completely.
  • 0
Posted Image

#50 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16629 posts
  • Version:GM:Studio

Posted 21 November 2009 - 09:48 PM

http://blog.touchmyp...s-ear-clipping/

The first example looks very good, I will add that in v2.1 if possible.

I've rewritten half of the code so far (100kb :whistle:). The other half should be easier because I don't have to change it completely.


The only thing is that people usually define vertices clockwise.... So be careful. I have no idea why the implementation is backwards (or maybe I am).
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users