• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Confused about tree sprites and sprites in general.

Arkemis

Well-Known Member
Joined
Sep 4, 2021
Messages
90
Reaction score
68
Location
United States
8.6 protocol

Tibia trees are garbage imo and the giant ones are even worse. I'm considering making my own but im confused on a few points.

Looking at the existing trees, they are 64x64 and only 1/4 of them are unwalkable with the other squares its drawn in appearing over the player when you walk behind them. How is this managed/determined? Other sprites that draw in multiple squares have multiple pieces, but not trees. What are the limits to the walk behind space? Could I do a 128x128 tree? I thought tiles had to be 32x32?

Also I know the total sprite limit is like 65k~ but I cant figure out how many existing ones there are for certain. From looking at my object builder i assume its 32K~?

I'm a decent pixel artist and I'll happily share all my work for free use. Just want to understand all the elements before I dive into spriting.
 
Last edited:
Solution
Check my above image I uploaded for more clarity.

The size of the sprite determines the offset. In the engine I made its a simple formula, I am guessing tibia client handles it the same way.

Offset = 32 - SpriteSize

Example 1 (64px):
Offset = 32 - 64
= - 32px

Example 2(128px):
Offset = 32 - 128
= -96px

The only issue you have is when you go larger than 64px, the scale can become too awkward. It will be harder to manage, for example multiple creatures which are 128px x 128px will look ugly because of overlapping.

Boy67

Intermediate OT User
Joined
Jul 4, 2007
Messages
303
Solutions
12
Reaction score
125
Location
England
Every sprite that's 32x32 are obviously drawn at the x and y its intended to with 0 offset.

64x64 tiles are drawn from top left to bottom right, but they are actually drawn at an offset. So they are drawn -32px left and top.

The initial tile for a tree is not walkable but x -1, y -1 and x and y - 1 are still walkable.

Give me a second, ill make an illustration as an example

ex.jpg
 
Last edited:
OP
OP
Arkemis

Arkemis

Well-Known Member
Joined
Sep 4, 2021
Messages
90
Reaction score
68
Location
United States
Every sprite that's 32x32 are obviously drawn at the x and y its intended to with 0 offset.

64x64 tiles are drawn from top left to bottom right, but they are actually drawn at an offset. So they are drawn -32px left and top.

The initial tile for a tree is not walkable but x -1, y -1 and x and y - 1 are still walkable.

Give me a second, ill make an illustration as an example
What determines this offset?
 

Boy67

Intermediate OT User
Joined
Jul 4, 2007
Messages
303
Solutions
12
Reaction score
125
Location
England
Check my above image I uploaded for more clarity.

The size of the sprite determines the offset. In the engine I made its a simple formula, I am guessing tibia client handles it the same way.

Offset = 32 - SpriteSize

Example 1 (64px):
Offset = 32 - 64
= - 32px

Example 2(128px):
Offset = 32 - 128
= -96px

The only issue you have is when you go larger than 64px, the scale can become too awkward. It will be harder to manage, for example multiple creatures which are 128px x 128px will look ugly because of overlapping.
 
Solution
OP
OP
Arkemis

Arkemis

Well-Known Member
Joined
Sep 4, 2021
Messages
90
Reaction score
68
Location
United States
Check my above image I uploaded for more clarity.

The size of the sprite determines the offset. In the engine I made its a simple formula, I am guessing tibia client handles it the same way.

Offset = 32 - SpriteSize

Example 1 (64px):
Offset = 32 - 64
= - 32px

Example 2(128px):
Offset = 32 - 128
= -96px

The only issue you have is when you go larger than 64px, the scale can become too awkward. It will be harder to manage, for example multiple creatures which are 128px x 128px will look ugly because of overlapping.

Thanks a lot friend! May the morning dew of your fields be most sweet!
 
Top