<commit_before># Spinel - Ruby-infused Game Engine

Spinel is a new free and open source game engine under development that utilizes [mruby](https://github.com/mruby/mruby/)
as its integral scripting layer. Under the hood is C/C++, however wherever possible the engine uses Ruby.

Included in the repo is the source of Spinel, as well as a demo application for testing the engine.

I want to stress that this is in *EARLY DEVELOPMENT*. What you see is the result of initial research
taken place during an Agora Games Hackathon in 24 hours.  Most of what you see will likely be rewritten,
but given the requirement of having a working demo in 24 hours, some temporary structures had to be put
in place.

This project uses a .xcodeproj which contains the two build targets of the game and the engine. The game
source is found in the game/ directory.

## Demo

You'll find a demonstration of initializing an mruby VM within C++, loading source files into the VM, creation
of Ruby objects from C and inserting them into the VM, as well as Ruby-defined function calls from C. This
shows the capability of interoperability and the ability to maintain C/C++-level game constructs with Ruby-level
abstractions, as well as core class loading from both sides of the VM barrier. Note that script loading uses two
setup values in game/main.cpp: `script_diectory` and `core_directory`.  These are relative paths to the build path,
and the files will be copied to the build directory.

## Next Steps

Now that the hackathon is over, I'll begin ripping out the temporary constructs and being adding in the real
engine structure.  Some features on the top of the list:
<commit_msg>Updates README to reflect new install process<commit_after># Spinel - Ruby-infused Game Engine

Spinel is a new free and open source game engine under development that utilizes [mruby](https://github.com/mruby/mruby/)
as its integral scripting layer. Under the hood is C/C++, however wherever possible the engine uses Ruby.

Included in the repo is the source of Spinel, as well as a demo application for testing the engine.

I want to stress that this is in **EARLY DEVELOPMENT**. What you see is the result of initial research
taken place during an Agora Games Hackathon in 24 hours.  Most of what you see will likely be rewritten,
but given the requirement of having a working demo in 24 hours, some temporary structures had to be put
in place.

## Installation

Spinel requires compiling mruby, and comes with mruby as a git submodule linked to working builds with Spinel.

```
git clone git://github.com/cadwallion/spinel.git
cd spinel
git submodule init && git submodule update
```

For compilation, spinel comes with an Xcode project.  For non-Xcode users, the project is compiled via make:

```
make [game|engine|mruby|all|distclean|help]
```

To build the game, either use the 'game' target in Xcode or run `make game`. If problems occur while compiling,
please run `make distclean` before running `make game`. Use `make help` for more information. Build output is
set to ./build/.

## Engine

The Engine is a static library containing core Engine configurations and the hooks for custom game development.
The primary components right now are Spinel::Engine and EngineSetup. Creating a game using Spinel requires
linking `libspinel.a` and including the `engine.h` header. See the code in `src/` for more information on how
to use Spinel in your own game.

## Game Demo

You'll find a demonstration of initializing an mruby VM within C++, loading source files into the VM, creation
of Ruby objects from C and inserting them into the VM, as well as Ruby-defined function calls from C. This
shows the capability of interoperability and the ability to maintain C/C++-level game constructs with Ruby-level
abstractions, as well as core class loading from both sides of the VM barrier. Note that script loading uses two
setup values in game/main.cpp: `script_diectory` and `core_directory`.  These are relative paths to the build path,
and the files will be copied to the build directory.

## Next Steps

Now that the hackathon is over, I'll begin ripping out the temporary constructs and being adding in the real
engine structure.  Some features on the top of the list:

{'fraction_non_alphanumeric': 0.04930408115121491, 'fraction_numerical': 0.001887237556027365, 'mean_word_length': 4.353535353535354, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5636957', 'n_tokens_mistral': 1128, 'n_tokens_neox': 1062, 'n_words': 669}