Adam's Lair Forum

game development and casual madness
It is currently 2018/12/12, 21:52

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2018/07/25, 06:34 
Novice Member
Novice Member
User avatar

Joined: 2017/03/11, 16:51
Posts: 10
Role: Hobbyist
Very sorry if I am in wrong section but I have a problem... As you can see in this image:
http://prntscr.com/kanydb
(It wouldn't let me use the IMG address because it's to long)
I have 105 tiles, when I should have around 20. How do I fix this? Am I Doing something wrong?


Top
 Profile  
 
PostPosted: 2018/07/25, 07:22 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 880
Location: Italy
Role: Hobbyist
Are you sure they are 32x32 (TileSize)? They look way bigger than that..

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2018/07/25, 16:31 
Novice Member
Novice Member
User avatar

Joined: 2017/03/11, 16:51
Posts: 10
Role: Hobbyist
Maybe? I don't know it might be something else. I tried 16 x 16, 64 by 64. But they still have 105 tiles.


Top
 Profile  
 
PostPosted: 2018/07/25, 21:53 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 880
Location: Italy
Role: Hobbyist
Ah.. I see that if you increase the tile size the texture gets scaled?? honestly I'm not sure this is the right thing that should happen.. probably Adam would know more

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2018/07/26, 17:33 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2063
Location: Germany
Role: Professional
Hey there,

Tilesets have more than one tile size. This has led to some confusion, but it'll hopefully make sense after the explanation: First, there's the TileSize property in the Tileset Resource itself, the one you have edited:

Image

This size specifies how big, in world units, tiles are when painting them onto a Tilemap, generating world collision info, or rendering them. Increasing this would result in your actual Tilemap instances appearing bigger or smaller. You can still scale your Tilemaps of course, but this is where they get their base size.

Second, there is the SourceTileSize property in each Visual Layer of a Tileset Resource, which you'll find in the Tileset editor:

Image
Image

This size describes how big, in pixels, a single tile is in the source Pixmap of that layer. Increasing this will result in using bigger chunks of the image for a single tile, reducing the number of extracted tiles and increasing the number of pixels in each one.

In more complex scenarios, you'd be able to have different source tile sizes for different layers and a completely independent world unit size in order to control rendering resolution and, for example, specify 1:1 color data, but half resolution normalmaps.

Generally, things are much simpler though: In order to render all the tiles 1:1 from pixels in world units, you just need to set both properties to the same value.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2018/07/27, 00:14 
Novice Member
Novice Member
User avatar

Joined: 2017/03/11, 16:51
Posts: 10
Role: Hobbyist
I made a new tileset and it works now.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group