increpare / flickgame

tiny game engine
https://www.flickgame.org
82 stars 10 forks source link

add simple drawing functions for flickgame mega scripts #31

Open iansheret opened 6 years ago

iansheret commented 6 years ago

This adds four new scripting functions to flickgame-mega, adding the capability to modify the images. The new functions are

One tricky design choice is indexing on the image coordinates, and also on colours. I've used zero-based indexes on both, as that's what the underlying data structures use, but it's maybe inconsistent with the numbering given to images (e.g. as used by the goto function).

iansheret commented 6 years ago

Now also adds overlayImage, which has selectable transparency as per our twitter discussion. Example game combining drawing and overlaying: https://www.dropbox.com/s/mkfolbo044mmgqm/lava.html?dl=0