<commit_before>.. contents::
.. sectnum::

Introduction
============

What is it?
-----------

Pepper is a general purpose data-driven game engine, written from scratch in orthodox C++ with a minimalistic and data-oriented design philosophy in mind.

It is loosely inspired by Bitsquid (now Stingray) engine and its design principles.

System requirements
-------------------

Software
~~~~~~~~

* Ubuntu 16.04+ or any other distribution with GTK+3.14 or newer.

Hardware
~~~~~~~~

* 64-bit quad-core CPU
* 4 GB of RAM
* OpenGL 3.2 compatible graphics card
* 1280x768 display

Deployment platforms
--------------------

You can deploy applications made with Pepper to the following platforms:

* Android 2.3.7+ (ARM)
* Ubuntu 12.04+
* Windows 7, 8, 10

Basic concepts
==============

The source directory
--------------------

The source directory contains all the files that make up the game.

.. code::

  .
  ├── lua
  |   └── game.lua
  ├── boot.config
  ├── boot.package
  └── global.physics_config

The boot directory and the boot.config file
-------------------------------------------

Any directory containing the file named ``boot.config`` is a boot directory.
The ``boot.config`` file specifies a number of options.

In the example below, the engine is told to load the package ``boot`` and run the Lua script ``lua/game``.

.. code::

  boot_package = "boot"      // Package to load on boot
  boot_script  = "lua/game"  // Lua script to execute on boot

Within `the source directory`_, there can be an arbitrary number of boot directories. You can specify the boot directory using the switch ``--boot-dir``.

The bundle directory
--------------------

Pepper reads source data from `the source directory`_ and compiles it into efficient binary representation.
The result of the compilation process is stored in the bundle directory.

.. code::

  .
  ├── data                                   // <- Contains compiled data files
  |   ├── a14e8dfa2cd117e2-9dea40fdc2245efc  // <- Compiled file
  |   ├── 72e3cc03787a11a1-0b2f08fe66e395c0  // <- Another compiled file
  |   └── ...
  ├── temp                                   // <- Temporary files from data compilers
  └── last.log                               // <- Text log from the last engine execution

The .bundleignore file
----------------------

Many programs store metadata files alongside edited files. This is often the case with text editors and version control systems.

When Pepper bumps into unknown files in the source directory, it quits the compilation and reports an error.

The ``.bundleignore`` file specifies files that Pepper should ignore when compiling data.

Example:

.. code::

  # This is a comment.

  # Blank lines are ignored.
  # Everything else is simple glob pattern (*, ?).
  *.txt

Units of measurement
--------------------

Pepper uses MKS (meters, kilograms and seconds) units and radians for angles.

boot.config file reference
==========================

Generic configurations
----------------------

	``boot_script = "lua/game"``
		Lua script to launch on boot

	``boot_package = "boot"``
		Package to load on boot

Platform-specific configurations
--------------------------------

All configurations for a given *platform* are placed under a key named *platform*. E.g.:

.. code::

  // Linux-only configs
  linux = {
      renderer = {
          window_width  = 1280
          window_height = 720
          vsync = true
      }
  }


Renderer configurations
~~~~~~~~~~~~~~~~~~~~~~~

	``window_width = 1280``
		Main window width.

	``window_height = 720``
		Main window height.

	``vsync = true``
		Whether to enable vsync.

Command line reference
======================

	``-h --help``
		Display the help and quit.

	``-v --version``
		Display engine version and quit.

	``--source-dir <path>``
		Use <path> as the source directory for resource compilation.

		The <path> must be absolute.

	``--bundle-dir <path>``
		Use <path> as the destination directory for compiled resources.

		The <path> must be absolute.

	``--boot-dir <path>``
		Boot the engine with the ``boot.config`` from given <path>.

		The <path> must be relative.

	``--compile``
		Do a full compile of the resources.

		When using this option you must also specify ``--platform``, ``--source-dir`` and ``--bundle-dir``.

	``--platform <platform>``
		Compile resources for the given <platform>.
		Possible values for <platform> are:<commit_msg>Update docs<commit_after>.. contents::
.. sectnum::

Introduction
============

What is it?
-----------

Pepper is a general purpose data-driven game engine, written from scratch in orthodox C++ with a minimalistic and data-oriented design philosophy in mind.

It is loosely inspired by Bitsquid (now Stingray) engine and its design principles.

System requirements
-------------------

Software
~~~~~~~~

* Ubuntu 16.04+ or any other distribution with GTK+3.14 or newer.

Hardware
~~~~~~~~

* 64-bit quad-core CPU
* 4 GB of RAM
* OpenGL 3.2 compatible graphics card
* 1280x768 display

Deployment platforms
--------------------

You can deploy applications made with Pepper to the following platforms:

* Android 2.3.7+ (ARM)
* Ubuntu 12.04+
* Windows 7, 8, 10

Basic concepts
==============

The source directory
--------------------

The source directory contains all the files that make up the game.

.. code::

  .
  ├── lua
  |   └── game.lua
  ├── boot.config
  ├── boot.package
  └── global.physics_config

The boot directory and the boot.config file
-------------------------------------------

Any directory containing the file named ``boot.config`` is a boot directory.
The ``boot.config`` file specifies a number of options.

In the example below, the engine is told to load the package ``boot`` and run the Lua script ``lua/game``.

.. code::

  boot_package = "boot"      // Package to load on boot
  boot_script  = "lua/game"  // Lua script to execute on boot

Within `the source directory`_, there can be an arbitrary number of boot directories. You can specify the boot directory using the switch ``--boot-dir``.

The data directory
--------------------

Pepper reads source data from `the source directory`_ and compiles it into efficient binary representation.
The result of the compilation process is stored in the data directory.

.. code::

  .
  ├── data                                   // <- Contains compiled data files
  |   ├── a14e8dfa2cd117e2-9dea40fdc2245efc  // <- Compiled file
  |   ├── 72e3cc03787a11a1-0b2f08fe66e395c0  // <- Another compiled file
  |   └── ...
  ├── temp                                   // <- Temporary files from data compilers
  └── last.log                               // <- Text log from the last engine execution

The .bundleignore file
----------------------

Many programs store metadata files alongside edited files. This is often the case with text editors and version control systems.

When Pepper bumps into unknown files in the source directory, it quits the compilation and reports an error.

The ``.bundleignore`` file specifies files that Pepper should ignore when compiling data.

Example:

.. code::

  # This is a comment.

  # Blank lines are ignored.
  # Everything else is simple glob pattern (*, ?).
  *.txt

Units of measurement
--------------------

Pepper uses MKS (meters, kilograms and seconds) units and radians for angles.

boot.config file reference
==========================

Generic configurations
----------------------

	``boot_script = "lua/game"``
		Lua script to launch on boot

	``boot_package = "boot"``
		Package to load on boot

Platform-specific configurations
--------------------------------

All configurations for a given *platform* are placed under a key named *platform*. E.g.:

.. code::

  // Linux-only configs
  linux = {
      renderer = {
          window_width  = 1280
          window_height = 720
          vsync = true
      }
  }


Renderer configurations
~~~~~~~~~~~~~~~~~~~~~~~

	``window_width = 1280``
		Sets the width of the main window.

	``window_height = 720``
		Sets the height of the main window.

	``aspect_ratio = -1``
		Sets the aspect ratio.
		If the value is set to ``-1``, the aspect ratio is computed as `width`/`height` of the main window.

	``vsync = true``
		Sets whether to enable the vsync.

Command line reference
======================

	``-h --help``
		Display the help and quit.

	``-v --version``
		Display engine version and quit.

	``--source-dir <path>``
		Use <path> as the source directory for resource compilation.

		The <path> must be absolute.

	``--data-dir <path>``
		Use <path> as the destination directory for compiled resources.

		The <path> must be absolute.

	``--boot-dir <path>``
		Boot the engine with the ``boot.config`` from given <path>.

		The <path> must be relative.

	``--compile``
		Do a full compile of the resources.

		When using this option you must also specify ``--platform``, ``--source-dir`` and ``--data-dir``.

	``--platform <platform>``
		Compile resources for the given <platform>.
		Possible values for <platform> are:
{'fraction_non_alphanumeric': 0.1622729286663713, 'fraction_numerical': 0.0179441736818786, 'mean_word_length': 2.51049766718507, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4113239', 'n_tokens_mistral': 2666, 'n_tokens_neox': 2424, 'n_words': 1066}