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

Installation Bug #38

Closed
mazzespazze opened this issue Dec 22, 2022 · 13 comments
Closed

Installation Bug #38

mazzespazze opened this issue Dec 22, 2022 · 13 comments

Comments

@mazzespazze
Copy link

  1. expected behaviour
    Installing the game engine without troubles

  2. incorrect behaviour
    After running the php project and select step 3 "Create" the server ends up in the following error:
    Screenshot from 2022-12-22 15-02-27

  3. the operating system & version
    Ubuntu 20.04, x86_64

  4. PHP version on the server
    PHP 7.4.3

  5. MySQL / MariaDB version on the server
    8.0.31-0ubuntu0.20.04.2

@andreapavoni
Copy link

When I tried to run a TravianZ (locally, using Docker) I had similar problems but I don't remember how I solved it. At first glance, I'd say it's related to missing libraries or wrong versions of PHP/MySQL.

Try to google that error, for example, I found this SO page that might be helpful:

https://stackoverflow.com/questions/25281467/fatal-error-call-to-undefined-function-mysqli-connect

@mazzespazze
Copy link
Author

By any chance do you remember how you run the project, @andreapavoni ?
I'm using
php -S localhost:8000 but perhaps, is the wrong setup. I've never setup a PHP project. Since docker I'm usually just doing docker run X

@andreapavoni
Copy link

andreapavoni commented Dec 22, 2022

@mazzespazze I've just tried once (around 10-12 months ago) to make some tests and see how it worked, I remember I've used docker-compose (I don't want to have PHP or MySQL on my machines since 2009) and then I've used brute force to fix each error (there were many!).

The only things I remember are related to versions of PHP/MySQL that should match in some way, because mysqli_connect is present (or absent?) in some (earlier or later) versions of PHP. So, probably, I've just tried different images of PHP versions until I got it working.

OT note: I've started my own implementation of Travian game from scratch. I've initially started it in Elixir months ago (that's why I tried to run TravianZ locally), but then I got bored because it wasn't challenging enough and stopped. Lately I've started again, this time with Golang (even Rust was an excellent candidate, but it would have required too much effort to build a web app like this). The project's code is not public yet, but I already wrote 80% of the main domain logic (battle algorithm following Kirilloid's notes, buildings and upgrades, maps). It still needs db persistence (which will probably be a simple SQLite) and a web ui, but at least it has a decent test coverage and it will be easy to run/deploy for everyone, everywhere.

@mazzespazze
Copy link
Author

@andreapavoni if you plan on having an open source, please feel free to include me as well. I don't code in Elixir/RUST, mainly Java/Python, but I'm in DevOps since 5y. And I don't mind to test the UX out.

It would be cool to have a complete docker image for travian

@mazzespazze
Copy link
Author

@andreapavoni found this project https://hub.docker.com/r/smied/travianz.
It interrupts in the same spot after selecting "create". It just gets an empty white page but without any log error.

@andreapavoni
Copy link

@mazzespazze sure! I'll open source it when it's at least decently presentable in terms of game engine :-P

I'm a backender, so I already know I'm going to suffer for the UI part, but I'm planning to keep it dead simple (using hexagons, like in 2006!) and without the gold/plus stuff (monetization is not my primary goal, if it will get a decent user base I'll ask for donations or some kind of low fee).

Regarding the docker image you linked, I never heard of it. I've seen the user that uploaded that image has also published other projects, I'm not sure if they're somewhat legit or backdoored.

Finally, regarding the error, it's weird you didn't get any error or logs somewhere, have you tried to check the browser inspector? maybe some error is hidden.

@juneidy
Copy link

juneidy commented Dec 22, 2022

Probably missing the extension mysqli.

You can try a docker compose I've made for easy installation.

@Bimbimz
Copy link

Bimbimz commented Jan 4, 2023

I installed it on nginx, try it here: https://trav.bimlind.com
old memories, I played this in 2008.

@andreapavoni
Copy link

@Bimbimz thank you, I'm seeing there's some people there, maybe I'll join to check it out. I have a working local installation too (with two forks, to check differences).

Meanwhile I'm continuing development on my Go version.

@Bimbimz
Copy link

Bimbimz commented Jan 5, 2023

Thanks for joining.
I have added gold for you. It's a dedicated server

I noticed almost no bugs happening, except for building the placement of intersections and walls, it gets built in a slot when you click on it.

@andreapavoni
Copy link

andreapavoni commented Mar 1, 2023

Hey @Bimbimz, I'm writing here because I can't find another way to contact you and I'm not sure it's a bug of your server or it's also present in the main code here (if that's the case, I'll open a new issue).

It happened 2 times, and it's weird because the other villages I've conquered on this server have never behaved like that, but I remember you did some changes/fixes to the server code:

  • when conquering a village, the first wave lowers the loyalty and the troops start coming back as usual. when the second wave arrives and completes the conquering, the troops of the first wave disappear! I've lost two armies the same way, I've seen them coming back and then disappear, including the hero that needs to be revived.

  • might be related: the expansion slots of the conquered villages are always empty, maybe it's just a coincidence

  • I don't remember if it's a legit rule of Travian or not, but the oases of the conquered village become freed

@Shadowss
Copy link
Owner

Shadowss commented Aug 1, 2024

Bug solved

@Shadowss Shadowss closed this as completed Aug 1, 2024
@Bimbimz
Copy link

Bimbimz commented Aug 3, 2024

Hi bro.. this is my comment after 1.5 years from the previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants