Reformatted documentation and readme.

master
Auri 2020-11-04 16:59:10 -08:00
parent 376593a9f1
commit 8decf3462d
6 changed files with 157 additions and 129 deletions

View File

@ -10,6 +10,7 @@
<file path="$PROJECT_DIR$/lib" />
</libraryRoots>
<excludeRoots>
<file path="$PROJECT_DIR$/.github" />
<file path="$PROJECT_DIR$/.idea" />
<file path="$PROJECT_DIR$/Libraries" />
<file path="$PROJECT_DIR$/cmake-build-install" />

View File

@ -1,38 +0,0 @@
# Linux Building Manual
## Guide for Debian 10 (and or apt\[-get\] based systems)
### Install Dependancies
`sudo apt install freeglut3-dev liblua5.3-dev libnoise-dev libglm-dev libglew-dev libglfw3-dev libenet-dev libassimp-dev zlib1g-dev`
### Configure CMake
`cmake .`
### Build it
`time make -j<number of cpu threads>`
## General Instructions
### Executing The Client
`./Zepha`
### Executing The Server With Specified Subgame
`./Zepha --mode=server --subgame=subgame_name`
Have fun.
## Copy and Paste Template For UNIX-like systems
```
## Guide for Your Distro/Package Manager Here:
### Install Dependancies
`sudo ??? ?? ?? ?? ??`
### Configure CMake
`cmake .`
### Build It:
`time make -j<number of cpu threads>`
```

View File

@ -4,7 +4,7 @@
[![Discord Badge](https://img.shields.io/discord/416379773976051712.svg?color=7289DA&label=discord&logo=discord&logoColor=white)](https://aurail.us/discord)
[![GitHub Commit](https://img.shields.io/github/commit-activity/m/aurailus/zepha.svg?logo=github&label=commit%20activity)](https://github.com/Aurailus/Zepha/commits/master)
### About
## About
Zepha is a powerful, extensible C++ Voxel Game with immense modding possibilities. The API provided allows everybody with even a basic knowledge of Lua to create any subgame imaginable. Though other Voxel Games like Zepha exist, none of them can match it's superior performance, graphical capabilities, and raw modding capability.
@ -12,7 +12,11 @@ Zepha is very early in developement, however it already has several strengths ov
Zepha's full source code is currently available on this repository for viewing and personal use, however it is important to note that this project is *not* free nor open source. Unfortunately, as my dream is to make a living off of game development this is not a viable strategy for me. Learning from the source code or exploring the source is allowed and encouraged, though. Feel free to use this repository as a reference for similar works until the repository eventually becomes private.
### License
## Building
Please see [docs/Building.md](https://github.com/Aurailus/Zepha/blob/master/docs/Building.md) for guides and best practices.
## License
**(c) 2018-2020 Nicole Collings, All Rights Reserved.**

View File

@ -1,89 +0,0 @@
# Idiot's Guide to building Zepha on Windows:
## ~~Your Amazon Wish List~~ Prequesites:
### Step 0:
Download the GitHub .zip, or `git clone` [Zepha](https://github.com/Aurailus/Zepha/)
### Step 1:
Install [Visual Studio Community](https://visualstudio.microsoft.com/vs/community/) (Clang and GCC not supported!)
### Step 2:
Install [CMake](https://cmake.org/download/)
### Step 3:
Install [VCPKG](https://github.com/microsoft/vcpkg), (like to your desktop, as it's just a folder)
### Step 4:
Install VCPKG dependancies:
In powershell, in the `vcpkg` folder, execute:
`.\vcpkg install gzip glm stb-image glew glfw assimp libnoise enet lua pthread --triplet x64-windows`
## ~~Hiring Cowboy Builders~~ The Pre-Building Process:
Load up CMake, and find the downloaded `Zepha` repo, and create another folder called `Zepha_build`.
With CMake, click `Browse Source`, select the `Zepha` folder as mentioned earlier as this contains the information to correctly build the game. With that step done, click `Browse Build`, and select the folder `Zepha_build`. With these folders correctly chosen, click configure, which should bring up a wizard like window.
Once in the window for configuring the build, set `optional platform for generator` to `x64` under the dropdown menu. After that, select the radio button `Specify toolchain for crosscompiling`, which will allow you to select the `vcpkg` libraries and header files required by `Zepha`. With that out of the way, click `next`.
Navigate to the toolchain file which is located in the `vcpkg` folder, which is found here: `\where you installed\vcpkg\scripts\buildsystems\vcpkg.cmake` with the toolchain file completed, click `Finish`
## ~~Triforce of Compiling???~~ Fixing The Linker:
Here's the tricky part, as the linker for the `Zepha` project in Visual Studio Community has a few issues with how ~~the idiot who did the CMakeLists~~ CMake's `find_path()` and `find_library()` misbehave with VCPKG. Because of this, the linker will stop compiling even if Zepha's `.cpp` and `.h` files compile successfully. In otherwords, you need to right click the `Zepha` Project. Click the `Properties` option in the right click list. Under the `Linker` options, expand the options with the arrow, and go to the `Input` submenu.
These next instructions are build type specific, `Debug` builds work with the VS Community debugger, while the release build does not. Click the `Additional Dependancies` dropdown arrow, then hit `<Edit>` Delete all the included libraries, and use the following:
Keep in mind, `\vcpkg\` refers to where you installed it.
### Building For Debug (With Debug Symbols):
```
src\Debug\Zepha_Core.lib
\vcpkg\installed\x64-windows\debug\lib\enet.lib
\vcpkg\installed\x64-windows\debug\lib\glfw3dll.lib
\vcpkg\installed\x64-windows\debug\lib\glew32d.lib
\vcpkg\installed\x64-windows\debug\lib\assimp-vc142-mtd.lib
\vcpkg\installed\x64-windows\debug\lib\lua.lib
\vcpkg\installed\x64-windows\debug\lib\pthreadVC3d.lib
\vcpkg\installed\x64-windows\debug\lib\z.lib
\vcpkg\installed\x64-windows\debug\bin\noise.lib
opengl32.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
ws2_32.lib
winmm.lib
```
### Building For Release ~~(To Flex On People)~~:
```
src\Release\Zepha_Core.lib
\vcpkg\installed\x64-windows\lib\enet.lib
\vcpkg\installed\x64-windows\lib\glfw3dll.lib
\vcpkg\installed\x64-windows\lib\glew32.lib
\vcpkg\installed\x64-windows\lib\assimp-vc142-mt.lib
\vcpkg\installed\x64-windows\lib\lua.lib
\vcpkg\installed\x64-windows\lib\pthreadVC3.lib
\vcpkg\installed\x64-windows\lib\z.lib
\vcpkg\installed\x64-windows\bin\noise.lib
opengl32.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
ws2_32.lib
winmm.lib
```
## ~~Rocket Science~~ Launching Zepha:
With either build type completed, head into `Zepha_build\[Debug or Release]\` you should notice a freshly built copy of Zepha. For obvious reasons, head into the `Zepha` directory and copy both `assets` and `mods` to the same folder as the Release or Debug executable. By double clicking Zepha.exe, it'll try connecting to the localhost server, so to make the game *start* you'll need a PowerShell window. In Windows 10, this is accomplished by `shift + right clicking` inside the same folder as `Zepha.exe`. Inside the PowerShell window, type `.\Zepha --mode=server`. With the server running, start `Zepha.exe` as you would normally. The game should connect to the localhost server and begin playing the game.

129
docs/Building.md Normal file
View File

@ -0,0 +1,129 @@
# Building Zepha
## Linux
### Using apt\[-get\]
1. Install Dependencies
`sudo apt install freeglut3-dev liblua5.3-dev libnoise-dev libglm-dev libglew-dev libglfw3-dev libenet-dev libassimp-dev zlib1g-dev`
2. Configure CMake
`cmake .`
3. Build using make
`time make -j<number of cpu threads>`
4. Run the program
See [docs/Executing.md](https://github.com/Aurailus/Zepha/blob/master/docs/Executing.md) for instructions for how to run the built program.
### Template for Contributing
```markdown
### Using <package manager>
1. Install Dependencies
`sudo ???`
2. Configure CMake
`cmake .`
3. Build using make
`time make -j<number of cpu threads>`
4. Launch Zepha
See [docs/Executing.md](https://github.com/Aurailus/Zepha/blob/master/docs/Executing.md) for instructions for how to run the built program.
```
## Windows
1. Install [Visual Studio Community](https://visualstudio.microsoft.com/vs/community/).
2. Install [CMake](https://cmake.org/download/).
3. Download [VCPKG](https://github.com/microsoft/vcpkg) to your desktop.
4. Install VCPKG dependencies.
Execute the following in the VCPKG folder in powershell:
`.\vcpkg install gzip glm stb-image glew glfw assimp libnoise enet lua pthread --triplet x64-windows`
5. Pre building:
Load CMake, find the downloaded Zepha repository, and create a new folder called Zepha_build. In CMake, click Browse Source, select the Zepha, as this contains the information to correctly build the game. Next, click Browse Build and select the folder Zepha_build. Finally, click configure, which should bring up a configuration wizard.
Once in the wizard, set the Optional Platform for Generator to x64 in the dropdown menu. After that, select Specify Toolchain for Crosscompiling, which will allow you to select the VCPKG libraries and header files required by Zepha. Then click next.
Navigate to the toolchain file which is located in the VCPKG folder, which is found in `\vcpkg\scripts\buildsystems\vcpkg.cmake`. Click Finish.
6. Fixing the linker:
The linker for Zepha in Visual Studio Community has a few issues with CMake's find_path() and find_library() functions. Because of this, the linker will stop compiling even if the source files compile successfully. In other words, you need to right click the Zepha Project, then click the Properties option in the context menu, and under the Linker Options, expand the options, and go to the Input submenu.
These next instructions are build type specific, Debug builds work with the VS Community debugger, while the release build does not. Click the Additional Dependencies dropdown arrow, then click <Edit>. Delete all the included libraries, and input the following:
Keep in mind, \vcpkg\ refers to the directory that you installed it in.
- For Debug:
src\Debug\Zepha_Core.lib
\vcpkg\installed\x64-windows\debug\lib\enet.lib
\vcpkg\installed\x64-windows\debug\lib\glfw3dll.lib
\vcpkg\installed\x64-windows\debug\lib\glew32d.lib
\vcpkg\installed\x64-windows\debug\lib\assimp-vc142-mtd.lib
\vcpkg\installed\x64-windows\debug\lib\lua.lib
\vcpkg\installed\x64-windows\debug\lib\pthreadVC3d.lib
\vcpkg\installed\x64-windows\debug\lib\z.lib
\vcpkg\installed\x64-windows\debug\bin\noise.lib
opengl32.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
ws2_32.lib
winmm.lib
- For Release:
src\Release\Zepha_Core.lib
\vcpkg\installed\x64-windows\lib\enet.lib
\vcpkg\installed\x64-windows\lib\glfw3dll.lib
\vcpkg\installed\x64-windows\lib\glew32.lib
\vcpkg\installed\x64-windows\lib\assimp-vc142-mt.lib
\vcpkg\installed\x64-windows\lib\lua.lib
\vcpkg\installed\x64-windows\lib\pthreadVC3.lib
\vcpkg\installed\x64-windows\lib\z.lib
\vcpkg\installed\x64-windows\bin\noise.lib
opengl32.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
comdlg32.lib
advapi32.lib
ws2_32.lib
winmm.lib
7. Launch Zepha
With either build type completed, navigate to `Zepha_build\[Debug or Release]\` and you will find a freshly built copy of Zepha.
See [docs/Executing.md](https://github.com/Aurailus/Zepha/blob/master/docs/Executing.md) for instructions for how to run the built program.

21
docs/Executing.md Normal file
View File

@ -0,0 +1,21 @@
# Executing Zepha
## Linux
### Executing The Client
Run `./Zepha` in the build directory, or double click the executable (in supported file managers).
### Executing The Server With a Specified Subgame
Run `./Zepha --mode=server --subgame=subgame_name` in the build directory.
## Windows
### Executing The Client
Double click the Zepha.exe executable in the build directory.
### Executing The Server With a Specified Subgame
Open PowerShell in the build directory (Shift + Right click the folder, and press Open PowerShell), and `.\Zepha --mode=server --subgame=subgame_name`.