Giter Site home page Giter Site logo

spire-engine's Introduction

SpireEngine

SpireEngine is cross-platform mini game engine that uses Slang as its shader compiler. SpireEngine supports both Direct3D 12 and Vulkan.

Platform Build Status
Windows Build status
Linux Build Status

Build

SpireEngine currently runs on both Windows and Linux.

Windows

  • Open "GameEngine.sln" in Visual Studio 2019.
  • Build the solution.

The solution file has been setup to automatically download the following dependencies:

  • Slang
  • Autodesk FBX SDK (for ModelImporter)

Linux

SpireEngine's Linux build currently does not include ModelImporter. Just run make in the project root directory.

make -j16

The makefile script will automatically check and install Xlib if it does not exist on the system, and download Slang prebuilt binaries to ExternalLibs/Slang if they are not already there.

SpireEngine can be built by both g++ and clang++. You can use the CXX environment variable to explicitly specify which compiler to use, for example:

CXX=clang++ make -j16

Run

To run SpireEngine, you need to download addtional assets. Run the get_examplegame.ps1 script on Windows, or the get_examplegame.sh script on Linux. After the assets have been downloaded, follow these steps to run engine:

Windows

  • In Visual Studio, set GameEngine as start-up project.
  • Right click GameEngine project and set the following start-up arguments in Debug settings:
-enginedir "$(SolutionDir)EngineContent" -dir "$(SolutionDir)ExampleGame" -level "level0.level"
  • Run.

Linux

build/linux-x86-64/release/GameEngine -enginedir EngineContent -dir ExampleGame -level "level0.level"

Editor Mode

To run the engine in editor mode, pass -editor command line argument when launching GameEngine.

Render Video Output

SpireEngine supports rendering to video files. You can use the following command line arguments:

  • -reclen <time_in_seconds>: specifies the length of video output, in seconds.
  • -recdir <mp4_filename_or_directory>: specifies the location of the ouput video. If a *.mp4 filename is provided, SpireEngine will directly encode the resulting video as an H.264 video file. If a directory name is provided, SpireEngine will output individual images for each frame to the directory.

Headless Mode

If you need to run SpireEngine in a non-desktop environment, you can pass the -headless argument to start without a window. This can be useful when rendering videos on a server through a console interface.

spire-engine's People

Contributors

csyonghe avatar hofstee avatar tangent-vector avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.