Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+2)

We were just having a discussion about improvements to general image compositing performance that may positively impact your use-case once v1.72 comes out.

You may also find performance is much better if you copy[] out a screen-sized chunk of a large canvas and paste[] it to a smaller canvas or card background image using coordinates that change over time instead of scrolling the large canvas (which necessarily updates every pixel) in-place. I'd be happy to work up an example if you need more detail.

The maximum size for widgets is currently 4096x4096 pixels, but I'd expect performance to be abysmal if a deck contained widgets that were close to that big on both axes!

Wait, do you mean do not use ZAZZ scroll and instead move a physical canvas over another image is less 'intense' computationally? Or is am I misunderstanding?

(1 edit) (+1)

The zazz.scrol[] function is a thin wrapper around image.translate[], which updates every pixel of an image in-place.

Given a large source canvas/image that you want to scroll and a comparatively small window that you want to be visible at any given time, it is much less work to leave the source canvas static and copy out a window from a varying position than it is to scroll every pixel of the entire source canvas and then have Decker's compositor implicitly clip off the parts that are outside the card. See the example below.