Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by superprat

Hi,

While developing a game I realized that Mobile devices had a limitation on the size of the spritesheet - 2048 x 2048. So I have modified the animation.js with a workaround. Was wondering if I could share that code on github or such :)

or can we not share the animaton.js file publicly?

1 decade ago by amadeus

Is it modified using the Class.inject method? If so, then it should be fine.

If however, you just took the file and modified it in places, then I would recommend waiting for Dominic to weigh in on it.

1 decade ago by m1neral

Different devices have different MAX_TEXTURE sizes. iPhones/iPads these days around between 2k and 4k sheets.

I'd be curious to see your implementation. I'm targeting mobile in addition to web, myself.

While I've developed tools to manage my spritesheet creation and keep the dimensions within range, I know I'll eventually run into memory issues. That is -- I'll need to figure out a way to load/unload animation sheets on demand within Impact. There have been threads about this in the past.

Looking forward to your work.

1 decade ago by dominic

@superprat: basically what amadeus said. If you used .inject() or subclassed ig.Animation, you&039;ll only need to publish your code and that's of course totally fine. If you modified the original #animation.js, I'd rather not have that published on github. You can still post it in the Private forums here, though.

Modifying Impact's sources in place isn't such a good idea anyway, because it will make updating to newer version much harder.

If you&039;re not sure how to use #ig.Class.inject(), we can of course help with that :)

@m1neral: Ejecta supports loading of PVRTC (.pvr) compressed textures; these will demand much less RAM and may be a good alternative to shuffling textures around.

1 decade ago by m1neral

@dominic: I experimented with PVRTC + Ejecta tonight. Memory use is down considerably, but the quality is too low for my project. I'm not over my memory budget with PNGs just yet, so I'll see how far I can get before having to take other measures.

Also, thanks for Impact. I've put in hundreds of hours on this project over the last 4 or 5 weeks. I've rediscovered my love of programming again and am having a lot of fun. I hope to show off a demo by the end of December.

1 decade ago by superprat

I'm having severe memory problem with my application as well, in excess of 300MB.

Not too keen on using PVRTC textures if the difference is noticeable visually. Will have to look into it though the way memory usage is going..

I'm going to publish the animation.js file in the private forums as I have modified the file directly. Perhaps you'll can help me convert it into a plugin :)

I'm also making some changes to cycle images in and out of memory to help with the memory usage issues. Perhaps we can combine everything to make an ejecta plugin.

Here's the link on the private forum: http://impactjs.com/forums/private/modified-animation-js-to-create-animationsheets-from-multiple-images
Page 1 of 1
« first « previous next › last »