the engine for a game I want to make. uses .zons to define scenes and .luas for scripts.
  • Zig 98.5%
  • Lua 1.4%
  • C 0.1%
Find a file
2026-06-18 15:49:56 +02:00
LICENSES src/: add a license 2026-06-07 18:21:10 +02:00
lua_bindings lua, GameState: start adding lua 2026-06-04 21:18:40 +02:00
resources/testing resources: fix the player animation lul 2026-06-11 10:41:28 +02:00
src engine, GameState: change rendering *again* 2026-06-18 00:47:30 +02:00
.gitignore this doesnt run in safety-checked modes 2026-04-28 13:37:28 +02:00
.gitmodules box2d: remove as submodule, vendor everything I need in 2026-06-02 13:55:53 +02:00
build.zig src/: add a license 2026-06-07 18:21:10 +02:00
build.zig.zon build.zig: yay it works without SDL3 now again :3 2026-05-28 17:40:51 +02:00
README.md README.md: test 2026-06-18 15:49:56 +02:00

humanity engine

this will eventually become an engine for a game I want to make.

this is a test to see if this is actually on my own forgejo instance now.

idea

since the game idea I got is rather limit, so will be this engine.

the game is just a puzzle game where you interact with objects. the player is the only thing in the entire game that can move, so collision detection is player-surroundings only.

upon starting, the game will load a scene from a .zon file. the scene defines the background(s) to be used, what objects are where, and what image, music and script files to load. upon interaction with an object (and also in some other cases), a lua function is run to figure out what happens next. the most common next-happening is loading an interaction menu, though the scripts can also set variables to be saved, change an objects sprite, put stuff into the player's inventory, etc.

Lua functions

The following is a list of all the functions the engine allows lua to call. In addition the lua scripts may call standard library functions.

getFrameNumber:
Returns the number of frames worked on. The first frame is frame 1.
Arguments: none
Returns: int

roomVisible:
If given one argument, returns visibility of room arg_1. If given two arguments, sets room arg_1 to have visibility arg_2.
Arguments: string [, boolean]
Returns: [boolean]

isKey:
Returns true if key arg_2 returns true for the condition set by arg_1.
Arguments: /down|up|pressed|released/, string
Returns: boolean