backup

Dima353
2025-02-11 00:23:17 +03:00
parent 9f30458324
commit 4025f5d0f6
13 changed files with 334 additions and 1 deletions
+30
@@ -0,0 +1,30 @@
This wiki page shows how to build re3 on FreeBSD on a amd64/x86_64 system. Tested on FreeBSD 12.2-RELEASE. Building on different architectures has not been tested and you might have to rely on adjusting the packages and code yourself. In case of issues, fill an issue on github to be reviewed by one of the re3 developers.
* Get the required packages by either building them in the `/usr/ports` directory or installing them via ``pkg``:
`$ pkg install git premake5 gmake glfw glew openal-soft mpg123 libsndfile libsysinfo`
Disclaimer: you need to get premake5, there are also other premake versions available, only premake5 is supported. You will also need GNU make and not the built-in BSD make. (Library libsndfile is optional.)
* Run `$ git clone --recursive https://github.com/GTAmodding/re3.git` to clone the project to your PC
* Enter the newly created `re3` directory and run `$ premake5 --with-librw gmake2`, remember to use premake5 you either have built in `/usr/ports` or installed it via `pkg`
* Enter the ``build`` directory and run ``$ gmake help`` to see a help message with supported build configurations. As of now, refer to one of the available configurations:
- ``debug_bsd-x86-librw_gl3_glfw-oal``
- ``debug_bsd-amd64-librw_gl3_glfw-oal``
- ``debug_bsd-arm-librw_gl3_glfw-oal``
- ``debug_bsd-arm64-librw_gl3_glfw-oal``
- ``release_bsd-x86-librw_gl3_glfw-oal``
- ``release_bsd-arm-librw_gl3_glfw-oal``
- ``release_bsd-arm64-librw_gl3_glfw-oal``
* Compile librw and re3 by running ``$ gmake CC=clang CXX=clang++ config=(your configuration goes here)``
* In case you didn't copy some of the required gamefiles, copy all content from ``re3/gamefiles/`` to the game root directory
* (If you didn't set GTA_III_RE_DIR env. variable) Revisit the `re3` directory, go to `bin` and find the appropriate `re3` binary you just compiled, and copy it to your game folder with GTA3 inside
* Play the game by running ``$ ./re3``
Remember that re3 is an actively developed project which doesn't have a final version, so in case you'd like to get the game updated you have to reproduce the steps above.
+43
@@ -0,0 +1,43 @@
This wiki page shows how to build re3 on various Linux distros. Tested on x86, x86_64, arm64 architectures, and GCC 7.5.0, 8.3.0, clang 10.0 compilers. In case of issues, fill an issue on github to be reviewed by one of the re3 developers.
You need libraries and headers of;
- openal / libopenal-dev
- GLEW / libglew-dev (i386 unavailable on apt after Ubuntu 19.10)
- glfw / libglfw3-dev (min. 3.3 is required, i386 unavailable on apt after Ubuntu 19.10)
- libsndfile1-dev (*Caution:* install this before libmpg123-dev, optional)
- libmpg123-dev
and compilers set up, i.e. for Ubuntu you should install `build-essential`.
## Steps
* Run `$ git clone --recursive https://github.com/GTAmodding/re3.git` to clone the project to your PC
* Enter the newly created `re3` directory;
* If you're on x86/x86_64, run `$ ./premake5Linux --with-librw gmake2`.
* If you're on i.e. arm/arm64, you need to build your own premake5 from source. Then you can proceed to running premake5 with `--with-librw gmake2` arguments.
* Enter the ``build`` directory and run ``$ make help`` to see a help message with supported build configurations and architectures. As of now, refer to one of the available configurations:
- ``debug_linux-x86-librw_gl3_glfw-oal``
- ``debug_linux-amd64-librw_gl3_glfw-oal``
- ``debug_linux-arm-librw_gl3_glfw-oal``
- ``debug_linux-arm64-librw_gl3_glfw-oal``
- ``release_linux-x86-librw_gl3_glfw-oal``
- ``release_linux-amd64-librw_gl3_glfw-oal``
- ``release_linux-arm-librw_gl3_glfw-oal``
- ``release_linux-arm64-librw_gl3_glfw-oal``
* Compile librw and re3 by running ``$ make config=(your configuration goes here)``. If you want you can change compiler with setting `CC` and `CXX`.
* In case you didn't copy some of the required gamefiles, copy all content from ``re3/gamefiles/`` to the game root directory
* (If you didn't set GTA_III_RE_DIR env. variable) Revisit the `re3` directory, go to `bin` and find the appropriate `re3` binary you just compiled, and copy it to your game folder with GTA3 inside
* Play the game by running ``$ ./re3``
You can expect poor performance if you're not using Nvidia/AMD drivers. (At least it was in my case with my iGPU)
Remember that re3 is an actively developed project which doesn't have a final version, so in case you'd like to get the game updated you have to reproduce the steps above.
Struct sizes are different then on Windows, so don't enable validating struct sizes. Needlesly to say, your previous savegames will be incompatible.
+45
@@ -0,0 +1,45 @@
This wiki page shows how to build re3 on AMD64 and ARM64 Macs. In case of issues, fill an issue on github to be reviewed by one of the re3 developers.
You need libraries and headers of;
- openal
- glfw (min. 3.3 is required)
- mpg123
to be installed via Homebrew or MacPorts.
## Steps
* Copy all the game contents to another directory. GTA Mac versions are packaged inside some kind of Wine wrapper, make sure you only copy the game directory's itself which should be something like "~/Library/Application Support/Steam/steamapps/common/grand theft auto iii/Grand Theft Auto III.app/Contents/Resources/transgaming/c_drive/Program Files/Rockstar Games/Grand Theft Auto III".
* Switch to another directory which you will use for building premake5, and build your own premake5 from source (Not explained in this tutorial).
* Switch to a directory you want to use for building re3, and run `$ git clone --recursive https://github.com/GTAmodding/re3.git` to clone the project to your PC.
* Enter the newly created `re3` directory.
* Move premake5 binary to here, and run it with `--with-librw gmake2` arguments.
* Enter the ``build`` directory and run ``$ make help`` to see a help message with supported build configurations and architectures. As of now, refer to one of the available configurations:
- ``debug_macosx-arm64-librw_gl3_glfw-oal`` (for Apple ARM CPU)
- ``release_macosx-arm64-librw_gl3_glfw-oal``
- ``debug_macosx-amd64-librw_gl3_glfw-oal`` (for Intel CPU)
- ``release_macosx-amd64-librw_gl3_glfw-oal``
* Compile librw and re3 by running ``$ make config=(your configuration goes here)``. If you want you can change compiler with setting `CC` and `CXX`.
* In case you didn't copy some of the required gamefiles, copy all content from ``re3/gamefiles/`` to the game directory you just copied from Steam files.
**Beware:** You should select "Replace" if MacOS asks you what it should do with existing files.
* (If you didn't set GTA_III_RE_DIR env. variable) Revisit the `re3` directory, go to `bin` and find the appropriate `re3` binary you just compiled, and copy it to your game folder with GTA3 inside.
* If the resulting binary has ".app" extension, remove it.
* Give `re3` binary "executable" permission, and use xattr to remove "quarantine" extended attribute, game won't run without:
> sudo chmod a+x re3
sudo xattr -r -d com.apple.quarantine re3
* Play the game by running ``$ ./re3``
You can expect poor performance on intermediate resolutions, since there is some unknown scaling going on under the hood.
Remember that re3 is an actively developed project which doesn't have a final version, so in case you'd like to get the game updated you have to reproduce the steps above.
+48
@@ -0,0 +1,48 @@
### Quick Guide
The easiest way to compile and run `re3` is to first [install](https://visualstudio.microsoft.com/downloads/) Visual Studio 2015 or later in your machine. You need to make sure you also download the "Desktop development with C++" additional package as shown in the image below.
<p align="center"><img src="https://i.imgur.com/GFoyUCe.png" width="520" alt=""/><br><sup>Visual Studio Installer: C++ Tools</sup></p>
You'll need `git` installed in your computer to pull the code. You can get it [here](https://git-scm.com/download/win).
Then open Command Prompt and change directory (`cd`) to a path where you would like to store the code like `C:\Windows`. Don't forget to include the **--recursive** parameter. Otherwise additional dependencies won't be downloaded and the code will not compile.
<p align="center"><img src="https://i.imgur.com/b2j0gBT.png" width="520" alt=""/><br><sup></sup></p>
You should also use `setx` to define the directory where GTA is installed in your computer. Usually it's in `C:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto 3`. This is necessary to copy the `re3` executable into GTA 3 directory after each build.
<p align="center"><img src="https://i.imgur.com/P12h5ka.png" width="520" alt=""/><br><sup></sup></p>
If the clone succeed then a folder called `re3` will be created. You can just `cd re3` or open with the File Explorer. You can click one of `premake-vs<X>.cmd` files to generate the VS solution files. In my case, as VS 2019 is installed, then it would be `premake-vs2019.cmd`.
<p align="center"><img src="https://i.imgur.com/zvzCsRV.png" width="520" alt=""/><br><sup></sup></p>
A `build` folder will be created. Open it and click at `re3.sln` file to open the project.
<p align="center"><img src="https://i.imgur.com/H5hteju.png" width="520" alt=""/><br><sup></sup></p>
You should see a window that looks like this. Let's choose `win-x86-librw_d3d9-oal` configuration to get started. Either press `F7` key into your keyboard or go to `Build > Build Solution` menu entry.
<p align="center"><img src="https://i.imgur.com/9ayMXJO.png" width="520" alt=""/><br><sup></sup></p>
Now you must copy some extra `DLL` files to your GTA installation directory. Copy both of `vendor/mpg123/dist/Win32/libmpg123-0.dll` and `vendor/openal-soft/dist/Win32/OpenAL32.dll` there like shown in the image below. Also note: your game directory should be as vanilla as possible. In other words, don't install any modifications (e.g. CLEO), otherwise the game may crash.
<p align="center"><img src="https://i.imgur.com/hyl8UTd.png" width="520" alt=""/><br><sup></sup></p>
If you compile the "Debug" variant the executable will be only named `re3.exe`. The "Release" one will be `re3-release.exe`. Note that both `libmpg123-0.dll` and `OpenAL32.dll` are copied into the game folder.
### Premake Options
The basic syntax to generate the build files using [premake](https://premake.github.io/) is: `premake5 COMMAND [options...]`. The command can be any of `vs<X>` (e.g. `vs2019`). The options are listed below:
- `with-librw`: compile using the [open source](https://github.com/aap/librw) RW implementation by aap. This will require the dependency to be present at `vendor/librw`
- `with-asan`: build with [address sanitizer](https://en.wikipedia.org/wiki/AddressSanitizer)
- `with-lto`: build with [link time optimization](https://en.wikipedia.org/wiki/Interprocedural_optimization#WPO_and_LTO)
- `glfwdir64`: specify the path to GLFW 64-bit installation directory (where you unpacked the .zip file)
- `glfwdir32`: specify the path to GLFW 32-bit installation directory
- `no-git-hash`: disable generating the repository hash every build
- `no-full-paths`: don't print [full paths](https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2010/027c4t2s(v=vs.100)) into binary (windows only)
If you want to compile with [GLFW](https://www.glfw.org/), then you must specify `--glfwdir<X>`. If you unpack the zip file into the `vendor` folder, then this won't be necessary.
You can also run `premake5 --help` to view a full list of options.
+13
@@ -0,0 +1,13 @@
Reason why unlocking frames above 30 is causing problems is caused by engine's assumption that framerate is constant. (Tickrate is 20Hz, so each frame is 50ms long.) So when you unlock framerate, then everything which is using this assumption is accelerated.
List:
* `m_FrameCounter` inside `cAudioManager`
***
### User reported things
niobium93
The water splashes behind boats, splashes when driving through puddles and smoke coming off of damaged cars renders wrong without the frame limiter. Smoke also disappears when driving fast and I swear once I couldn't even see the flames before my car exploded, though I can't reproduce that.
[Video with giant water splash effects behind boats](https://www.youtube.com/watch?v=V5NLizJ7YLw)
[Video with a smoking car](https://www.youtube.com/watch?v=_rzZE5W-LwI)
+2
@@ -0,0 +1,2 @@
Useful stuff:
* https://github.com/GTAmodding/re3/commit/599164006a9e7eb7328fc194c9bae1acbb2c887d
+33 -1
@@ -1 +1,33 @@
Welcome to the re3 wiki!
Welcome to the `re3` wiki!
## Extra Features
Alongside the original game code, `re3` implements features and improvements that make the game accessible in a many modern configurations.
### Map View
All [releases (.zip)](https://github.com/GTAmodding/re3#installation) includes a custom file called `models/menu.txd`. To enable this feature you must replace it in the game directory. Once done that, a "Map" option will be enabled in the Main Menu (the one when you pause the game). As shown in the figure below, the player can navigate the map and place custom way-points (a gray blip) with mouse right button.
<p align="center"><img src="https://i.imgur.com/LsrJ2p4.png" width="300" alt="Map View"/><br><sup>Image 1: VC's map view in action (backported to III)</sup></p>
### Debug Menu
Debug menu provides a series of in-game settings that can be toggled by the user using the mouse. It can be activated by pressing `Control+M`. The following image (1) shows what it looks like. The code that implements this module can be found in `src/extras/debugmenu`{[.cpp](https://github.com/GTAmodding/re3/blob/master/src/extras/debugmenu.cpp) [.h](https://github.com/GTAmodding/re3/blob/master/src/extras/debugmenu.h)}.
<p align="center"><img src="https://i.imgur.com/GQyUEtX.png" width="300" alt="Debug Menu"/><br><sup>Image 1: Debug Menu in action</sup></p>
## Derived Work
### Platform Ports
* Nintendo Switch: https://github.com/AGraber/re3-nx
* PlayStation Vita: https://github.com/TheOfficialFloW/re3
* Wii U: https://github.com/GaryOderNichts/re3-wiiu
### Features
* [modloader](https://github.com/thelink2012/re3/commits/re3-modloader) by `@thelink2012` - load mods assets (e.g. textures) from a folder without replacing the original game files
### Guides
* [reVC: Graphical Settings](https://hackmd.io/fd3AO6WERxawedSooMvvmg) by `@IlDucci` - comparison with images showcasing the differences of each graphics setting
* [reVC/3: Files Required to Play](https://hackmd.io/fIKsJ4BaSoWV3sEF2lgQhg) by `@IlDucci` - which files do you need in each version of the game (e.g XBOX or PS2) in order to play `re3/VC`
+20
@@ -0,0 +1,20 @@
A PS2 port may be a bit pointless but also really cool.
Here is what would have to be done for the whole thing:
- reverse and use custom IOP modules. cdstream.irx, musicstr.irx, sampman.irx
- use sony IOP modules (padman &c.)
- probably use original 3.1 or 3.5 RW for PS2 (librw would need a lot of work)
- modify RW like R* did (RpGeometry allocation, skyFread, what else?)
- CDma, anim update in SPR
- CTimer
- CFileMgr and bits of CStreaming
- VU0 code for some math functions
- probably a bunch of debugging stuff for sanity?
- we currently assume `not _WIN32 == POSIX`, implement POSIX macros to differentiate it
Check https://github.com/GTAmodding/rwtest for some stuff
- uses RW 3.1
- cdstream implemented and working
- skyfs uses cdstream
- CFileMgr done (uses skyfs)
- simple pad handling. proper CPad should be trivial
+13
@@ -0,0 +1,13 @@
# General
* runtime arguments
* PS3 port maybe?
# Gameplay
# Graphics
* runtime switching d3d9 <-> openGL (aap: very unlikely to happen)
* interpolation
# Audio
* runtime switching mss <-> openAL
* decoding in separate thread
# Frontend
* mipmaps
* anisotropic filtering
+13
@@ -0,0 +1,13 @@
Xbox III and VC:
- ~~screen droplets (aap)~~, what about blood? (TAG?)
- cutscene hands (aap or Fire_Head)
- particles (probably Fire_Head)
- make custom pipes work with new renderer (and port to re3)
- menu? probably not though
Xbox vehicle pipe:
- render less expensive and better env map
- possibly even a sphere map
Mobile:
- matfx maybe?
+11
@@ -0,0 +1,11 @@
You have to copy 3 DLLs from their corresponding folders to GTA3 root folder.
DLLs you should use vary depending on architecture(32/64 bit) of your build, so here is a guide to find them;
- libmpg123-0.dll - `re3/vendor/mpg123/dist/Win(32|64)`
- libsndfile-1.dll - `re3/vendor/libsndfile/dist/Win(32|64)`
- OpenAL32.dll _(yes, it has 32 no matter what)_ - `re3/openal-soft/dist/Win(32/64)`
Missing libmpg123-0.dll or libsndfile-1.dll will throw "DLL missing" error at the start, so you'll know it.
Missing OpenAL32.dll will give assert(if asserts are enabled, otherwise it will crash the game) on start.
+9
@@ -0,0 +1,9 @@
### Introduction
This page contains common problems our users face when they attempt to run `reGTA`
1. Assertion Failed `pMC != nil`
<p align="center"><img src="https://i.imgur.com/edPnEvk.png" width="300" alt="Map View"/><br><sup>Image 1: RE3 Assertion <code>win.cpp:1179</code></sup></p>
Solution: Set `NoMovies = 1` into the `reGTA` configuration file (`.ini`) of the game directory. For example, for `reVC`, edit `reVC.ini` file.
+54
@@ -0,0 +1,54 @@
ID ranges
map file formats
paths
cullzones removed
occlusion
streamed ifp
streamed col
bikes
helis
trains removed
different ped hierarchy
different timecycle
different handling
ped attractors
ropes
water creatures
wind modifiers
...
Proposal for evolution strategy:
```
phase 1 (III with VC improvements): (DONE)
- implement new path system (DONE)
- remove treadables &c.
- ifdef BRIDGE (DONE)
- ifdef TRAINS (DONE)
- remove cullzones (DONE)
- put col files into cdimage (DONE)
- implement col store (DONE)
phase 2 (VC map with everything else III): (DONE)
- create VC map cdimage (dff, txd, col) (DONE)
- replace map files with VC ones (also zones) (DONE)
- implement the slightly new file formats (DONE)
- move map sectors (ifdef for LCS) (DONE)
phase 3:
- redefine model indices (DONE)
phase 4 (cars): (DONE)
- replace car definitions with VC (DONE)
- handling.cfg (ignoring values, otherwise DONE)
phase 5 (peds):
- replace ped definitions with VC (DONE)
- various data files too (DONE)
- implement new node hierarchy (DONE)
- remove separate head and hand code
TODO:
audio
script
particles (probably not a huge issue)
```