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

OTClient 1.0

Interesting to see someone with the same idea of using GANs to produce new sprites.
I've worked and written articles about generative networks in the past, though I never really thought about using them for Tibia until now...
I think it would be quite simple really, if we could grab every sprite frame and represent it as a 2D array in Python, I could see a functional GAN using OpenAI's network that produces new animated sprites.

But, like you said, this could make spriters deviate from the community. Though, as a researcher, I am interested in this topic, and it is still my plan to go about completing that project. I just have to figure out how to extract all the sprites and the individual frames.
Here's another idea I had: there is this thread in the forum that converts OTMB maps into JS files with a specific format, which can be used to have a GAN generating Maps as well :) Though, they would be individual pieces (maybe a 20x20 map) which could then be used as a idea starter.

E alguma outra idéia, embora essa não seja tão simples, ter monstros totalmente de IA no jogo. Isso usaria o Aprendizado por Reforço, com o qual trabalhei bastante no passado. A idéia é bastante simples (pareço repetitiva): um treinamento da NeuralNetwork sob métodos RL lutará contra si mesmo (por exemplo, dois ratos lutarão entre si, um rato está lutando pela arquitetura da NeuralNetwork e o outro está treinando o arquitetura). Posteriormente, a cada iteração, o rato anterior executará a rede treinada, e assim por diante. Pense no AlphaZero, a mesma ideia:)

Não tenho muito tempo agora, porque estou trabalhando em outro artigo sobre computação molecular que deve ser concluído em menos de uma semana (não me pergunte o quão perto estou de terminá-lo! 😳). Mas, meu objetivo é concluir esses projetos.
1593834280
Então, continuo recebendo esse erro do mapview.cpp quando tento compilar o cliente

[CODE = lua] CMakeFiles / otclient.dir / src / client / mapview.cpp.o: Na função `MapView :: MapView () ':
/ usr / include / c ++ / 7 / array: 94: referência indefinida para `ViewportControl :: ViewportControl (Otc :: Direction) '
CMakeFiles / otclient.dir / src / client / mapview.cpp.o: Na função `MapView :: MapView () ':
/otclient/src/client/mapview.cpp:77: referência indefinida a `ViewportControl :: ViewportControl (Otc :: Direction) '
collect2: erro: ld retornou 1 status de saída
[/CÓDIGO]

Eu comentei a linha 129, sugerida anteriormente no tópico:
Code:
 // se (! Viewport.isValid (tile, cameraPosition)) continuar; [/ CODE]

Não entendo bem o propósito dessa linha. Se é verdade, continua. Se for falso, ainda continua ...?
De qualquer forma, aqui está a linha 77 que causa o erro:


[CODE = lua] para (int dir = Otc :: Norte; dir <Otc :: InvalidDirection; ++ dir) {
        viewport const ViewportControl (static_cast <Otc :: Direction> (dir));
        m_viewportControl [dir] = janela de visualização;
    }[/CÓDIGO]
[/CITAR]

this is to remove blocks not visible on the screen, about error, the viewportcontrol is not in the compilation list on cmake, I will put it.

Edit:

 
Last edited:
Interesting to see someone with the same idea of using GANs to produce new sprites.
I've worked and written articles about generative networks in the past, though I never really thought about using them for Tibia until now...
I think it would be quite simple really, if we could grab every sprite frame and represent it as a 2D array in Python, I could see a functional GAN using OpenAI's network that produces new animated sprites.

But, like you said, this could make spriters deviate from the community. Though, as a researcher, I am interested in this topic, and it is still my plan to go about completing that project. I just have to figure out how to extract all the sprites and the individual frames.
Here's another idea I had: there is this thread in the forum that converts OTMB maps into JS files with a specific format, which can be used to have a GAN generating Maps as well :) Though, they would be individual pieces (maybe a 20x20 map) which could then be used as a idea starter.

And some other idea, though this one is not as simple, to have fully AI monsters in the game. This would use Reinforcement Learning, which I have worked with quite a bit in the past. The idea is quite simple (i sound so repetitive): A NeuralNetwork training under RL methods will fight against itself (for example, 2 rats will fight with each other, 1 rat is fighting via the NeuralNetwork's architecture, and the other one is Training the architecture). Thereafter, on every iteration, the former rat will then execute the trained network, and so on and so forth. Think about AlphaZero, same idea
I've did it already, not only create sprites randomly with GANs but I also used a huge load of recent discovered techniques to manipulate and play with results. My biggest achievement however is recent (I just finished it to be honest), to be able to use GANSpace. A technique where we apply PCA to reduce latent vector space into meaningful changeable results, that gave me a level of control over the GAN that is freaking awesome.

I can show you a demo if you want (Night Wolf#8602) but at least for now I'll keep this 'closed' until I figure out how to use this for the good of community instead of just giving even more free stuff to leechers and ruining my chances to have spriters helping me in case I need their help in stuff that is simply too complicated to generate through GANs. There's also the problem of lack of data that constantly haunted me in my experiments but I'm still reading some papers about it.

Using GANs for mapping is actually harder than it looks like because there are way too many rules in mapping for the GAN to find out by its own, perhaps using simpler algorithms like ensembles (random forest to be exact) could produce more useful results than actually trying a lot of mixed styles that simply won't look good.

IA for monsters is something I could definetely do if tfs had python support, but there's the point of processing that it would take to unpack the pkl or pt files and control a lot of inteligent monsters. First we would need to optimize tfs to the core and then start to thinking those extra slots of processing to spend with huge IA controls in creatures.
 
the changes in Tile::getTopLookThing(), Tile::getTopUseThing() was the cause of not being able to close doors btw
 
the changes in Tile::getTopLookThing(), Tile::getTopUseThing() was the cause of not being able to close doors btw

thanks, i will compare it with the official otclient and see if i transcribed it wrong.

edit:
@emil92b
 
Last edited:
hgq9IDQ.png


minimap not drawing borders
 
hgq9IDQ.png


minimap not drawing borders

Fixed, thx

Optimization when there are many effects
fasdasda.png
Right side is the optimized

-------------------------------
The next optimization will be critical, each kind of item will have its own frame and if a change occurs it will only update the frame which it belongs. Currently all objects belong to the same frame so when it's requested to draw it actually draws all objects again.
I hope that this will reduce the cpu/gpu consumption

the branch name will be CacheForAll.
 
Cache For All in development.

oneforall2.jpg

Test Setup:
CPU: i7 4770
GPU: Intel® 4600 (rx580 disabled)
Vertical Sync Enabled
Battle Module disabled, need refactoring.
Scale: 36x28


Even fps hitting 30, is very smooth.
 
Last edited:
Great work @Mehah. Are you planning to have a look on the light system? I think @Baxnie said some time ago about caching the light for not redrawing it everytime.

Edit:
Have a look in this topic if you have time OTClient Graphics Discussion (Anyone out there more knowledgeable than me?) (https://otland.net/threads/otclient-graphics-discussion-anyone-out-there-more-knowledgeable-than-me.244015/page-6#post-2402509)
Theres some good info input from Edubart for optimizations on the client.
About light input from baxnie: Moving towards OTC (https://otland.net/threads/moving-towards-otc.238754/page-15#post-2317751)
 
Last edited:
Great work @Mehah. Are you planning to have a look on the light system? I think @Baxnie said some time ago about caching the light for not redrawing it everytime.

Edit:
Have a look in this topic if you have time OTClient Graphics Discussion (Anyone out there more knowledgeable than me?) (https://otland.net/threads/otclient-graphics-discussion-anyone-out-there-more-knowledgeable-than-me.244015/page-6#post-2402509)
Theres some good info input from Edubart for optimizations on the client.
About light input from baxnie: Moving towards OTC (https://otland.net/threads/moving-towards-otc.238754/page-15#post-2317751)

I'll take a look at the topic

About Light... ;)

However, the current implementation is very bad, it consumes a lot of processing. 😢
 
Last edited:
Thanks for this contribution!
We are needing a updated Client to use, your optimizations are really good.
In the future i want to contribute too, i'm thinking about upgrading the modules. Anyway, thanks for your efforts.

A question to everybody:
Anyone know how to enable DirectX support?
I compiled normally and runs okay, but without DirectX support only OpenGL1.
Tried to compile using some tutorials to active DirectX and can't make client open... I guess im using outdated DLLs, don't know.
Im using VS17 with VCPKG approach, what i have to do?
 
Thanks for this contribution!
We are needing a updated Client to use, your optimizations are really good.
In the future i want to contribute too, i'm thinking about upgrading the modules. Anyway, thanks for your efforts.

A question to everybody:
Anyone know how to enable DirectX support?
I compiled normally and runs okay, but without DirectX support only OpenGL1.
Tried to compile using some tutorials to active DirectX and can't make client open... I guess im using outdated DLLs, don't know.
Im using VS17 with VCPKG approach, what i have to do?
As far as i know, you need to compile it with VS15
 
Thanks for this contribution!
We are needing a updated Client to use, your optimizations are really good.
In the future i want to contribute too, i'm thinking about upgrading the modules. Anyway, thanks for your efforts.

A question to everybody:
Anyone know how to enable DirectX support?
I compiled normally and runs okay, but without DirectX support only OpenGL1.
Tried to compile using some tutorials to active DirectX and can't make client open... I guess im using outdated DLLs, don't know.
Im using VS17 with VCPKG approach, what i have to do?

Thx,
About DirectX:
Dx9 Support Layer
If you would like to enable the dx9 support layer for otclient you need to compile with the -DOPENGLES=2.0 preprocessor on Codeblocks or the OPENGL_ES=2 preprocessor on Microsoft Visual Studio 2015. Now otclient.exe will ask for libEGL.dll and libGLESv2.dll which you can get here, place these dlls in the otclient.exe folder according to the architecture (x86-64 for 64bit and x86 for 32bit) your client has been compiled for.

Note: Compiling with the dx9 support layer will probably only work on VS15.

In the last revision, I put the option to draw ground first, because some users like @sarukimoto and @Fresh , were having problems with images larger than 32x32.

To activate, just set 1 in DRAW_SEPARATELY on mapview.h

@Jakes
Some new from your old laptop, I need a weak PC to see how it's performing. :D

I also need feedback from people using version 1.0.

If anyone wants to donate, I am accepting :D.

Link: PAYPAL DONATE

Can be any value.
 
Last edited:
Found out a bug just now when you are without speed it'll try to walk on the same square too fast (you can try it yourself removing player total speed) on normal otc it just stop on the square without walking at all.
Edit: Not a bug but idle state on outfits seems not to be working on the UIOutfit i think it'll be cool to work there too.
Edit2: Found a glitch when you walk on top of any creature it'll blink the outfit like its disappearing on the normal otclient it'll not.
Edit3: The glitch which are blinking outfit is happening when you walk from the south to the north and from the east to the west. Seems to be drawing first on top of creature (when you walk) then bottom of creature (when you reach) and on top again (when staying there).
 
Last edited:
which review? yesterday there were several rendering fixes.
 
From today like 4 hours ago.
this is not a bug, you are a GM and you are passing between creatures and I put it to render in front of the last creature added and because of that, this "anomaly" happens.

Normally a normal player will not pass through a creature.

Please avoid reporting bugs here, report on github.

thx
 
Last edited:
I just saw it here, this is not a bug, you are a GM and you are passing between creatures and I put it to render in front of the last creature added, this "anomaly" happens.

Normally a normal player will not pass through a creature.

Please avoid reporting bugs here, report on github.

thx
Next one will open a issue on github. But its a bug since players can pass through others players (in PZ or with protection level) and everytime it happens this little glitch happens (maybe don't draw creature on bottom when reach the tile but just continues on top like from north to south)
 
Back
Top