Jump to content


Photo

Object's paths cause the game to gradually lag


  • Please log in to reply
1 reply to this topic

#1 Jameshorn

Jameshorn

    GMC Member

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

Posted 02 March 2012 - 11:34 PM

When running my game in HTML5, the paths work just fine, but as you click around the screen and create new paths, the game begins to lag, slower and slower.

grid = mp_grid_create(0,0,ceil(room_width/4),ceil(room_height/4),4,4);
mp_grid_add_instances(grid,solid,false);
mp_grid_path(grid,path,x,y,global.tar_x,global.tar_y,true);
mp_grid_destroy(grid);

(Then Set Path action.)

Here is a link to my game:
http://artistwith.in...es/newgametest/

I really would appreciate some help on this, thanks in advance!

Edited by Jameshorn, 03 March 2012 - 12:27 AM.

  • 0

#2 Jameshorn

Jameshorn

    GMC Member

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

Posted 03 March 2012 - 12:52 AM

I figured out the problem, just was repeating the script over and over in a step. Sorry about this, please delete.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users