https://github.com/hsjunnesson/giraffe
A benchmark
https://github.com/hsjunnesson/giraffe
Last synced: 10 days ago
JSON representation
A benchmark
- Host: GitHub
- URL: https://github.com/hsjunnesson/giraffe
- Owner: hsjunnesson
- License: mit
- Created: 2023-10-12T06:19:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-14T20:21:10.000Z (over 2 years ago)
- Last Synced: 2025-10-27T01:57:58.251Z (9 months ago)
- Language: C
- Size: 9 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Giraffe

This is a benchmark test exploring the difference between gameplay code implemented in C++, Lua, and LuaJIT (with and without just-in-time compilation), LuaU, and Angelscript.
It's a benchmark, not an example of how to code games. It's not meant to be optimized, promise.
This uses [Chocolate](https://github.com/hsjunnesson/chocolate) which is a kind of game framework in OpenGL. It's included as a submodule so be sure to:
```
git submodule init
git submodule update
```
For the cmake dependencies, use something like VCPKG and install the following packages:
- glfw3
- glm
- cjson
- imgui[core,opengl3-binding,glfw-binding]
- backward-cpp
If you set the `SCRIPT` property you can select a scripting language, instead of the C++ reference implementation. Available options are `LUA51` (plain vanilla Lua 5.1), `LUAJIT`, `LUAU`, `ANGELSCRIPT`, or `ZIG`.
For `LUAJIT`, you will need to have PkgConfig installed to manage the dependency.
For `ZIG`, you will need to download and unzip the Zig installation somewhere, and add the directory that contains `zig.exe` to your path.
Example make and build:
```
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DSCRIPT=LUA51
cmake --build build/
```