Skip to content

Conversation

@iansheret
Copy link

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

  • box: Draw a rectangle on the current image
  • circle: Draw a filled circle on the current image
  • line: Draw a line on the current image
  • resetImage: Return the current image to its original state

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant