danzen / zimjs

ZIM JavaScript Canvas Framework - Code Creativity! Interactive Media For All.
Other
508 stars 47 forks source link

[Question] Can a movable element be present on more than 1 square? #37

Closed rexdefuror closed 5 years ago

rexdefuror commented 5 years ago

Hi!

As stated in the subject, can a Person-like object be made to take up more than 1 board tile? For example 4, 9 etc?

danzen commented 5 years ago

Hi @rexdefuror good question. You can make the object take up any number of squares but the code only handles one square per "object". So you would have to customize your code to recognize the object is on an additional square or squares. The object is placed at its registration point. So if you want the current square and the square to the right... then you would make the object as big as the two squares and have the registration point at the left of the object. If you would like to discuss further, you are welcome to join us at https://zimjs.com/slack - would love to see what you are making! Cheers.