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 yatayata

has anyone started work on a sprite atlas tool for impact? i'm working on some webgames, and having individual files for entities adds up quickly.

putting all entities in one veeryyy wide strip and using code like:

this.addAnim( 'enemy4.left', 1, [100,101], false );
this.addAnim( 'enemy4.right', 1, [102,103], false );

looks a bit daunting. having some named regions...

there are tools that will spit out json maps for sprites, has anyone looked at hooking that output up to impacts image loader?

the excellent http://www.texturepacker.com/ is also made in germany! libGDX, impact.js, achtung baby!

tx!

1 decade ago by DavidWeber

There are quite a few threads about texture atlas support, but none seems to point to any solution. Has anyone made any progress on this?

For CocoonJS, images need to be sized to a power of 2. This leads to wasting a lot of space and memory if having an image for each animation. This is one reason I want to look at implementing a texture atlas, but I obviously don't want to reinvent the wheel.

1 decade ago by StuartTresadern

I was going to create an importer for texturepacker but it’s still on my to-do list.I have not seen anyone else implement it as yet.

1 decade ago by DavidWeber

Cool I will probably take a look at it tonight, if I put together anything that's reasonable I will upload a demo and the new classes to Github.

1 decade ago by StuartTresadern

I'll be using it as soon as its uploaded to Github :). It will help will one of the issues i have with large isometric tile sets.

1 decade ago by DavidWeber

So I implemented the plugin. More info available on My Blog

1 decade ago by StuartTresadern

Excellent :) thanks for sharing.

1 decade ago by alexandre

@David
Excellent. A friend and I were wondering how to integrate tex atlases into his game 2 days ago. How fortuitous is that? Will definitely try it out and follow up.

1 decade ago by DavidWeber

It's a pleasure. I will implement the angled drawing this weekend and test the plugin properly while integrating it into my game. Please feel free to report any issues or suggestions.

1 decade ago by jessefreeman

Figured I would update this thread. David and I have been working together on getting this to work in Impact. Hope to have a really slick demo of this up very soon. Last night I implemented a new font classed based on David's atlas work. I have a gist of it up here but hopefully David and I can get it into his build very soon for everyone to use.

Here is the code https://gist.github.com/jessefreeman/4992664

This will fix font rendering issues people have seen on some devices such as Surface RT since the font can be pulled in from the atlas data.

1 decade ago by grindheadgames

Hey i used the texture atlas plugin today, but I had to fix a couple bugs. Would it be possible to add the update to this gist? https://github.com/dpweberza/ImpactJS-Plugins

I know that there is no support for it anymore but thought i'd ask, its really useful!

1 decade ago by y0ungb0b

Hey grindheadgames. What bugs did you fix? Im interested in the update.

1 decade ago by grindheadgames

the one that stopped it running was line 58 of texture-atlas.js - the url it was trying to load was null i believe because it was looking at the wrong property. Changing it to this fixed the problem, as the path variable seems to be an object containing several bits of information about the image:

var url = ig.prefix + (this.path.path.substr(0, this.path.path.lastIndexOf('.')) || this.path.path) + '.json';

1 decade ago by y0ungb0b

I took a look at this plug-in today and it works straight out of the box.

confused
Page 1 of 1
« first « previous next › last »