M
Midastouch
Guest
Hello everyone,
I created a grid (room size). 1024*576
I can fill my grid with water (value in grid = 2)
Or with groud value in grid = 1
My problem is that i have 2 fps no more all the time
Can you help me?
Create event
Step event
Draw event i tried 2 ideas 1 with point 1 with sprites
My draw event is the problem, but i can't find what cause me a low fps like that.
I also havent this problem with a little room.
At 1024 / 576 i have my problem but not at 100/100
I created a grid (room size). 1024*576
I can fill my grid with water (value in grid = 2)
Or with groud value in grid = 1
My problem is that i have 2 fps no more all the time
Can you help me?
Create event
GML:
grid = ds_grid_create(room_width, room_height);
Code:
if mouse_check_button(mb_left) {
ds_grid_set(grid,mouse_x,mouse_y,1)}
if mouse_check_button(mb_right) {
ds_grid_set(grid,mouse_x,mouse_y,2)}
Draw event i tried 2 ideas 1 with point 1 with sprites
Code:
for(var xx = 0; xx < ds_grid_width(grid); xx++){
for(var yy = 0; yy < ds_grid_height(grid); yy++){
if ds_grid_get(grid, xx, yy) = 1 {
draw_point_color(xx,yy,c_black)
//draw_sprite(spr_ground,0,xx,yy)
}
if ds_grid_get(grid, xx, yy) = 2 {
draw_point_color(xx,yy,c_blue)
//draw_sprite(spr_water,0,xx,yy)
}
}
}
I also havent this problem with a little room.
At 1024 / 576 i have my problem but not at 100/100
Last edited by a moderator: