lucymhdavies / egg-game

Live. Bounce. Die. Repeat.
https://labs.lmhd.me/egg
3 stars 0 forks source link

Draw eyes onto body, then draw entire body #1

Closed lucymhdavies closed 5 years ago

lucymhdavies commented 5 years ago

Current draw logic is to draw body to screen, then draw eyes and pupils to screen

https://github.com/lucymhdavies/egg-game/blob/master/game/egg.go#L238-L278

This seems to be resulting in some jittering of the eyes and pupils.

Better would be to draw all of them onto an image, and then draw that image to the screen.

lucymhdavies commented 5 years ago

Fixed by https://github.com/lucymhdavies/egg-game/commit/c66526604442b464a172f587464b695dcbb988e8