[PLUGIN] Sprite sheet

Post your completed addons to share with the community

Post » Sun Nov 10, 2013 4:21 pm

Yeah it's working now :) Just had to re-download.
Image
B
242
S
29
G
13
Posts: 1,787
Reputation: 18,685

Post » Tue Mar 04, 2014 6:05 am

Not sure if this is working as intended but just FYI, this doesn't wrap correctly when the offset causes a wrap. E.g. one easy way to reproduce is to make the subwidth the same as the texture size, then offset x by some amount. I was planning to use this to randomly sample different parts from one repeating texture to procedurally generate some content but it seems like I'll have to pad my texture with itself on all sides if this is the intended behavior.

EDIT: The problem seems to only happen in the editor. It looks like it's correctly wrapping in game.
B
11
S
2
G
3
Posts: 283
Reputation: 1,968

Post » Sun Jun 22, 2014 8:14 am

Hello the plugin works wonders. It really should be added to official construct build. Actually i don't know why it haven't been added already.
One question i have - when offsetting there is a small, like "jump" or a notch. To eyes, it looks like the image would jump forward and then jump back. Thats when i offset with "SpriteSheet.offsetX-10" method. The notch happends every 0,5-1sec and is not FPS related (the FPS was 60 all the time without any even slightest drop). This jump happends regardless if i base the offset OF the offset or variable and regardless of how high the offsetting speed is.
Also the size of the graphics and the object in editor seems to not affect the "jump".
Tested in Nodekit, Chrome and Firefox. The jump is best visible when running in Chrome.
One thing that comes to my mind which would be the final touch is adding IMAGE angle and coresponding actions/expressions. You know, so i can change the angle of the image ONLY.
Beside that - i am full of awe. As always with you R0J0. :)
Sorry for typos and whatnot - i just woke up.
B
28
S
8
G
7
Posts: 643
Reputation: 6,457

Post » Wed Jun 25, 2014 3:36 pm

Thanks. This will be extremely useful for me.
B
4
Posts: 4
Reputation: 208

Post » Fri Jun 27, 2014 7:53 pm

@irbis
I don't notice any jump, but I guess it depends on what you did.
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754

Post » Wed Jul 09, 2014 9:23 am

Just curious how this works on canvas2d and what is preventing it to be official blugin is that it is hard to make it work on that. Reference to what Ashley said here https://www.scirra.com/forum/viewtopic.php?f=146&t=84356&p=679396&hilit=offset+for+tiled+background#p679396. Or is it just the issue if it would behave as Tiled Background. Meaning you could use different textures for same object type.

Not sure if it's a good practice to load every frame from url using Tiled Background. What I had in mind is isometric game using a lot of images and I don't feel comfortable putting everything inside the exe as separate Sprite objects.

For example on Flare the images take about 86 MB and it's not very big game.
B
34
S
9
G
3
Posts: 517
Reputation: 5,206

Post » Sun Aug 03, 2014 4:17 am

Hi,
Late reply but the main difference between this and the tiledbg is tiledbg repeats the texture and this plug does not. It works with a single drawimage call with a sub rectangle, nothing fancy.
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754

Post » Thu Dec 04, 2014 5:22 pm

Just discovered this great plugin!

I was wondering though, could this also be made to have a unique texture per instance like the tiled background object does? Or offset added to the tiledbg for that matter. Like others have mentioned this would make it extremely useful for loading tilesets dynamically.

I'm asking to get at least a vague idea of what is and isn't feasible as I'm looking into textured objects. Thank you!
B
22
S
6
G
10
Posts: 1,034
Reputation: 7,514

Post » Tue Dec 09, 2014 5:08 pm

@R0J0hound I was messing with your plugin and managed to get unique textures per instance by mostly just removing 'type' in the runtime.js in some places where it occurs. Apart from breaking the initial texture (it's just black now), it does load new images fine and works as expected as far as I can tell.

Are there reasons why the Sprite sheet plugin doesn't use unique textures per instance or did it just happen to come into existence like that? Because I would deem it much more useful with unique textures, for the often mentioned reasons like dynamic use of tilesets.

I guess I would like to suggest to you to change your plugin to have unique textures per instances or release an alternative plugin that does. I'm very much convinced you know what you're doing and therefore I'd rather much use something you made than my own mutilated version of your stuff. 8-)
B
22
S
6
G
10
Posts: 1,034
Reputation: 7,514

Post » Tue Dec 09, 2014 5:34 pm

It was intentional to have all the instances share the same image. So say you have 100 instances then they would all share the same image. The issue of having a different image per image for tilesets is the image would be duplicated needlessly and consume memory.

A better solution would be to have multiple textures in the type (like animations) so you could just specify which spritesheet per instance. That way the texture wouldn't be duplicated needlessly.

No ETA on making such a change though.
B
91
S
31
G
103
Posts: 5,234
Reputation: 67,754

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 2 guests