Extremephysics - 2d Physics Engine For Game Maker
#1041
Posted 18 March 2012 - 11:35 PM
By the way, there is already a destructible terrain example in the ExtremePhysics ZIP file. It may not be as good as the one you want to use, but are you sure it isn't good enough?
#1042
Posted 19 March 2012 - 01:02 AM
i will soon reply (tomorrow (i dont have time to explain))
#1043
Posted 19 March 2012 - 03:28 AM
i need your help in defying the points for each 'triangle' in the terrain (can extreme physics allow you to move (update) the points on the static/dynamic multypolygons/other shapes, without destroying and recreating them)
all-so it will be good if you can tell me of how to check the block's collusion force when it is collided ? (ep_body_check_force() ?)
and if you cant help, then i understand, and i think i can figure it out ower a period of time...
thank you for your time
-Artur
Edited by 'tear, 20 March 2012 - 04:12 AM.
#1044
Posted 21 March 2012 - 08:14 PM
There's no way to modify polygons after initializing them, you have to destroy them and create new ones (that shouldn't be a huge issue though, you only have to destroy the shapes temporarily).
#1045
Posted 21 March 2012 - 09:41 PM
#1046
Posted 21 March 2012 - 10:48 PM
How do i check the gravity direction-
the gm- gravity_direction(point_direction(room_width/2,room_height/2))
i need to know the grawity direction script, not the- ep_body_set_grawity()
1. i need constant update with all bodies and to the center of the screen, is there anyvay to do it unlike in the fluid_sumulation (example)
(constant update and to the center of the screen)
Thank you for your help
-Artur
#1047
Posted 23 March 2012 - 10:26 AM
var g, dir; g = 0.5; dir = point_direction(x, y, room_width/2, room_height/2); ep_body_set_gravity(global.world, body, lengthdir_x(g, dir), lengthdir_y(g, dir));If this is not what you mean, please explain it again - I couldn't really make sense of your last post
#1048
Posted 24 March 2012 - 11:06 AM
how can i change the color of the fluid into red??
want to make it look like blood
pls answer
#1049
Posted 24 March 2012 - 08:58 PM
Anyway, take a look at the step event of the controller.
Edited by Maarten Baert, 24 March 2012 - 08:58 PM.
#1050
Posted 24 March 2012 - 09:21 PM
it says
draw_sprite(spr_water,0,xx,yy); } } draw_set_blend_mode_ext(bm_inv_dest_color,bm_zero); draw_set_color(c_white); draw_rectangle(0,0,room_width,room_height,0); // c = 1-c draw_set_blend_mode_ext(bm_one,bm_one); draw_set_color(merge_color(c_black,c_white,1-1/8)); draw_set_alpha(1-1/1); draw_rectangle(0,0,room_width,room_height,0); // c = c+1-1/8 draw_set_alpha(1); draw_set_blend_mode_ext(bm_inv_dest_color,bm_zero); draw_set_color(c_white); draw_rectangle(0,0,room_width,room_height,0); // c = 1-c draw_set_blend_mode_ext(bm_dest_color,bm_one); draw_set_color(c_white); draw_rectangle(0,0,room_width,room_height,0); // c = c+c draw_rectangle(0,0,room_width,room_height,0); // c = c+c draw_rectangle(0,0,room_width,room_height,0); // c = c+c draw_set_blend_mode(bm_normal); surface_reset_target();i tried
make_color_rgb(255,0,0);
but doesnt work
#1051
Posted 25 March 2012 - 03:01 PM
draw_surface_ext(surf,0,0,1,1,0,make_color_rgb(0,80,200),1);Just replace make_color_rgb(0,80,200) with your color.
#1052
Posted 25 March 2012 - 03:03 PM
draw_surface_ext(surf,0,0,1,1,0,make_color_rgb(0,80,200),1);Just replace make_color_rgb(0,80,200) with your color.
#1053
Posted 25 March 2012 - 05:48 PM
Whoops, seems like it was in the draw event after all
.
draw_surface_ext(surf,0,0,1,1,0,make_color_rgb(0,80,200),1);Just replace make_color_rgb(0,80,200) with your color.
oh thanks i didnt look at the draw event .
:D
#1055
Posted 30 March 2012 - 08:27 AM
#1056
Posted 10 April 2012 - 06:55 AM
#1057
Posted 10 April 2012 - 07:42 AM
Hello, I tried using this in GM Studio. First it said that is was missing the ExtremePhysics.dll, so I manually put it in the project folder, which fixed it. Then, I tried running it, but it does not recognize any of the functions. In the GM IDE, all functions are there and listed when I press "Show extension functions". However, when I run the game, it gives the "unknown function or script". Do you know any way to make EP work with GM Studio? (Yes I have tried manually putting all the scripts inside GM, but GM Studio can no longer import a lot of scripts at once via .gml files)
Studio beta does not support GEX or dlls yet, they did not get that far in supporting the feature yet. even if the dll interface function are there, no dll will work period.
#1058
Posted 10 April 2012 - 08:07 AM
Oh, OK, Thanks!
Hello, I tried using this in GM Studio. First it said that is was missing the ExtremePhysics.dll, so I manually put it in the project folder, which fixed it. Then, I tried running it, but it does not recognize any of the functions. In the GM IDE, all functions are there and listed when I press "Show extension functions". However, when I run the game, it gives the "unknown function or script". Do you know any way to make EP work with GM Studio? (Yes I have tried manually putting all the scripts inside GM, but GM Studio can no longer import a lot of scripts at once via .gml files)
Studio beta does not support GEX or dlls yet, they did not get that far in supporting the feature yet. even if the dll interface function are there, no dll will work period.
#1059
Posted 13 April 2012 - 08:26 AM
Code for static block: (the codes for the other static objects like ramps are basically the same, but instead of a box shape they are polygons. the ep_body_set_collisions() function is the same)
body = ep_body_create_static(world,1); bodyshape = ep_shape_create_box(world,body,sprite_width-2,sprite_height-2,0,0,0,1); ep_shape_set_collision(world,body,bodyshape,1,1,0); ep_shape_set_material(world,body,bodyshape,0.6,0.6,0,0); ep_body_set_position(world,body,x,y,0);
Code for ragdolls: (it's quite long so I shortened it to the quote that I think must the important)
The body is the main body part, which creates the other parts.
global.my_id = global.body_id; global.body_id +=1; body = ep_body_create_dynamic(world,0); shape = ep_shape_create_box(world,body,sprite_width-4,22-4,0,0,0,1); ep_shape_set_collision(world,body,shape,1,1,GROUP_RAGDOLL+global.my_id); ep_shape_set_material(world,body,shape,0.5,0.4,0,0); ep_body_set_position(world,body,x,y,0); ep_body_calculate_mass(world,body); ep_body_set_gravity(world,body,0,0.4);
The other body parts have generally this code:
body = ep_body_create_dynamic(world,0); shape = ep_shape_create_box(world,body,sprite_width-4,sprite_height-4,0,0,0,0.5); ep_shape_set_collision(world,body,shape,1,1,GROUP_RAGDOLL+global.my_id); ep_shape_set_material(world,body,shape,0.2,0.4,0,0); ep_body_set_position(world,body,x,y,0); ep_body_calculate_mass(world,body); ep_body_set_gravity(world,body,0,0.4);
the constant GROUP_RAGDOLL is 1.
and object called EP sets global.body_id to 0 at its create event, where the world creation code is also located.
#1060
Posted 13 April 2012 - 03:06 PM
EDIT: (I was initially asking about the license as well but I saw a post you made on your website so I figured it out and removed that from this post.)
Edited by Jake Armstrong, 14 April 2012 - 05:22 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users









