O
Oliver Melroy
Guest
I have been using GMS2 for about a year now, and I have come across a problem I cannot seem to fix. My game starts lagging a lot after about 10 seconds after running the game, and I think that the problem is the grid around the blocks being drawn every frame, but idk. Thanks!
Video:
Grid drawing code:
Video:
Grid drawing code:
Code:
//---------Create Grid
//---Up
if !place_meeting(x, y - 16, oWall) {
instance_create_depth(x, y - 16, 0, oGrid);
}
//---Down
if !place_meeting(x, y + 16, oWall) {
instance_create_depth(x, y + 16, 0, oGrid);
}
//---Left
if !place_meeting(x - 16, y, oWall) {
instance_create_depth(x - 16, y, 0, oGrid);
}
//---Right
if !place_meeting(x + 16, y, oWall) {
instance_create_depth(x + 16, y, 0, oGrid);
}