Empty space between sprite ground images

Get help using Construct 2

Post » Tue Nov 22, 2011 3:09 pm

Hi

I have weird white spaces between png images.
I placed them as a sprite.
See print screen:
http://speedy.sh/Smk7b/empty.jpg

thx.
B
4
G
2
Posts: 48
Reputation: 1,328

Post » Tue Nov 22, 2011 4:00 pm

marcinkowski,

First, I would like to suggest that you get a Dropbox account and share files that way. It is more convenient than having to wait 30 seconds and enter a captcha to download the file (if you don't have a speedy share account, that is). This tutorial should help: upload-your-game-to-dropbox

Second, is this a screenshot from the preview within C2? If so, and you are talking about the lines between the brown squares, it appears that the sprites were not accurately placed, even though it may seem that way in the editor. I would suggest using the Snap to Grid in the editor, and make the snap size a multiple of your sprite size (i.e. if you sprite is 32x32, make the snap size 16x16 or 8x8).

I hope that helps!Wastrel2011-11-22 16:01:08
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Tue Nov 22, 2011 6:08 pm

Thanks

I have Crop transparent edges I dont see Snap to grid.
Is size 16x16 are standard. My blocks had 45x45 ;-)
B
4
G
2
Posts: 48
Reputation: 1,328

Post » Tue Nov 22, 2011 6:19 pm

Try enabling 'pixel rounding' in project properties.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Tue Nov 22, 2011 7:14 pm

Snap to grid is in the editor, under the view tab.

For 45x45 blocks, you would want 15x15 or 5x5 for a grid size. I don't think there is really a "standard" size for textures, but most people seem to use powers of 2 (2, 4, 8, 16, 32, 64, 128, etc), probably because they provide the largest number of multiples and are most easily divided into smaller pieces.

Also, what Ashley said.
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608

Post » Tue Nov 22, 2011 7:41 pm

[QUOTE=Wastrel]but most people seem to use powers of 2[/QUOTE]

It is also because of gear "limitations". Some older graphic cards can't handle no power of two textures. Recent material do handle it, but still under the form of taking (in memory) as much space a power of two.

For this peculiar example, in memory, you don't have a 45X45 texture, you have a 64X64 which only 45X45 pixels are used.
The best bet is to keep to powers of two, it helps preventing possible issues for your users.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,998
Reputation: 57,791

Post » Tue Nov 22, 2011 8:16 pm

Almost all modern hardware supports non-power-of-two textures, with one exception: WebGL fully supports non-power-of-two textures, except when you tile them in the Tiled Background object, which is because it's also designed to work on mobiles which have limited GPUs.

So you can almost forget about power-of-two textures completely, it's just it'll work a bit better to have a power-of-two texture for a Tiled Background object, for WebGL only.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478

Post » Tue Nov 22, 2011 8:17 pm

Thanks !
that's work ;-)
B
4
G
2
Posts: 48
Reputation: 1,328

Post » Tue Nov 22, 2011 8:22 pm

[QUOTE=Ashley] So you can almost forget about power-of-two textures completely...[/QUOTE]

Except for those of us with OCD who MUST use powers-of-2.
Don't see the fnords and they won't eat you!
B
75
S
16
G
12
Posts: 322
Reputation: 11,608


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, jeffige and 1 guest