O
Olivebates
Guest
Hi!
I want to draw a thick line as a path.
Right now I'm using the following code.
Is there any way to optimize this?
I think it's making my game lag to draw this many paths, and it also looks bad.
Thanks!
I want to draw a thick line as a path.
Right now I'm using the following code.
Is there any way to optimize this?
I think it's making my game lag to draw this many paths, and it also looks bad.
Code:
// Draw line
draw_set_color(c_red);
draw_path(ip, ix, iy, false);
draw_path(ip, ix+.25, iy, false);
draw_path(ip, ix-.25, iy, false);
draw_path(ip, ix, iy+.25, false);
draw_path(ip, ix, iy-.25, false);
draw_path(ip, ix+.5, iy, false);
draw_path(ip, ix-.5, iy, false);
draw_path(ip, ix, iy+.5, false);
draw_path(ip, ix, iy-.5, false);
draw_path(ip, ix+.75, iy, false);
draw_path(ip, ix-.75, iy, false);
draw_path(ip, ix, iy+.75, false);
draw_path(ip, ix, iy-.75, false);
draw_path(ip, ix+1, iy, false);
draw_path(ip, ix-1, iy, false);
draw_path(ip, ix, iy+1, false);
draw_path(ip, ix, iy-1, false);
//Draw outline
draw_set_color(c_black);
draw_path(ip, ix+1.25, iy, false);
draw_path(ip, ix-1.25, iy, false);
draw_path(ip, ix, iy+1.25, false);
draw_path(ip, ix, iy-1.25, false);
draw_path(ip, ix+1.5, iy, false);
draw_path(ip, ix-1.5, iy, false);
draw_path(ip, ix, iy+1.5, false);
draw_path(ip, ix, iy-1.5, false);