Skip to content

Latest commit

 

History

History
105 lines (73 loc) · 6.51 KB

File metadata and controls

105 lines (73 loc) · 6.51 KB

PhoenixEngine

✨ core dumped ✨


Demo videos

Personal 3D OpenGL "Game Engine" written in C++, that can:

  • Load, Save and Render Scenes
    • Multiple objects with materials (Color, Metallic-Roughness, Emission and Normal maps), other parameters and GPU instancing
  • Import simple Models (.gltf/.glb)
  • Execute Luau scripts with a per-frame event system
  • Do simple physics (dynamics and collisions w/ friction with AABBs, also has Raycasting for Scripts)
  • Do some simple, color-only post-processing (really weird Bloom, but a kinda nice blur vignette)

Intended to be compatible with both Windows and Linux/Ubuntu.

Downloading

You can download binaries from Actions. Pick one at the top with a checkmark, and choose the Release build for your system to get started. After downloading from Actions, you can launch the Editor through the main executable.

Building

On Linux, you may use the bash shell/l_setupandbuild.sh <CONFIG> (where CONFIG is one of Debug, Release, [Debug/Release]TSan, or ReleaseAUSan) to download dependencies, configure CMake and build the engine through 1 command. Otherwise, you may follow these instructions.

  • Minimum CMake version of 3.28 (arbitrary, the one I use on Linux. I use 3.30 on Windows)
  • Compiler which supports C++ Standard 20 and C Standard 17 (G++/MSVC are intentionally supported)
  • For Windows, Visual Studio 2022 platform toolset v143
  • For Linux, run the shell/l_dependencies.sh script to ensure all the necessary development packages are available on your system (uses APT!)
  1. git clone https://github.com/PhoenixWhitefire/PhoenixEngine --recursive --depth=1, or just use the Code <> button

    • --recursive clones submodules as well (check the Vendor directory)
    • --depth 1 causes only the current commit to be fetched, reducing download times
  2. cmake -B "build" in the root directory

    • On Linux, you may run bash shell/l_chmod.sh && shell/l_configure.sh in the root Git directory
  3. Open the resulting project in your IDE of choice

  4. Build with shell/l_build.sh <CONFIG> or equivalent in your IDE, with CONFIG being one of:

    • Debug: Standard Debug build, no optimizations, Address Sanitizer and Tracy
    • Release: All optimizations, including Link-Time/Whole-Program optimization, no Address Sanitizer, Tracy in ON_DEMAND mode
    • DebugTSan/ReleaseTSan: Debug/Release with Thread sanitizer
    • ReleaseAUSan: Release with Address and Undefined-behaviour sanitizer
  5. Run it in the root directory with a command such as build/Release/PhoenixEngine (Linux Bash), . "x64/Release/PhoenixEngine" (Windows Terminal), or "x64/Release/PhoenixEngine" (Windows Command Prompt)

  6. (Optional) I have not configured the Tracy Profiler standalone application to build along with the rest of the Engine, you will need to build it manually. The "Start Profiling" button in the Info widget, as well as the -tracyim launch argument, all assume you have built the Profiler yourself and that it is in the expected directory. You can do this with either shell/l_buildprofiler.sh, or with the following equivalent commands:

    • cd Vendor/tracy/profiler
    • cmake -B build -G Ninja (You can omit -G Ninja if you're OK with it using Make or whatever CMake decides is appropriate by default)
    • cmake --build build --config Release -j7

    By the end, you should have a binary at the location Vendor/tracy/profiler/build/tracy-profiler.

Remember to check out the Getting Started page on the Wiki.

Please note that LSP definition files depend on Luau's New Type Solver. Enabling that option in Luau LSP is required for them to work. For more information please read Integration with Luau LSP.




Attributions

All 3rd-party code and submodules are located in the Vendor directory.

The following third-party projects were used/referenced during this Engine's development:

The OpenGL YouTube tutorials of Victor Gordan (who I occasionally make fun of in the code comments) were referenced heavily during the creation of the rendering systems of this engine. Initially, this started out as a 1-to-1 follow-along of what he did, but I rewrote the entire thing to work in a better "Game Engine"-style architecture, as the tutorial had a simpler Model Viewer architecture that was not suitable for a Game Engine.

Additionally, I referred to "Dave Poo"'s C++ Lua embedding tutorials while adding the Luau scripting capabilities.

End of README.