https://github.com/r3shape/luna
Pure C Game Engine.
https://github.com/r3shape/luna
Last synced: 12 months ago
JSON representation
Pure C Game Engine.
- Host: GitHub
- URL: https://github.com/r3shape/luna
- Owner: r3shape
- License: mit
- Created: 2025-06-09T11:54:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-10T00:07:22.000Z (about 1 year ago)
- Last Synced: 2025-06-10T01:23:57.176Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 145 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README



---
### Relevant Links
| [Discord](https://discord.gg/kreGBCVsQQ) | [Reddit](https://www.reddit.com/r/r3shape/) | [Discussions](https://github.com/r3shape/luna/discussions) | [FAQ](https://github.com/r3shape/luna/wiki/luna-FAQ) |
## Building the Engine Source
> **NOTE**: If you're using the `r3make` CLI tool, ensure **Python** is installed. For more information, check out the [r3make Repository](https://github.com/r3shape/r3make).
luna includes a **pre-configured `r3make` file** for easy setup and compilation. **[r3make](https://github.com/r3shape/r3make)** is the recommended tool for fast, simple, efficient builds.
---
### Option 1: Build with **r3make** (Recommended)
1. **Install r3make**:
Install via **PyPI**:
```bash
pip install r3make
```
2. **Clone the Repository**:
```bash
git clone https://github.com/r3shape/luna
```
3. **Navigate to the `luna` directory:
```bash
cd luna
```
4. **Build the Engine**:
- Target: `luna` builds the `lunacore.dll` from `src/luna/core`
```bash
r3make -nf -v -t luna
```
- Target: `Runtime` builds the `luna.exe` from `src/luna/runtime`
```bash
r3make -nf -v -t Runtime
```
5. **Output**:
The compiled `lunacore.dll`, along with `luna.exe` runtime will be located in the `build` directory.
---
### Option 2: Manual Compilation
For those who wish to **wield the source** themselves:
1. **Clone the Repository**:
```bash
git clone https://github.com/r3shape/luna
cd luna
```
2. **Compile the Engine**:
Manually compile using **GCC**:
| Compile the core library
```bash
gcc -c src/luna/core/*.c -Iinclude -o build/*.o
gcc -shared build/*.o -Lexternal/__data__/thirdparty -lgdi32 -lopengl32 -lSSDK -o build/lunacore.dll
```
| Compile the runtime
```bash
gcc src/luna/runtime/*.c -Iinclude -Lexternal/__data__/thirdparty -Lbuild -llunacore -lSSDK -o build/luna.exe
```
## Building Projects with **luna**
1. **Prepare Your Project**:
Set up your source files, including necessary paths.
2. **Compile with r3make or GCC**:
Example using **GCC**:
```bash
gcc my_project.c -luna/include/luna -Lluna/build -L/luna/external/__data__/thirdparty -llunacore -lSSDK -o my_project.exe
```
## luna Contributors
## License
luna is licensed under the **MIT License**.