M
McWolke
Guest
Hey there,
i have some performance issues, and i really don't know why.
It's just a Title Screen with a Menu. I know that drawing costs a lot, but it's just a Title Screen!
This also happens in the Game itself but that's probably my code, i guess.
It fluctuates between 2000 and 70 fps.
It starts at 2000 and after a while it drops to 70~120
i made a script to draw these windows/buttons which draws a lot:
so is this just a GameMaker thing that it slows down because it does not need any more performance or do i really have to worry about performance now?
i have some performance issues, and i really don't know why.
It's just a Title Screen with a Menu. I know that drawing costs a lot, but it's just a Title Screen!
This also happens in the Game itself but that's probably my code, i guess.
It fluctuates between 2000 and 70 fps.
It starts at 2000 and after a while it drops to 70~120
i made a script to draw these windows/buttons which draws a lot:
Code:
///draw_window(x,y,width,height,sprite,alpha)
var xx = argument0;
var yy = argument1;
var width = argument2;
var height = argument3;
var sprite = argument4;
var alpha = argument5;
var spriteWidth = sprite_get_width(sprite);
var spriteHeight = sprite_get_height(sprite);
var lowEnd = yy + height - spriteHeight;
var rightEnd = xx + width - spriteWidth;
//Fill Middle
draw_sprite_ext(sprite,4,xx+spriteWidth,yy+spriteHeight,width/spriteWidth-2,height/spriteHeight-2,0,c_white,alpha);
//Draw Edges
draw_sprite_ext(sprite,1,xx+spriteWidth,yy,width/spriteWidth-2,1,0,c_white,alpha);
draw_sprite_ext(sprite,7,xx+spriteWidth,lowEnd,width/spriteWidth-2,1,0,c_white,alpha);
draw_sprite_ext(sprite,3,xx,yy+spriteHeight,1,height/spriteHeight-2,0,c_white,alpha);
draw_sprite_ext(sprite,5,rightEnd,yy+spriteHeight,1,height/spriteHeight-2,0,c_white,alpha);
//Draw Corners
draw_sprite_ext(sprite,0,xx,yy,1,1,0,c_white,alpha);
draw_sprite_ext(sprite,2,rightEnd,yy,1,1,0,c_white,alpha);
draw_sprite_ext(sprite,6,xx,lowEnd,1,1,0,c_white,alpha);
draw_sprite_ext(sprite,8,rightEnd,lowEnd,1,1,0,c_white,alpha);
so is this just a GameMaker thing that it slows down because it does not need any more performance or do i really have to worry about performance now?