• Stars
    star
    222
  • Rank 178,283 (Top 4 %)
  • Language
    Lua
  • License
    GNU General Publi...
  • Created almost 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

game engine and framework written in luajit

Goluwa · GitHub license pipeline status PRs Welcome

Goluwa is a game engine, framework, a collection of utilities and experiments written in LuaJIT leveraging FFI.

ScreenShot

Features

Prototyping
  • all resources can be loaded from the internet with urls
  • fonts can be loaded directly from google webfont, dafont and other places
  • many model, image and sound formats are supported
  • most code can be reloaded without the need to restart

Structure

Goluwa is split into 4 directories. core > framework > engine > game. Going backwards, each directory depends on the previous directory, so if you delete the engine directory the game directory wont load.

-1. goluwa|.cmd

The shell and powershell script that will only download and launch luajit|.exe with core/lua/boot.lua

0. core/lua/boot.lua

Responsible for downloading other binaries, updating goluwa and launching goluwa. It's mostly lua but some of its helper functions use shell and powershell.

1. Core

Contains the barebone framework that has no explicit dependencies on any external shared libraries. However to use SSL LibreSSL.

2. Framework

The basic framework utilizing sdl, opengl, openal, etc but does not implement anything. It has a renderer which is neither 2d or 3d, game math library, high level socket library, 2d rendering library, etc.

3. Engine

The engine contains a 3d renderer, source engine asset compatibility, steam integration, zerobrane integration, networking, entities, gui, markup language, etc.

4. Game

The game folder contains very high level scripts such as Löve2D implemented in goluwa, GarrysMod Lua implemented in goluwa, chatsounds, chatbox, scoreboard, player movement, etc.

Building

While I write all code in LuaJIT, I use some thirdparty C libraries. My goal is to only write glue code in LuaJIT with FFI instead of C or C++.

core is not strictly dependent on anything but LibreSSL for https requests.

framework depends on some media centric libraries like assimp, libarchive, SDL, etc.

Assuming docker installed you can run this build everything:

./goluwa build "*"

Then the binaries built will be copied into the */bin/linux_x64/. folders.

But I have not yet figured out a good way to build these on Windows and Mac.. In theory you could use prebuilt binaries which has worked in the past.

Caveats

While I want to support OSX and Windows they become low priority due to lack of windows and osx machines. I try to test goluwa in a VM and ask friends but that's about as much as I can do.

Writing everything in LuaJIT also comes with some challenges. I try to write JIT compilable code, especially in areas that are intensive but this is not always easy without resorting to ugly code which I try to avoid.

Credits

  • Garry Newman - I learned programming in garrysmod and many of the ideas and libraries in goluwa were developed in garrysmod initially.
  • Crytek - Playing around with the Crysis Wars SDK was how I started to learn C++. I made oohh which was a garrysmod-like mod attempt. The C++ Lua binder I made there included a standard game oriented lua library which eventualy evolved into goluwa.
  • Ronny - Helped me making the gui when it was made for oohh.
  • Malkia - the source inspiration for doing this entirely in luajit was ufo
  • Morten Erlandsen - Provided help and code with BSP (especially the displacement bit) and supporting linux early on.
  • Leandro Fonseca - Started working on the löve wrapper early on and has helped with explaining how löve works.
  • Somepotato - Started proper font support using a font atlas.
  • ZeqMacaw - The source engine MDL decoding code was based on the CrowbarTool

More Repositories

1

pac3

advanced avatar customization for garrysmod
Lua
201
star
2

NattLua

luajit with a typesystem
Lua
64
star
3

ffibuild

generates luajit ffi bindings from c headers
Lua
48
star
4

luajitsocket

pure luajit ffi socket bindings for unix and windows
Lua
37
star
5

zbprofiler

proof of concept luajit profiler visualization for zerobrane
Lua
22
star
6

webgl-particles

TypeScript
17
star
7

moondust

small x86-64 jit compiler written in luajit
Lua
12
star
8

wowozela

a music instrument for gmod
Lua
10
star
9

fast_addons

misc gmod scripts that dont deserve their own repository (yet?)
Lua
10
star
10

one-click-lua-launch

a way to launch lua in one click on Linux, macOS and Windows via os scripts
Batchfile
7
star
11

luadev

garrysmod addon
Lua
6
star
12

tod

Lua
5
star
13

customisable_thirdperson

gmod addon
Lua
3
star
14

bare-minimum-cryengine3

C++
3
star
15

diffusers-a1111

experimenting
Python
3
star
16

unfinished

unfinished glua scripts
Lua
3
star
17

bullet3-c-api

c api for bullet3
C++
2
star
18

goluwa_ffmpeg

Lua
2
star
19

luajit-steamworks

barebones steamworks api bindings for luajit
Lua
2
star
20

goluwa-assets

default fonts and stuff
Lua
2
star
21

vero

TypeScript
1
star
22

comfyui-alt-frontend

testing how it is to use comfyui to build a traditional ui frontend
TypeScript
1
star
23

stablediffusion2-personal-notes

personal notes on stablediffusion2 in automatic1111
1
star
24

luacraft-launcher

an automated way to build, play and modify luacraft
Lua
1
star
25

oohh

Automatically exported from code.google.com/p/oohh
C++
1
star
26

fishingmod

A fishing minigame sandbox addon for garrysmod
Lua
1
star
27

love2d-flow-field-pathfinding

flowfield pathfinding in löve 2d
Lua
1
star
28

fishingmod2

fishing mod 2
Lua
1
star
29

fluid-simulations

typescript, react and twgl
TypeScript
1
star
30

ha.reason

reason patches and samples from https://soundcloud.com/capsadmin/ha-v1-3
1
star
31

rpg_hitmarks

gmod addon
Lua
1
star
32

love2d-nattlua

love2d game written in nattlua
Lua
1
star
33

ComfyUI-Euler-Smea-Dyn-Sampler

comfyui version of the euler smea sampler
Python
1
star