[PLUGIN] Paster

From the Asset Store
Antisuspend Plugin
$7.20 USD
20% off
Antisuspend Plugin for Construct 3 prevents the runtime from getting suspended.
  • R0J0hound,

    Because it's tricky to fix it ? Or maybe you got no time.

    By the way, thanks for clarifying.

  • Both really. The issue has been known by me since I made the plugin. It's not a trivial fix and I haven't found it to be worth the effort to attempt making it work correctly. Also as of late I don't spend much time coding.

  • > I'm trying to figure a good way to design my levels. I was considering using lots of tilemaps, that don't fill the entire layout, and overlay each other.

    > It seems like pasting all these to a paster object at beginning (then deleting the tilemaps) would improve performance, since the paster only requires one draw versus the many tilemaps with numerous draw calls.

    > Is my thinking correct, in that using a single paster object would benefit rendering in this case?

    >

    > edit: also, does it render the whole paster object even if it only shows a portion on screen? Perhaps it wouldn't help performance?

    > edit: "GPUs are also well-designed enough to only process the on-screen parts of an object that appears partially off-screen. So literally nothing outside the window area is ever rendered by the GPU."

    > So I guess it only renders what is visible.

    >

    If you have a lot of overlapping tilemaps, Paster is the way to go. Tilemaps in C2 are very slow and not all that optimized (compared to other implementations).

    Id like to test this out. My game has some overlapping tilemaps and im interested in anything that could improve performance.

    But I'm not sure how to get the tilemap information to paste into the Paster object at the beginning of each different level? Can anyone advise me how to do that pls?

  • What I did was size the paster object to the layout dimensions, and then resize the viewport to the layout dimensions, paste the tilemaps in the order I want them, then resize the viewport back to the normal size. You have to resize the viewport because tilemaps won't draw tiles that are offscreen. If you have a lot of tilemaps it may take a second or two to paste them all, which means you'll need to use something to cover up your level while it is sized to the layout so that you can't see everything. I used a separate layer with black background and I make is visible during that pasting, and then invisible when the viewport goes back to normal. I also delete the tilemaps as they get pasted.

  • Hi thanks for the reply, Ill try to replicate these steps.

    Did you notice improved performance doing this Prominent ?

  • I'm not sure what the performance difference is, but I think it improved. I have a lot of other stuff happening besides the tile/background, so most of my performance hit was due to enemy behavior stuff.

    If you use tilemap, it has to do a draw call everytime it finds a new tile, whereas if it is one paster object it uses one draw call I think. You should test it out yourself though to get better idea.

  • Nice one!

  • The amount of high quality plugins you Veterans of the community make is CRAZY!

    Thanks for the great work

  • Big thanks to R0J0hound for this plugin and all the work you've done to the C2 community!

    I was wondering in general, is it better to use multiple smaller paster objects or one big paster object (to cover solid objects for example), are there limits/experience on max amount of paster objects layout should have?

    Should paster sizes follow power of two and what is the suggested max resolution size for paster objects, say for mobile use?

  • Waltuo

    The only limits are how much video ram you have available and the maximum texture size supported by your device.

  • R0J0hound

    I'm noticing a little glitch when pasting to a lower resolution texture - seams appearing between objects.

    These seams don't appear when the resolution of the Paster object is higher, and there's no space between the objects. I could've sworn they weren't appearing before. Any ideas?

  • digitalsoapbox

    It's probably related to sampling. Maybe making the lower resolution a multiple of the higher one may help? Like if the higher res is 100x100 make the lower one 50x50 or something?

  • digitalsoapbox

    It's probably related to sampling. Maybe making the lower resolution a multiple of the higher one may help? Like if the higher res is 100x100 make the lower one 50x50 or something?

    It seems to be related to export "optimizations" C2 does. The seams don't show in preview. I really wish there were a way to turn some of that stuff off, it's not useful for desktop games.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • digitalsoapbox

    That's probably it exactly. At preview each image is seperate and after export the images are packed with one pixel outlines so they don't bleed into each other. You could try point sampling if it doesn't affect the look too much.

    You could undo the packing by loading the frames manually at runtime. Maybe also replace the packed images with a tiny image so it doesn't affect the VRAM usage.

  • digitalsoapbox

    That's probably it exactly. At preview each image is seperate and after export the images are packed with one pixel outlines so they don't bleed into each other. You could try point sampling if it doesn't affect the look too much.

    You could undo the packing by loading the frames manually at runtime. Maybe also replace the packed images with a tiny image so it doesn't affect the VRAM usage.

    I'll have to look into that. I guess I need to set the animation, then set the frame, then load from URL? And every instance of a sprite should be using the same images, correct?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)