Jump to content


Photo

Extremephysics - 2d Physics Engine For Game Maker


  • Please log in to reply
1176 replies to this topic

#1021 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 05 February 2012 - 03:43 PM

@Tyrannosaurus rex: Trying to combine realistic physics with simple animations like that usually won't work the way you want. You can create one shape which never changes, or build a ragdoll with moving body parts. But you can't just convert an animated sprite to a shape and expect it to work, because there is simply no physically correct way to do it.
  • 0

#1022 rodri

rodri

    GMC Member

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

Posted 08 February 2012 - 03:55 AM

Hi i would like to know if it would be possible to use it on game maker studio to export all the required dlls for an exportable apk to work on android or ios.,

thanks..
  • 0

#1023 jhalek90

jhalek90

    GMC Member

  • GMC Member
  • 25 posts

Posted 08 February 2012 - 05:40 PM

Hello. Wonderful engine you have here. I have one small problem i hope you can help me with.


The player object has a simple dynamic EP_box body,but moves with GML... (x+=4 ect)

I want to update the position and rotation of the physics object based on the players x,y and image angle.


The issue im having, is that when ever i try to update the physics objects position, it seems to "lag" behind my player.
This lag is not related to the players x and y speed, and seems to be VERY random... sometimes quite extreme.

Any ideas? Should i be using a static body for my object??
  • 0

#1024 IcyEye

IcyEye

    GMC Member

  • GMC Member
  • 19 posts

Posted 08 February 2012 - 09:55 PM

In your destructible terrain demo you're using box shapes of varying sizes. Could that same effect be done with polygons on a fixed grid size (32x32 blocks), or would that be too slow? I'm basically looking for a way to dynamically merge/separate clusters of blocks as they are created/destroyed in a minecraft style system so that it can be as fast as possible. Polygons would allow me to add slopes.

Thanks!
  • 0

#1025 twisted_games

twisted_games

    GMC Member

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

Posted 10 February 2012 - 05:40 PM

Just wanted to share something ive been working on with your engine.

WIP topic

Love the engine. It is VERY robust.
  • 0

#1026 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 12 February 2012 - 02:39 PM

Hi i would like to know if it would be possible to use it on game maker studio to export all the required dlls for an exportable apk to work on android or ios.,

thanks..

Yes, if these platforms allow compiled code at all it should work (if you remove some parts like debug drawing). You have to recompile it of course.

Hello. Wonderful engine you have here. I have one small problem i hope you can help me with.


The player object has a simple dynamic EP_box body,but moves with GML... (x+=4 ect)

I want to update the position and rotation of the physics object based on the players x,y and image angle.


The issue im having, is that when ever i try to update the physics objects position, it seems to "lag" behind my player.
This lag is not related to the players x and y speed, and seems to be VERY random... sometimes quite extreme.

Any ideas? Should i be using a static body for my object??

You should do it the other way around. ExtremePhysics controls the object, so if you want the object to move you should move the body in ExtremePhysics (and the object will follow).

If you want to 'teleport' the object to a new position you can use ep_body_set_position. If you just want the body to move, you should use ep_body_set_velocity (otherwise things like pushing other bodies won't work properly because the player is essentially teleporting into them instead of pushing them).

In your destructible terrain demo you're using box shapes of varying sizes. Could that same effect be done with polygons on a fixed grid size (32x32 blocks), or would that be too slow? I'm basically looking for a way to dynamically merge/separate clusters of blocks as they are created/destroyed in a minecraft style system so that it can be as fast as possible. Polygons would allow me to add slopes.

Thanks!

I guess it's possible, but it sounds very complicated. Splitting polygons is relatively easy, but merging takes a lot of processing time (it might be possible in C++, but GML will probably be too slow).

Have you thought about merging the 32x32 blocks, but simply not merging the other shapes? It's not as good as actually merging everything, but it will merge all large areas of blocks.

Alternatively you can use something like box chains to trace the contour of the terrain, and simply merge adjacent boxes that have the same slope. That way you won't have anything on the inside of the terrain so it's very efficient, and it's not that difficult to program.
  • 0

#1027 IcyEye

IcyEye

    GMC Member

  • GMC Member
  • 19 posts

Posted 14 February 2012 - 10:05 PM

I've found an interesting polygonal terrain demo that could probably be easily adopted to use extreme physics, but it may still be a little slow.

One approach I've developed lately has been to try and eliminate as many unnecessary game instances as possible while running the simulation. Usually every physics body has an instance attached to it in the game, and well this can help make it easier to manage objects it's a little wasteful. Specially with static objects. For example, your destructible terrain demo can have thousands of instances in it at once (even though it runs relatively fast.)

So I created a script that creates a single physics body and then adds static shapes to it based on the location of tiles it finds in the room. Now I've heard that lots of tiles can slow down your game, but their supposed to be much faster then instances. Here is the script and example file. Feel free to include it in any future releases of your extension.


//physics_tiles_create()
tile_size = 32;
tile_layer = 1000000;

body = ep_body_create_static(global.world);

for (yy=0; yy < room_height; yy+=tile_size)
{
    for (xx = 0; xx < room_width; xx+=tile_size)
    {
        if tile_exists(tile_layer_find(tile_layer, xx, yy))
        {
            shape[xx/tile_size,yy/tile_size] = ep_shape_create_box(global.world,body,tile_size,tile_size,xx+tile_size/2,yy+tile_size/2,0,1);
            ep_shape_set_collision(global.world,body,shape[xx/tile_size,yy/tile_size],1,1|2,0);
            ep_shape_set_material(global.world,body,shape[xx/tile_size,yy/tile_size],0,0.1,0,0);
        }
    }
}
Example file (gmk)

My next goal is to find a way to optimize drawing even further by perhaps removing tiles altogether. I want to see if I can use surfaces to draw only the active part of the view in the room so I can add special effects and only render what you can see. I'm thinking I should be able to find where physics blocks are in relation to the view, and then be able to draw a sprite to the surface at their locations? Wish me luck! :laugh: :unsure:

Edit: Oh I should also say that the script here is a simplified version of the one I'm currently using. In my more advanced script each tile has it's own body and shape. I did this so I could use ep_body_get_x and ep_body_get_y for certain tasks.

Edited by IcyEye, 14 February 2012 - 10:14 PM.

  • 0

#1028 Birnenfrisch

Birnenfrisch

    GMC Member

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

Posted 21 February 2012 - 03:50 PM

Hello,

I've tried out your extension and in principal it works fine. The problem is as soon as I save the project and reopen it, it seems Extreme Physics stops working. The functions are still recognized by Game Maker (as they are syntax highlighted), but when I look at for the local variables of instance the body variable I'm using it's 0. I did not change a single character of the script, but as soon as I reopen my projects it stops working. When I create a fresh new project and install Extreme Physics again it works as soon as I save and reopen the project... What am I doing wrong? I followed exactly the installation instructions provided in the readme of the dll. I'm currently using Game Maker 8.1 with HTML5 support on a windows 7 64 bit machine.

Cheers
  • 0

#1029 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 22 February 2012 - 10:54 PM

Hello,

I've tried out your extension and in principal it works fine. The problem is as soon as I save the project and reopen it, it seems Extreme Physics stops working. The functions are still recognized by Game Maker (as they are syntax highlighted), but when I look at for the local variables of instance the body variable I'm using it's 0. I did not change a single character of the script, but as soon as I reopen my projects it stops working. When I create a fresh new project and install Extreme Physics again it works as soon as I save and reopen the project... What am I doing wrong? I followed exactly the installation instructions provided in the readme of the dll. I'm currently using Game Maker 8.1 with HTML5 support on a windows 7 64 bit machine.

Cheers

I've never tested it with GM HTML5 (which I don't have). Does it work if you use GM8 of GM8.1 (i.e. without HTML5)?
  • 0

#1030 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 23 February 2012 - 03:41 PM

I am having some strange problems. I have a robot which will jump when on top of a dynamic object, but when it is on the walls, it will not jump at all and will only move slowly left and right.

Static wall object:body = ep_body_create_static(global.world);
shape1 = ep_shape_create_box(global.world,body,32,32,16,16,0,1);
ep_shape_set_collision(global.world,body,shape1,1,1|2,0);
ep_shape_set_material(global.world,body,shape1,0.2,0.4,0,0);

physics_object_set(body);


Robot Object:Information about object: obj_player

Sprite: sprite_Robot_Stand_1
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent: <no parent>
Mask: <same as sprite>

Create Event:
execute code:

group = physics_get_new_group();

body = ep_body_create_dynamic(global.world,true);




// lower part
shape1 = ep_shape_create_box(global.world,body,64,200,32,16,0,1);
ep_shape_set_collision(global.world,body,shape1,1,1|2,group);
ep_shape_set_material(global.world,body,shape1,0,0.4,0,0);

ep_body_calculate_mass(global.world,body);
ep_body_set_gravity(global.world,body,0,platformgravity*2);

physics_object_set(body);



Destroy Event:
execute code:

ep_body_destroy(global.world,body);



Step Event:
execute code:

var left,right,jump,xvel,yvel,a,xfrom,yfrom,xx,yy,d,dist,xrel,yrel,f;

xvel = ep_body_get_xvel_center(global.world,body);
yvel = ep_body_get_yvel_center(global.world,body);

ww = 64;
hh = 200;
left = ((keyboard_check(vk_left) or keyboard_check(ord("A"))) and !ep_world_collision_test_box(global.world, ww, hh-1, x+ww/2-1, y+hh/2-0.5, 0, -0.1, 0, 2, group));
right = ((keyboard_check(vk_right) or keyboard_check(ord("D"))) and !ep_world_collision_test_box(global.world, ww, hh-1, x+ww/2+1, y+hh/2-0.5, 0, -0.1, 0, 2, group));
jump = ((keyboard_check(vk_up) or keyboard_check(ord("W"))) and ep_world_collision_test_box(global.world, ww-2, 2, x+ww/2 , y+hh+1 , 0, -0.1, 0, 1|2, group));

// move left/right
a = (right-left)*128;
xvel += max(-2,min(2,a-xvel));

// jump
if jump {
yvel = -30;
}

ep_body_set_velocity_center(global.world,body,xvel,yvel,0);

// shoot
if mouse_check_button(mb_left) {
xfrom = x+10;
yfrom = y;
xx = mouse_x-xfrom;
yy = mouse_y-yfrom;
d = sqrt(xx*xx+yy*yy);
xx /= d;
yy /= d;
dist = ep_world_ray_cast(global.world,xfrom,yfrom,xx,yy,1,1,group);
if dist=-1 {
dist = 10000;
} else {
a = ep_world_get_collision_body(global.world);
if !ep_body_is_static(global.world,a) {
xrel = xfrom+xx*dist-ep_body_get_x_center(global.world,a);
yrel = yfrom+yy*dist-ep_body_get_y_center(global.world,a);
f = 200000;
ep_body_apply_impulse_relative(global.world,a,xrel,yrel,xx*f,yy*f,0,false,true);
}
}
a = instance_create(16,0,obj_ray);
a.x1 = xfrom;
a.y1 = yfrom;
a.x2 = xfrom+xx*dist;
a.y2 = yfrom+yy*dist;
}



End Step Event:
execute code:

physics_object_update(body);



Draw Event:
execute code:

draw_sprite_corrected(sprite_index,image_index,x,y,image_xscale,image_yscale,direction,image_blend,image_alpha);
  • 0

#1031 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 24 February 2012 - 04:40 PM

Replace:
shape1 = ep_shape_create_box(global.world,body,64,200,32,16, 0,1);
with:
shape1 = ep_shape_create_box(global.world,body,64,200,32,100, 0,1);
And move the origin of your sprite. Does that fix it?

Alternatively, replace:
jump = ((keyboard_check(vk_up) or keyboard_check(ord("W"))) and ep_world_collision_test_box(global.world, ww-2, 2, x+ww/2 , y+hh+1 , 0, -0.1, 0, 1|2, group));
with:
jump = ((keyboard_check(vk_up) or keyboard_check(ord("W"))) and ep_world_collision_test_box(global.world, ww-2, 2, x+ww/2 , y+hh+1-84 , 0, -0.1, 0, 1|2, group));

  • 0

#1032 IcyEye

IcyEye

    GMC Member

  • GMC Member
  • 19 posts

Posted 25 February 2012 - 11:24 AM

I'm trying to destroy objects when they collided with other objects, but doing so inside a for loop causes errors.

var c;
for(c = ep_shape_get_first_contact(global.world, body, shape); c!=0; c = ep_shape_get_next_contact(global.world, body, shape, c)) {
    b = ep_contact_get_body1(global.world, c);
    if b=body {
        b = ep_contact_get_body2(global.world, c);
    }
    hit = ep_body_get_uservar(global.world, b, 0);
    
    switch (hit.object_index)
    {
        case obj_block: with (hit) instance_destroy();
    }
}
How would I do this correctly?

I would also like to create an explosion that destroys objects that are very close and pushes ones that are farther away, but I really don't know the best way to go about doing this.
  • 0

#1033 Universal_X

Universal_X

    GMC Member

  • New Member
  • 126 posts

Posted 25 February 2012 - 06:18 PM

Hi!

I just can't get the multipolygons to work.

I used the multipolygons example and tried to modify it to my point database, but it just wont work.

And then I get a error: A sub polygon is not convex. Is there a way of making non convex multipolygons?


I have a database of all the points.
points = 5
point[1,0] = 0 //this is point 1 x
point[1,1] = 0 //this is point 1 y

The object creation code I use looks like this: But it don't work.

ep_world_multipoly_begin(global.world,points);
c = 1 //current point / start point
repeat(points)
{
ep_world_multipoly_set_vertex(global.world,c-1,point[c,0],point[c,1]);
c += 1
}
ep_world_multipoly_end(global.world,true);

poly_first = ep_world_multipoly_get_first(global.world);
poly_last = ep_world_multipoly_get_last(global.world);

body = ep_body_create_dynamic(global.world,false);
for(i=poly_first;i<=poly_last;i+=1) {
    shape = ep_shape_create_polygon(global.world,body,i,0,0,0,0.1);
    ep_shape_set_collision(global.world,body,shape,1,1,0);
    ep_shape_set_material(global.world,body,shape,0.2,0.5,0,0);
}
ep_body_calculate_mass(global.world,body);
ep_body_set_position(global.world,body,mouse_x,mouse_y,0);
ep_body_set_gravity(global.world,body,0,0.2);

Could anyone help me with a good multipolygon creating example?

Thank you in advance.

Edited by Universal_X, 25 February 2012 - 06:20 PM.

  • 0

#1034 gmcsdobbie

gmcsdobbie

    GMC Member

  • GMC Member
  • 298 posts

Posted 26 February 2012 - 09:21 PM

shape1 = ep_shape_create_box(global.world,body,64,200,32,100,0,1);
I did what you said to do, I changed the values and now the robot will jump properly. But when I make the height of the object larger than 200, it will not jump any more. How can I use any size I want?
  • 0

#1035 dark_master4

dark_master4

    GMC Member

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

Posted 07 March 2012 - 02:19 AM

Hi Maarten! I have a question for you as I'm trying to use the most realistic values possible with your engine:

What are the units you use for mass, distances and time? (Well, time, I can deal with it myself. But mass and distances I need to know what you based your code on.)

Edit: After thought, I need your time unit too.

Edited by dark_master4, 08 March 2012 - 12:22 AM.

  • 0

#1036 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 08 March 2012 - 05:55 PM

I'm trying to destroy objects when they collided with other objects, but doing so inside a for loop causes errors.

var c;
for(c = ep_shape_get_first_contact(global.world, body, shape); c!=0; c = ep_shape_get_next_contact(global.world, body, shape, c)) {
    b = ep_contact_get_body1(global.world, c);
    if b=body {
        b = ep_contact_get_body2(global.world, c);
    }
    hit = ep_body_get_uservar(global.world, b, 0);
    
    switch (hit.object_index)
    {
        case obj_block: with (hit) instance_destroy();
    }
}
How would I do this correctly?

I would also like to create an explosion that destroys objects that are very close and pushes ones that are farther away, but I really don't know the best way to go about doing this.

It doesn't work because by destroying the instance, you're invoking the destroy event which destroys the body and also the contact c. So ep_shape_get_next_contact doesn't work anymore. It's not supposed to crash though, you should just get an error message ...

The solution is to run
c = ep_shape_get_next_contact(global.world, body, shape, c)
before you destroy the instance.

Hi!

I just can't get the multipolygons to work.

I used the multipolygons example and tried to modify it to my point database, but it just wont work.

And then I get a error: A sub polygon is not convex. Is there a way of making non convex multipolygons?


I have a database of all the points.
points = 5
point[1,0] = 0 //this is point 1 x
point[1,1] = 0 //this is point 1 y

The object creation code I use looks like this: But it don't work.

ep_world_multipoly_begin(global.world,points);
c = 1 //current point / start point
repeat(points)
{
ep_world_multipoly_set_vertex(global.world,c-1,point[c,0],point[c,1]);
c += 1
}
ep_world_multipoly_end(global.world,true);

poly_first = ep_world_multipoly_get_first(global.world);
poly_last = ep_world_multipoly_get_last(global.world);

body = ep_body_create_dynamic(global.world,false);
for(i=poly_first;i<=poly_last;i+=1) {
    shape = ep_shape_create_polygon(global.world,body,i,0,0,0,0.1);
    ep_shape_set_collision(global.world,body,shape,1,1,0);
    ep_shape_set_material(global.world,body,shape,0.2,0.5,0,0);
}
ep_body_calculate_mass(global.world,body);
ep_body_set_position(global.world,body,mouse_x,mouse_y,0);
ep_body_set_gravity(global.world,body,0,0.2);

Could anyone help me with a good multipolygon creating example?

Thank you in advance.

Non-convex polygons are supported. If you get that error message, this means the polygon was self-intersecting or not defined in clockwise order.

shape1 = ep_shape_create_box(global.world,body,64,200,32,100,0,1);
I did what you said to do, I changed the values and now the robot will jump properly. But when I make the height of the object larger than 200, it will not jump any more. How can I use any size I want?

Replace 100 with yournewheight/2 :).

Hi Maarten! I have a question for you as I'm trying to use the most realistic values possible with your engine:

What are the units you use for mass, distances and time? (Well, time, I can deal with it myself. But mass and distances I need to know what you based your code on.)

Edit: After thought, I need your time unit too.

I wrote a tutorial:
http://www.maartenba...s/unit-systems/
  • 0

#1037 'tear

'tear

    GMC Member

  • New Member
  • 17 posts
  • Version:GM8

Posted 18 March 2012 - 02:36 PM

Hello Extreme Physics developer, i need your help, please reply...
  • 0

#1038 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 18 March 2012 - 02:58 PM

Sure, can you post a little more information? :)
  • 0

#1039 'tear

'tear

    GMC Member

  • New Member
  • 17 posts
  • Version:GM8

Posted 18 March 2012 - 03:01 PM

http://gmc.yoyogames...0
here is the topic i posted in the wrong place :)

Edited by 'tear, 18 March 2012 - 03:28 PM.

  • 0

#1040 'tear

'tear

    GMC Member

  • New Member
  • 17 posts
  • Version:GM8

Posted 18 March 2012 - 03:53 PM

So, do you understand of what i am trying to do :) ?
  • 0

#1041 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 18 March 2012 - 11:35 PM

I understand, but what you are asking is pretty complicated and it seems you really have no idea where to start. I don't mind helping you with specific problems, but I really don't have time to do it all myself. What have you tried so far?

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?
  • 0

#1042 'tear

'tear

    GMC Member

  • New Member
  • 17 posts
  • Version:GM8

Posted 19 March 2012 - 01:02 AM

i am more advanced in the GML programing that you think :)
i will soon reply (tomorrow (i dont have time to explain))
  • 0

#1043 'tear

'tear

    GMC Member

  • New Member
  • 17 posts
  • Version:GM8

Posted 19 March 2012 - 03:28 AM

I am sure it isn't good enough for a grand -commercial game...

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.

  • 0

#1044 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 21 March 2012 - 08:14 PM

You need ep_contact_get_point1_normalforce and a few more contact-related functions for that. Read this tutorial first if you don't know how to work with contacts.

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).
  • 0

#1045 'tear

'tear

    GMC Member

  • New Member
  • 17 posts
  • Version:GM8

Posted 21 March 2012 - 09:41 PM

ok, i will try it :)
  • 0

#1046 'tear

'tear

    GMC Member

  • New Member
  • 17 posts
  • Version:GM8

Posted 21 March 2012 - 10:48 PM

Hello, i need one more thing :)

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
  • 0

#1047 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 23 March 2012 - 10:26 AM

Try this:
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 :).
  • 0

#1048 Guest_armorraja_*

Guest_armorraja_*
  • Guests

Posted 24 March 2012 - 11:06 AM

hey guys have a question
how can i change the color of the fluid into red??
want to make it look like blood
pls answer :)

#1049 Maarten Baert

Maarten Baert

    GMC Member

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

Posted 24 March 2012 - 08:58 PM

Sorry, but if you can't figure that out by yourself I don't think you should try to use ExtremePhysics. It gets a lot harder. :)

Anyway, take a look at the step event of the controller.

Edited by Maarten Baert, 24 March 2012 - 08:58 PM.

  • 0

#1050 Guest_armorraja_*

Guest_armorraja_*
  • Guests

Posted 24 March 2012 - 09:21 PM

sry bro im new at gamemaker pls answer :(
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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users