Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Linux? #77

Open
felipetnh opened this issue Jul 7, 2023 · 13 comments
Open

Running on Linux? #77

felipetnh opened this issue Jul 7, 2023 · 13 comments
Labels
bug Something isn't working

Comments

@felipetnh
Copy link

Anyone was able to run this on Linux?
I was able to install poetry and poetry was able to install everything.
But whenever I run "poetry run ..." it says tkinter wasn't installed.
I tried everything but couldn't get it to work.

If anyone can help me, it would be greatly appreciated.

Note: I'm running this on a VM on Linux Lite 6.4, which is derived from Ubuntu.

@felipetnh felipetnh added the bug Something isn't working label Jul 7, 2023
@lucasmonstrox
Copy link
Owner

Linux is not supported yet. I will adapt it soon.

@felipetnh
Copy link
Author

I can maybe help you port to Linux, if needed.
I still can't even get it running because of tkinter.
No matter what I do, it always says tkinter is not install.

Any insights would be greaty appreciated.

@lucasmonstrox
Copy link
Owner

Fonts are different. I noticed about it 2/3 days ago. So, I have issues detecting battle list monsters. Do you have another solution?

@GiFarina
Copy link

same on mac. maybe we can have the characters of each OS and make the images of names of the monsters the first time the program run

@felipetnh
Copy link
Author

So tkinter is being used to detect the fonts of the client?
Since I can't get it to install correctly on Linux, I'm kind of lost on its use.

I tried every tutorial I could find on installing tkinter on Linux, none seemed to work.

@lucasmonstrox
Copy link
Owner

lucasmonstrox commented Jul 11, 2023

same on mac. maybe we can have the characters of each OS and make the images of names of the monsters the first time the program run

PyTibia is little different since a pre-compute everything to reach incredible performance. Example:

https://github.com/lucasmonstrox/PyTibia/blob/main/src/repositories/battleList/images/monsters/Aggressive%20Lava.png

I already have all monsters pre-computed in an object in hash/name style like this

monsters = { hashit(loadImage('larva.png')): 'Larva', hashit(loadImage('troll.png')): 'Troll' }

When I compute monsters from battleList, I clean the "gray" from behind, slice the part of the name, make a hash to get it frommonsters variable. This is how I get "microseconds" performance and made this bot a very fast bot.

I didnt know about different fonts in OS/Linux. Im a noob player and I always played on Windows.

@GiFarina
Copy link

same on mac. maybe we can have the characters of each OS and make the images of names of the monsters the first time the program run

PyTibia is little different since a pre-compute everything to reach incredible performance. Example:

https://github.com/lucasmonstrox/PyTibia/blob/main/src/repositories/battleList/images/monsters/Aggressive%20Lava.png

I already have all monsters pre-computed in an object in hash/name style like this

monsters = { hashit(loadImage('larva.png')): 'Larva', hashit(loadImage('troll.png')): 'Troll' }

When I compute monsters from battleList, I clean the "gray" from behind, slice the part of the name, make a hash to get it frommonsters variable. This is how I get "microseconds" performance and made this bot a very fast bot.

I didnt know about different fonts in OS/Linux. Im a noob player and I always played on Windows.

Yeah. I read almost all the code. what I say is to not have the monster names folder in the repository and generate them from the characters depending on the OS. so as not to have two folders with the same for each os since there are many monsters. I don't know if I expressed my idea well

@felipetnh
Copy link
Author

same on mac. maybe we can have the characters of each OS and make the images of names of the monsters the first time the program run

PyTibia is little different since a pre-compute everything to reach incredible performance. Example:

https://github.com/lucasmonstrox/PyTibia/blob/main/src/repositories/battleList/images/monsters/Aggressive%20Lava.png

I already have all monsters pre-computed in an object in hash/name style like this

monsters = { hashit(loadImage('larva.png')): 'Larva', hashit(loadImage('troll.png')): 'Troll' }

When I compute monsters from battleList, I clean the "gray" from behind, slice the part of the name, make a hash to get it frommonsters variable. This is how I get "microseconds" performance and made this bot a very fast bot.

I didnt know about different fonts in OS/Linux. Im a noob player and I always played on Windows.

I always play on Windows too.
But for this project I installed Linux on a VM and was able to get BattlEye working for it, so it doesn't know I'm on a VM. (BattlEye doesn't allow Tibia to be played in VMs, and I couldn't get Tibia to work on a Windows VM)

So can you enlighten me on what exactly is tkinter being used for? This way maybe we can move away from this library on Linux, if needed. (since I can't get this damn thing installed)

@felipetnh
Copy link
Author

Yeah. I read almost all the code. what I say is to not have the monster names folder in the repository and generate them from the characters depending on the OS. so as not to have two folders with the same for each os since there are many monsters. I don't know if I expressed my idea well

So what you are saying is to instead of having the images already on the folder, the code compiles a list of images based on the monsters names using the OS font?
If I understood this correctly, we would still have the folder with the images, but those images would be compiled based on the OS, rather than using a pre-compiled list of images for Windows.

@lucasmonstrox
Copy link
Owner

same on mac. maybe we can have the characters of each OS and make the images of names of the monsters the first time the program run

PyTibia is little different since a pre-compute everything to reach incredible performance. Example:
https://github.com/lucasmonstrox/PyTibia/blob/main/src/repositories/battleList/images/monsters/Aggressive%20Lava.png
I already have all monsters pre-computed in an object in hash/name style like this
monsters = { hashit(loadImage('larva.png')): 'Larva', hashit(loadImage('troll.png')): 'Troll' }
When I compute monsters from battleList, I clean the "gray" from behind, slice the part of the name, make a hash to get it frommonsters variable. This is how I get "microseconds" performance and made this bot a very fast bot.
I didnt know about different fonts in OS/Linux. Im a noob player and I always played on Windows.

I always play on Windows too. But for this project I installed Linux on a VM and was able to get BattlEye working for it, so it doesn't know I'm on a VM. (BattlEye doesn't allow Tibia to be played in VMs, and I couldn't get Tibia to work on a Windows VM)

So can you enlighten me on what exactly is tkinter being used for? This way maybe we can move away from this library on Linux, if needed. (since I can't get this damn thing installed)

Tkinter is only used for UI configuration.

@lucasmonstrox
Copy link
Owner

Yeah. I read almost all the code. what I say is to not have the monster names folder in the repository and generate them from the characters depending on the OS. so as not to have two folders with the same for each os since there are many monsters. I don't know if I expressed my idea well

So what you are saying is to instead of having the images already on the folder, the code compiles a list of images based on the monsters names using the OS font? If I understood this correctly, we would still have the folder with the images, but those images would be compiled based on the OS, rather than using a pre-compiled list of images for Windows.

Yes it possible :) but the ideal is to do a check and it can be time consuming since there are 1000+ monsters.

@felipetnh
Copy link
Author

Yes it possible :) but the ideal is to do a check and it can be time consuming since there are 1000+ monsters.
I might be something to do on a first run, then it takes longer the first time, but creates the images and stores them. After that it should just load the images to the hash.

@Karniej
Copy link

Karniej commented Jul 21, 2023

Yo, is there a plan to adapt this for MacOS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants