Shadowss / TravianZ

Travian T3.6 , BEST VERSION EVER | Server restarted ! Speed 50x , Troops 50x.
http://vacantaturism.ro/shadowss.ro/travian/
GNU General Public License v3.0
192 stars 121 forks source link

Installation Bug #38

Open mazzespazze opened 1 year ago

mazzespazze commented 1 year ago
  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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

Probably missing the extension mysqli.

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

Bimbimz commented 1 year ago

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

andreapavoni commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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:

Megabitsz commented 1 year ago

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

Hello bro, its me Bimbimz this is the same email for Bimbimz users. I don't know why GitHub detects an unregistered email.

sorry I disappeared the last few months. I'm busy building a network (router, proxy, OLT, optical fiber, LAN (RJ45), OpenWRT, Ubiquiti (AirOS) and several amlogic boards that I installed with armbian).

i plan to build my own server then make ISP port forwarding on it.

photo_2023-07-08_03-05-41

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

Yes I made changes to the server code from this script: The original Travian rule of the recently conquered village slot will be empty.

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.

I've fixed this too. there is a built-in bug of this script. troops don't disappear but troops will belong to the conqueror (if that village has a palax on the way or is in another village). on the original script it would have belonged to the conqueror. Even though the conquerors are Teutons, the troops haven't changed, they're still phalax, not clubwingers. then from here I change it (the troops will belong to the conqueror but will change the type of troops according to the tribe). but i see travian rules, the troop should disappear even if you conquer your own village. then i fix it again so the troop disappears.

in your case i think you are trying to conquer the village by yourself.

Megabitsz commented 7 months ago

https://play.bimlind.com

@andreapavoni i lost your contact. can message with travian account thx