• 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!

Converting .dat, .spr to a sprite atlas.

slavi

#define SLAVI32 _WIN32
Senator
Joined
Sep 9, 2015
Messages
681
Solutions
11
Reaction score
560
GitHub
slavidodo
The project is there
slavidodo/opentibiaunity-datspr-converter

NOTE: This is not compaitable with tibia 11, this is intended to be used in OTClient or UnityTibia..

Feel free to tweak it for faster processing..

PS: Since nobody has released the unity tibia so far (And i don't see any reason) I will do it myself, you can follow the project at github slavidodo/OpenTibia-Unity

I will not maintain it for long time, so get used to unity.

PS: The project is not yet published as it's missy and I need to refactor it then publish it.
 
I worked on something similar (just to edit sprites easily). It should be implemented long time ago in OTClient. SPR and DAT files are 20 years old crap.

.spr to folder with .png images in OTClient + loading sprites from .png files:
[DISCUSSION] 128x128 pixels Tibia sprites with AI (neural network)
JSkalskiSBG/otclient

@Under Influence
I rewrote protocolgame.cpp, datparser and network (no RSA/xtea/adler yet, but you can disable them in OT server code) from OTClient to TypeScript using WebSockets.
Right now I'm working on Rule Violation channel for GMs 'on website' and then I will try to create 'cast viewer on website'.
Did you try to render images like tibia (32x32 px) and animate them in web browser? Is it smooth?
 
I don't have time to try that since I am very busy working on my OTserver. But you can try to use them with PhaserJS, it should be able to handle them.
 
A video on getting started with the UI
// More videos will be published soon..

(I don't know what happened to the video but the quality suddenly decreased to 360)
I made sure to upload the video on 1080p


OYg5I1b.png


96wzxUv.png
 
The project is there
slavidodo/opentibiaunity-datspr-converter

NOTE: This is not compaitable with tibia 11, this is intended to be used in OTClient or UnityTibia..

Feel free to tweak it for faster processing..

PS: Since nobody has released the unity tibia so far (And i don't see any reason) I will do it myself, you can follow the project at github slavidodo/OpenTibia-Unity

I will not maintain it for long time, so get used to unity.

PS: The project is not yet published as it's missy and I need to refactor it then publish it.

hi, what command I need use to run with cmd?
UwIQdno.png


mzrNgec.png


thanks and nice tool
 
It should be implemented long time ago in OTClient. SPR and DAT files are 20 years old crap.
What are the benefits of using atlas instead of the old format .spr and .dat format? It is faster?
 
What are the benefits of using atlas instead of the old format .spr and .dat format? It is faster?
It would be hard to create any faster format as .dat and .spr are simpliest possible binary formats.
Problem is that dat/spr format specification changes between tibia versions and sprites must be 32x32 px.
It's not a problem when you develop one version of tibia ('official version' as Cipsoft does), but for OTS/OTClient where you got all tibia versions support it's a problem.

Other thing is that we got no development format for OTSes. If you want to test how looks little change in outfit in game client, you need to repack whole .spr file, not just replace on image in some folder.
 
Hello again,

It took me time to understand a lot of aspects of unity drawing, and to understand the semantics of flash client
Thus, there is already a very efficient drawer, (i have still followed the idea of drawing the whole map (18x14) instead of (15x11), then setting the UV of the resulted texture to match the preferred width.

PS: This version of OTU Client is built upon Shadowrealm's server protocol changes.
This it will be possible to play Shadowrealm within this client once it's alpha is released.

What these screenshots are showing:
1- Drawing the map correctly, objects heights, ...
2- Drawing outfits addons & colors (using a CG shader.. Hint color-masking & blending functions)
3- A diffused texture, thus using unity's lighting system
4- A responsive world UI (this is not fit to the screen as i am still researching how to do that)
5- Choosing whether the screen is pixelated or antialised (using the texture itself). The pixelated texture matches tibia's retro settings.
6- Animations working (both outfits & items)
7- Ability to screenshot the game or capture a video at maximum 60fps)

What is missing in the client?
1- Drawing Creature Status (name, health, mana, ...)
2- Light management (Light is working, but i have tested lights dynamically, i have created lights manually with correct intensity and colors for test purposes, thus we just need a manager to create/delete/modify spot/point light)
- Hint, there is a manager for every aspect of the game so the design works like that
GameManager
- WorldManager (map, tiles, effects, ..)
- LightManager
- CreaturesManager (creatures, local_player)
- AppearancesManager (protobuf appearances, appearance instances, ...)
- SpriteProvider (caching the sprites, textures, UVs, ..)
- ...<etc>...
3- The whole game ui - Inventory panels, skills, .... (There are very helpful prefabs so that creating those wouldn't take more than a few days)
4- Service protocols to maintain stats of players' sessions


Screenshots
<Smooth - Bilinear>
CpTJOT0.png


<Retro (Point filter - Non-Antiliasing)>
OPD0aAs.png
 
Last edited:
I've been trying to use your program but it either gives a Unhandled DatAttribute [136] error in old versions of Tibia or in Tibia 1098 it gives an out of memory exception.
 
Hello,
long time no see, I've just published an update that marks the future of this small application.

It's now a lot faster, it used to take up to 30~40 minutes for 1098 files, now it takes exactly 160~165 seconds (2+ ~3 minutes).

You can find that commit there

Sincerely,
Slavi
 
Back
Top