moving polygons

??? I am making a sort of space invaders game in which i draw the different things as polygons since i don’t want to use images and is there any way to get the different things to get drawn quickly.
I have mine set up to where you move x or y and that value is added or subtracted to the current value which in my paint process makes an array like int[] shipx={x+1, x-4…} and so on and the same for y then i use drawPolygon(shipx,shipy,23(or something like that)) is there any other way to do draw polygons quicker ???

this really goes slow with multiple objects >:(

You should probably create your polygon shapes upfront then use transform/translate/rotate on graphics and polygon with AffineTransforms to move them around.

I’m not sure how this is implemented, but I suspect this would give java the best chance at optimising the changes for you.

Kev

The short answer is “no”. Turtle graphics is, pretty much by
its definition, slow.

As others have suggested, use images that are images of your line-drawn shapes.

JK