how to turn off repeating texture in tilebg?

New releases and general discussions.

Post » Wed May 11, 2011 3:05 am

With the TileBG, how can I turn off the repeating texture? Like when you resize it/rotate it, you notice that it repeats the sprite over and over again. Is there a way I can turn that off?

(I'm using it instead of sprite, cause each instance of a tiledbg can have a different texture like the canvas object but canvas doesn't have Z elevation).
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Wed May 11, 2011 5:20 am

Don't think so unless you use a non power of 2 image.

Why cant you use multiple frames from a sprite?
Image Image
B
161
S
48
G
91
Posts: 7,359
Reputation: 67,273

Post » Wed May 11, 2011 8:04 am

Cause i have hundreds/thousands of images to import during runtime. But perhaps using sprites might work, I could just create hundreds of tiny sprites in the editor with paste clone (sprite1, sprite2, sprite3,..., sprite412, sprite413, etc.), I guess that's going to be the be the easiest way to do this.

Thanks for replying.
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Thu May 12, 2011 2:04 am

I think what I'll do is just use the next texture size up so I can stick with tilebgs, so instead of using 32x32 images I'll make them 64x64 (or instead of 256 I'll do 512) so that the empty space will allow for rotations without seeing the repeating texture.

Using sprites will be too limited, cause you have to use "create object by name" which doesn't allow picking. Not to mention the tedium of creating the hundreds of sprites and putting each of them into a folder.

So the massively bloated VRAM will probably be the best burden to bear.
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Fri May 20, 2011 8:38 am

What about using a sprite anyway? You could have a sprite animation with several hundred dummy frames, then iterating through the number of maximum frames you want to import / the number of maximum "slots" a.k.a. sprite frames.
Depending on your content structure, you could handle different animations per sprite style, eg. wall tile, floor, etc.
On object creation, you determine the animation name (wall, floor, etc.) + sprite skin, which is the given frame number.
Loading huge tilesets this way would also result in a bloated V-Ram, but I think that the bargain between tiled bg and sprite is not in your favor ;)
Image
B
13
S
4
G
1
Posts: 113
Reputation: 1,712


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest