D
Dragon Ferocity
Guest
I'm having a lot of issues with using surfaces right now. Issues I haven't encountered before.
The first issue i'm having, is when I set a surface to the size of the room (10,000 x 10,000), the surface is actually set to around 1800 x 1800 (Even though surface_get_width() reports 10,000), and it is scaled to about 1/6 or 1/7 of the size it should be.
If I set the size of the surface to 8192 x 8192, then it is scaled correctly at a 1:1 ratio, but when I get to the edge of the surface, the last row of pixels is stretched to the edge of the screen.
Now, if I set the room size to 16384 x 16384, but keep the surface at 8192 x 8192, then the surface is scaled to 1:1 ratio, and the last row of pixels is stretched to the edge of the room.
If I set the surface to be the same size as the room, the surface becomes scaled at a 0.5:1 ratio with the room, but the last row of pixels is not stretched to the edge of the room, and the surface doesn't show everything I'm drawing to it.
(I'd rather not post a lot of code at this moment, but if you need more I'll provide it).
Here's what I'm using to draw the surface:
Here's my script that draws the surface:
I have no idea whats going on.
The first issue i'm having, is when I set a surface to the size of the room (10,000 x 10,000), the surface is actually set to around 1800 x 1800 (Even though surface_get_width() reports 10,000), and it is scaled to about 1/6 or 1/7 of the size it should be.
If I set the size of the surface to 8192 x 8192, then it is scaled correctly at a 1:1 ratio, but when I get to the edge of the surface, the last row of pixels is stretched to the edge of the screen.
Now, if I set the room size to 16384 x 16384, but keep the surface at 8192 x 8192, then the surface is scaled to 1:1 ratio, and the last row of pixels is stretched to the edge of the room.
If I set the surface to be the same size as the room, the surface becomes scaled at a 0.5:1 ratio with the room, but the last row of pixels is not stretched to the edge of the room, and the surface doesn't show everything I'm drawing to it.
(I'd rather not post a lot of code at this moment, but if you need more I'll provide it).
Here's what I'm using to draw the surface:
Code:
draw_surface_general(WORLD_SURFACE, view_xview[0], view_yview[0], view_wview[0], view_hview[0], view_xview[0], view_yview[0], 1, 1, 0, c_white, c_white, c_white, c_white, 1);
Code:
var numRows = argument0;
show_debug_message("Creating surface");
if (!surface_exists(WORLD_SURFACE))
WORLD_SURFACE = surface_create(16384, 16384);
surface_set_target(WORLD_SURFACE);
draw_set_alpha(1);
draw_clear_alpha(c_black, 0);
////DRAW TO SURFACE HERE
show_debug_message("Done with surface");
surface_reset_target();
I have no idea whats going on.