All Projects → danielabbott → Zig-Game-Engine

danielabbott / Zig-Game-Engine

Licence: MIT license
No description or website provided.

Programming Languages

Zig
133 projects
python
139335 projects - #7 most used programming language
GLSL
2045 projects
c
50402 projects - #5 most used programming language

OpenGL forward renderer.

Tested with Zig 0.6.0

Demo 1: Demo 1 Screenshot (Credit for farm assets is in the DemoAssets directory)

Modules

  • WindowGraphicsInput: Abstraction over window creation (GLFW 3), user input (GLFW 3), and the graphics API (OpenGL 3.3, GLAD).
    Depends on: GLFW, GLAD, stb_image, RefCount.zig, Files.zig

  • Mathematics: Matrix and Vector types

  • ModelFiles: Loading of models and animations from the custom file formats

  • RTRenderEngine: Real-time rendering of scenes.
    Depends on: WindowGraphicsInput, Mathematics, ModelFiles, Assets, Files.zig, RefCount.zig

  • Compress: Custom compressed file format.
    Depends on: ZSTD, Files.zig

  • Assets: Abstraction ovet the loading of assets such as models, animations, textures, etc.
    Depends on: Compress, ConditionVariable.zig, Files.zig ModelFiles, RefCount.zig

  • Scene: Scene files.
    Depends on: Assets, RTRenderEngine, Files.zig, Mathematics, WindowGraphicsInput

  • RGB10A2: 10-bits-per-channel texture support.
    Depends on: Files.zig

Compile Instructions (Windows)

  1. Run compile_deps.bat
    • Modify the file if needed e.g. to change the visual studio version
  2. If compiling GLFW, open deps\glfw\GLFW.sln and build the GLFW project in Release x64.
  3. If compiling ZSTD, open deps\zstd\build\VS2010\zstd.sln and compile libzstd in Release x64.
  4. Run compile_and_run.bat

Output is in zig-cache/bin. The batch script ^ will run the example program automatically.

Compile Instructions (Linux, untested)

  1. Run compile_deps.sh (might need to run sudo chmod +x ./compile_deps.sh)
    • Change 'make -j3' to 'make -j4' etc. wherever it appears in the script if your computer has more than 2 CPU cores.
  2. Run 'zig build'

Output is in zig-cache/bin.

Demo programs must be run from the root directory of the project.

N.B.

A lot of structs have reference counting. If this isn't needed the functionality can be safely ignored by the calling code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].