V
Verburner
Guest
I have converted a little project I was trying around with in Game Maker: Studio to GMS2 and had unexpected results. When trying to fix the problem I was able to trace it back to one particular function, namely surface_copy_part().
What I am experiencing, is that the resulting image will be vertically distorted in the target surface, if the 5th argument, the x position to copy from in the source, is not equal to 0. An example code would be:
surf = surface_create(200,200);
surface_set_target(surf);
draw_clear_alpha(c_black,0);
draw_sprite(spr_circle,0,100,100);
surface_reset_target();
surf_part = surface_create(100,100);
surface_set_target(surf_part);
draw_clear_alpha(c_black,0);
surface_copy_part(surf_part,0,0,surf,50,50,100,100);
draw_surface(surf_part,0,0);
surface_reset_target();
Then draw surf_part to the screen in the draw event.
In GMS1 this will copy the sprite into the second surface just fine. In GMS2 the resulting image will be stretched along the x axis.
I am not a very experienced user, so I'd like to have a second opinion on this before reporting it. Might just be overlooking some change in GMS2..
What I am experiencing, is that the resulting image will be vertically distorted in the target surface, if the 5th argument, the x position to copy from in the source, is not equal to 0. An example code would be:
surf = surface_create(200,200);
surface_set_target(surf);
draw_clear_alpha(c_black,0);
draw_sprite(spr_circle,0,100,100);
surface_reset_target();
surf_part = surface_create(100,100);
surface_set_target(surf_part);
draw_clear_alpha(c_black,0);
surface_copy_part(surf_part,0,0,surf,50,50,100,100);
draw_surface(surf_part,0,0);
surface_reset_target();
Then draw surf_part to the screen in the draw event.
In GMS1 this will copy the sprite into the second surface just fine. In GMS2 the resulting image will be stretched along the x axis.
I am not a very experienced user, so I'd like to have a second opinion on this before reporting it. Might just be overlooking some change in GMS2..