Because we only draw at 60 frames per second or so. To speed up the spinning anymore we have use a motion blur. This is actually quite easy in this specifc case, due to always spinning at a constant velocity.
[x] All you have to do is draw underneath the laser with the same image, rotated 45 degrees and and semi transparent. draw_rot takes a Gosu:Color parameter which handles transparency. Such a color parameter would take an object constructed like this. Gosu::Color.argb(alpha, 255,255,255)
[x] The ideal way of doing this would be adding optional parameters in draw_helper with defaults angle_offset =0, and alpha=255 and integrate them into draw_with_boundary and draw_centered logic.
[x] Add a 2nd draw_with_boundray call in the laser's draw method, but pass in 45 and 128 for offset and alpha respectively
[x] also adding a random initial rotation angle would help the effect of seeing a fast spining item
Because we only draw at 60 frames per second or so. To speed up the spinning anymore we have use a motion blur. This is actually quite easy in this specifc case, due to always spinning at a constant velocity.
draw_rot
takes aGosu:Color
parameter which handles transparency. Such a color parameter would take an object constructed like this.Gosu::Color.argb(alpha, 255,255,255)
draw_helper
with defaultsangle_offset =0, and alpha=255
and integrate them into draw_with_boundary and draw_centered logic.draw_with_boundray
call in the laser's draw method, but pass in45
and128
foroffset
andalpha
respectively