.zons to define scenes and .luas for scripts.
- Zig 98.5%
- Lua 1.4%
- C 0.1%
|
|
||
|---|---|---|
| LICENSES | ||
| lua_bindings | ||
| resources/testing | ||
| src | ||
| .gitignore | ||
| .gitmodules | ||
| build.zig | ||
| build.zig.zon | ||
| README.md | ||
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