https://github.com/jonasgeiler/3d-soft-engine-lua
🧪 A simple 3D engine written in Lua using using lua-fenster.
https://github.com/jonasgeiler/3d-soft-engine-lua
3d 3d-engine 3d-graphics 3d-soft-engine computer-graphics experiment graphics lua lua-fenster soft-engine
Last synced: 7 months ago
JSON representation
🧪 A simple 3D engine written in Lua using using lua-fenster.
- Host: GitHub
- URL: https://github.com/jonasgeiler/3d-soft-engine-lua
- Owner: jonasgeiler
- License: mit
- Created: 2018-03-18T15:27:01.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2025-03-20T13:37:05.000Z (11 months ago)
- Last Synced: 2025-06-22T23:46:04.963Z (7 months ago)
- Topics: 3d, 3d-engine, 3d-graphics, 3d-soft-engine, computer-graphics, experiment, graphics, lua, lua-fenster, soft-engine
- Language: Lua
- Homepage: https://www.davrous.com/2013/06/13/tutorial-series-learning-how-to-write-a-3d-soft-engine-from-scratch-in-c-typescript-or-javascript
- Size: 506 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 3d-soft-engine-lua
> A simple 3D engine written in Lua using
> using [lua-fenster](https://github.com/jonasgeiler/lua-fenster).
Some time ago I wanted to learn more about 3D engines, so I read this tutorial
series by David Rousset and then translated the TypeScript code from the
tutorial series into Lua:
[Tutorial series: learning how to write a 3D soft engine from scratch in C#, TypeScript or JavaScript](https://www.davrous.com/2013/06/13/tutorial-series-learning-how-to-write-a-3d-soft-engine-from-scratch-in-c-typescript-or-javascript/)
This 3D engine is obviously not production-ready or really anything to be taken
seriously, but I had a lot of fun writing it!
It runs completely on the CPU and doesn't utilize any sort of hardware
acceleration or graphics library like OpenGL, therefore the term "soft engine".
This is actually a rework of a very old project of mine, which used
[LÖVE2D](https://love2d.org/) instead of
[lua-fenster](https://github.com/jonasgeiler/lua-fenster) (my own GUI library).
If you want to see the old version, check out the
[`old-love2d-version`](https://github.com/jonasgeiler/3d-soft-engine-lua/tree/old-love2d-version)
tag.
The code is a bit messy though.
## Screenshots



## Requirements
- [LuaJIT 2.1](https://luajit.org/) (_**highly recommended**_) or [Lua 5.1](https://www.lua.org/) (newer Lua versions might work but not tested)
> **💡 Tip:** On Arch Linux, you can easily install both with `pacman -S luajit lua51`.
- [LuaRocks](https://luarocks.org/)
> **💡 Tip:** On Arch Linux, you can easily install it with `pacman -S luarocks`.
>
> **💬 Important:** Make sure you configure LuaRocks to use Lua 5.1 (even when you use LuaJIT 2.1)
> by either using the `--lua-version=5.1` flag every time, or by configuring it with `luarocks config lua_version 5.1`.
## How to try
Download the repository and install the dependencies with `luarocks`:
```shell
$ luarocks install --only-deps 3d-soft-engine-dev-1.rockspec
# OR, manually install dependencies:
$ luarocks install fenster
$ luarocks install dkjson
```
Afterwards, run [`main.lua`](./main.lua):
```shell
$ luajit ./main.lua
# OR, slower:
$ lua5.1 ./main.lua
```
Feel free to play around with the [`main.lua`](./main.lua) file,
trying out different models and such.