blob: d3bb4bff762a9cc5dc578970b118468e5d0fc95b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|

[](https://github.com/realtradam/FelFlameEngine/blob/master/LICENSE)
[](https://ko-fi.com/tradam)
---
FelFlame Engine is a modular "library-style" Ruby game engine. It consists of a core set of libraries(mruby + Raylib) which you can freely add your own mruby or C libraries on top of to be compiled into a single game or interpreter. Currently it exports to Windows, Web and Linux.
## How to build
Currently building only tested/used on Linux(Artix/Arch and OpenSUSE). If you are on windows you could try using WSL but this is currently untested.
You need to have any requirements for compiling [Raylib](https://github.com/raysan5/raylib) installed. You must also have Zig and Emscripten installed(it is recommended to use [asdf](https://asdf-vm.com/) to install these)
1. Clone the repository and install gems
```sh
git clone --recursive [email protected]:realtradam/FelFlameEngine.git
cd FelFlameEngine
bundler install
```
2. Build the underlying libraries
```sh
rake build:raylib
rake build:mruby
```
###### At this point you could play around with the interpreters at `core/mruby/bin/mirb` and `core/mruby/bin/mruby`
3. Playtest your game
```sh
rake play
# or
rake p
```
###### This will execute your game located here: `game/main.rb`
4. Build your game
```sh
rake build:win # build for windows
rake build:web # build for web
rake build:tux # build for linux
```
###### The binaries are located under `build` in their respective directories
5. Test the web export of your game
```sh
rake serve
# or
rake s
```
## Directories Explained:
### mrbgems/
Here are all the gems you wish to be compiled into the engine. Any directories in this directory will be treated as a gem to be included into the compilation process however you may still need to edit the [build file] to add the appropriate flags if necessary.
### game/
All your game files. `main.rb` is the "entry point" of your game and the assets directory is where your assets should go as they are bundled for the web export.
### vendor/
The location of any compiled libraries and headers. These are 'included' into the engine or game when it is compiled.
### core/
Contains the core git-submodules which are needed for the engine(mruby for the Ruby language and Raylib for rendering). Also contains some template and configuration files used during compilation.
### build/
Where your game is exported to when it is compiled.
## Extras:
By default this engine comes with just Ruby and Raylib. Here are some additional gems you could use if you want more:
| Gem | Description |
| --- | --- |
| [FelECS](https://github.com/realtradam/FelECS) | Pure Ruby ECS designed for ease of use |
| ... | More coming soon |
### FelBind
You can create your own gems based on C libraries more easily by utilizing the binding generation library FelBind. See more here: https://github.com/realtradam/FelBind
|