CraterHater
Member
Hey,
I've got a game where ideally I need to draw many thousands of objects. Here is my draw event;
This event alone takes up 1.721milliseconds every tick for 600 objects. It says the draw_sprite_ext function only takes up 0.274 and the event_user(1) is never called because current_health always equals to max_health in my tests.
Does anyone know why this takes up so much of the performance? I tried substituting the draw_sprite_ext function with a simple draw_self and this resulted in a drastic increase in performance but I still need the function. Any help would be massively appreciated!
EDIT: I've heard about vertex buffers but I am not sure how they work. Is that a good way to go for me?
I've got a game where ideally I need to draw many thousands of objects. Here is my draw event;
GML:
if(current_health != max_health){
event_user(1);
}
draw_sprite_ext(sprite_index, image_index, draw_coord_x, draw_coord_y, draw_scale_x, draw_scale_y, 0, c_white, alpha);
Does anyone know why this takes up so much of the performance? I tried substituting the draw_sprite_ext function with a simple draw_self and this resulted in a drastic increase in performance but I still need the function. Any help would be massively appreciated!
EDIT: I've heard about vertex buffers but I am not sure how they work. Is that a good way to go for me?