Skip to content

An example to demonstrate how to implement hot reloading for a game engine and integrate it with CMake.

License

Notifications You must be signed in to change notification settings

M-Fatah/hot_reloading_with_cmake

Repository files navigation

Build status


Hot reloading with CMake

An example that demonstrates how to implement hot reloading for a game engine and integrate it with CMake.
The code example provided compiles and runs on both Linux and Windows.
hot_reloading_with_cmake.webm

The basic idea behind it:

The engine neeeds to be built as a dll.

  • Copy the game engine's dll to a new file.
  • Load the copied dll from the platform layer or a launcher at runtime.
  • Every frame check if the original dll has been modified and if so unload the copied dll and repeat the process.
  • In debug mode, ensure that the generated pdb files are named randomly to avoid locking.

Platforms:

  • Linux.
  • Windows.

Prerequisites:

Linux:

  • sudo apt install -y cmake

Windows:

  • Download and install CMake (version 3.20 atleast).

Building:

  • Run one of the provided scripts, for example build_debug.sh or build_debug.bat.
  • Output is in build/bin/${CONFIG}/ directory.

About

An example to demonstrate how to implement hot reloading for a game engine and integrate it with CMake.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published