0 Members and 4 Guests are viewing this topic.
Quote from: jimbauwens on August 23, 2011, 03:27:50 pmPianoman, a tip to speed it up: change the white in the sprites with alpha (if you don't do this aready)Wait, what?
Pianoman, a tip to speed it up: change the white in the sprites with alpha (if you don't do this aready)
I am a proud cynic.
Do you draw them with geometric primitives?
function drawghosts(gc) gc:setColorRGB(255,0,0) gc:fillArc(gonex,goney,blockwidth,blockwidth,0,180) gc:fillPolygon({gonex,goney+blockwidth/2,gonex,goney+blockwidth,gonex+.2*blockwidth,goney+.8*blockwidth,gonex+.4*blockwidth,goney+blockwidth,gonex+.45*blockwidth,goney+blockwidth,gonex+.45*blockwidth,goney+.8*blockwidth,gonex+.55*blockwidth,goney+.8*blockwidth,gonex+.55*blockwidth,goney+blockwidth,gonex+.6*blockwidth,goney+blockwidth,gonex+.8*blockwidth,goney+.8*blockwidth,gonex+blockwidth,goney+blockwidth,gonex+blockwidth,goney+.5*blockwidth,gonex,goney+.5*blockwidth}) gc:setColorRGB(255,255,255) gc:fillArc(gonex+.25*blockwidth,goney+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360) gc:fillArc(gonex+.6*blockwidth,goney+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360) gc:setColorRGB(0,0,255) gc:fillArc(gonex+.38*blockwidth,goney+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360) gc:fillArc(gonex+.75*blockwidth,goney+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360) gc:setColorRGB(0,255,255) gc:fillArc(gtwox,gtwoy,blockwidth,blockwidth,0,180) gc:fillPolygon({gtwox,gtwoy+blockwidth/2,gtwox,gtwoy+blockwidth,gtwox+.2*blockwidth,gtwoy+.8*blockwidth,gtwox+.4*blockwidth,gtwoy+blockwidth,gtwox+.45*blockwidth,gtwoy+blockwidth,gtwox+.45*blockwidth,gtwoy+.8*blockwidth,gtwox+.55*blockwidth,gtwoy+.8*blockwidth,gtwox+.55*blockwidth,gtwoy+blockwidth,gtwox+.6*blockwidth,gtwoy+blockwidth,gtwox+.8*blockwidth,gtwoy+.8*blockwidth,gtwox+blockwidth,gtwoy+blockwidth,gtwox+blockwidth,gtwoy+.5*blockwidth,gtwox,gtwoy+.5*blockwidth}) gc:setColorRGB(255,255,255) gc:fillArc(gtwox+.25*blockwidth,gtwoy+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360) gc:fillArc(gtwox+.6*blockwidth,gtwoy+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360) gc:setColorRGB(0,0,255) gc:fillArc(gtwox+.38*blockwidth,gtwoy+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360) gc:fillArc(gtwox+.75*blockwidth,gtwoy+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360) gc:setColorRGB(255,128,255) gc:fillArc(gthreex,gthreey,blockwidth,blockwidth,0,180) gc:fillPolygon({gthreex,gthreey+blockwidth/2,gthreex,gthreey+blockwidth,gthreex+.2*blockwidth,gthreey+.8*blockwidth,gthreex+.4*blockwidth,gthreey+blockwidth,gthreex+.45*blockwidth,gthreey+blockwidth,gthreex+.45*blockwidth,gthreey+.8*blockwidth,gthreex+.55*blockwidth,gthreey+.8*blockwidth,gthreex+.55*blockwidth,gthreey+blockwidth,gthreex+.6*blockwidth,gthreey+blockwidth,gthreex+.8*blockwidth,gthreey+.8*blockwidth,gthreex+blockwidth,gthreey+blockwidth,gthreex+blockwidth,gthreey+.5*blockwidth,gthreex,gthreey+.5*blockwidth}) gc:setColorRGB(255,255,255) gc:fillArc(gthreex+.25*blockwidth,gthreey+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360) gc:fillArc(gthreex+.6*blockwidth,gthreey+.25*blockwidth,.25*blockwidth,.35*blockwidth,0,360) gc:setColorRGB(0,0,255) gc:fillArc(gthreex+.38*blockwidth,gthreey+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360) gc:fillArc(gthreex+.75*blockwidth,gthreey+.35*blockwidth,.1*blockwidth,.15*blockwidth,0,360)end
However, looking at what the final shape of the ghost looks like, I think I would have done the drawing differently : - draw the top semi-circle - draw a square under it, for the bottom part, - draw white triangles at the very bottom ^ that's all