lsalzman / tesseract

Tesseract - repo moved to http://tesseract.gg
188 stars 29 forks source link

[Question] Do you have a tesseract sauerbraten available for download that can build properly?? #33

Closed 2-bithacker closed 2 years ago

2-bithacker commented 2 years ago

Do you? If there was one, it would be amazing! I have been a big sauer fan for a while and if you had sauerbraten powered by tesseract like the video, it would be the ultimate videogame.

Calinou commented 2 years ago

I've gotten this repository's latest commit as of writing (https://github.com/lsalzman/tesseract/commit/7dc2087a87b54e16e9fa52b7d2f33952c1e86c34) to compile on Fedora 34 with GCC. The only change I had to make to the source code is here, as the SDL Mixer API has changed since: https://github.com/lsalzman/tesseract/blob/7dc2087a87b54e16e9fa52b7d2f33952c1e86c34/src/engine/sound.cpp#L194

Replace line 194 with:

if(musicrw) music = Mix_LoadMUS_RW(musicrw, NULL);

You will need the packages/ folder from a Sauerbraten Collect Edition installation (not the latest 2020 edition!). You can extract it from the Linux download using 7-Zip or similar.

Tesseract should build and run successfully with the above change, but you'll notice a few things:

I have a fork with some fixes included: https://github.com/Calinou/tesseract

I'll see if I can further improve compatibility with Sauerbraten Collect Edition, and eventually provide precompiled builds using GitHub Actions or similar.

2-bithacker commented 2 years ago

Thanks gigatons!

2-bithacker commented 2 years ago

Do you happen to know how to fix this 2022-02-15_16 58 44_ot_ffa 2022-02-15_16 59 39_ot_ffa ?

2-bithacker commented 2 years ago

See? The guy is sideways. What is wrong?

Calinou commented 2 years ago

See? The guy is sideways. What is wrong?

I just fixed the texture scale and model rotation to match the expected Sauerbraten values in my fork. Try running git pull and compile it again.

PS: In the future, please use the Edit button (located behind the icon in the top-right corner of your comments) instead of multi-posting.

Calinou commented 2 years ago

I am embarassed to ask this, but in what directory do I run git pull? Do I just do it in the cd or in the tesseract folder? The fork does not seem to compile at all.

You can run git pull anywhere in the cloned fork repository, then compile it by running make && make install in the src folder. (You can also use make -C src install from the root Tesseract directory if you don't want to cd src first.)

2-bithacker commented 2 years ago

Thank you, but it said it was up to date, and the guy is still sideways. like the bullet goes the right direction, but te model itself is messed up. Is it somewhere in the playermodel data?

Calinou commented 2 years ago

Thank you, but it said it was up to date, and the guy is still sideways.

Did you compile Tesseract from source again? The change is in the C++ source, not in the model files.

2-bithacker commented 2 years ago

yeah. Could you point out to me the names of the changed files? I tried building the fork and it didn't work at all. Here are the errors. optiplex780@super-OptiPlex-780:~/Downloads/tesseract-master(2)/tesseract-master/src$ make install cd enet; ./configure --enable-shared=no --enable-static=yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes ./configure: eval: line 2430: syntax error near unexpected token(' ./configure: eval: line 2430: ${SHELL} /home/optiplex780/Downloads/tesseract-master(2)/tesseract-master/src/enet/missing --run true' make: *** [Makefile:150: enet/Makefile] Error 2 optiplex780@super-OptiPlex-780:~/Downloads/tesseract-master(2)/tesseract-master/src$

Calinou commented 2 years ago

@2-bithacker Does it work if you run git revert --no-edit 1bdcb6c8722aaa8a6865006216fec90c1963c735 then compile again?

(By the way, which Linux distribution are you using? src/enet/configure was automatically modified by my Fedora 34 setup when compiling, so I committed it.)

2-bithacker commented 2 years ago

the git revert --no-edit 1bdcb6c8722aaa8a6865006216fec90c1963c735 gives the error fatal: not a git repository (or any of the parent directories): .git I am running ubuntu 22.04.

Calinou commented 2 years ago

the git revert --no-edit 1bdcb6c8722aaa8a6865006216fec90c1963c735 gives the error fatal: not a git repository (or any of the parent directories): .git

You need to run that command within the cloned Tesseract repository (my fork, specifically).

2-bithacker commented 2 years ago

It said

error: your local changes would be overwritten by revert. hint: commit your changes or stash them to proceed. fatal: revert failed

Not my repo, so I can't commit the changes.

Calinou commented 2 years ago

It said

error: your local changes would be overwritten by revert. hint: commit your changes or stash them to proceed. fatal: revert failed

Run git reset --hard before running the git revert command I mentioned. If that doesn't suffice, run git clean -dfx, but beware as this will remove all untracked files within the Tesseract repository (including your compiled binary and packages/ folder).

Not my repo, so I can't commit the changes.

You can commit changes to a Git repository without having write access to the repository in question. However, you can't push those changes.

2-bithacker commented 2 years ago

That did it!! THANKS!! The RD Sauerclan will be VERY pleased! (don't worry, no cheating will happen) Thanks!!!