lib/gamnit: improve the gamnit README and fix the typo in its name
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 1 Jan 2016 23:08:04 +0000 (18:08 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 20 Jan 2016 22:50:32 +0000 (17:50 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/README.md [new file with mode: 0644]
lib/gamnit/REAME.md [deleted file]
lib/gamnit/depth/README.md

diff --git a/lib/gamnit/README.md b/lib/gamnit/README.md
new file mode 100644 (file)
index 0000000..a9882df
--- /dev/null
@@ -0,0 +1,50 @@
+Portable game and multimedia framework for Nit
+
+_gamnit_ is a modular framework to create portable 2D or 3D apps in Nit.
+It is based on the portability framework _app.nit_ and the OpenGL ES 2.0 standard.
+
+# System configuration
+
+To compile the _gamnit_ apps packaged with the Nit repositoy on GNU/Linux you need to install the dev version of a few libraries and some tools.
+Under Debian 8.2, this command should install everything needed:
+
+~~~
+apt-get install libgles2-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev inkscape mpg123
+~~~
+
+# Services by submodules
+
+_gamnit_ is modular, different services of the framework are available through different submodules:
+
+* The main entrypoint `gamnit` provides low-level abstractions over some services of OpenGL ES 2.0, like textures, shaders and programs.
+  It defines the basic methods to implement in order to obtain a working game:
+  `App::frame_core` to update the screen and `App::accept_event` to receive user inputs.
+
+* `flat` provides an easy to use API for 2D games based on sprites.
+  Clients of this API redefine `App::update` to update the game logic and fill lists of sprites with objects to draw.
+
+  `App::sprites` lists the sprites of the game world, they are drawn form the point of view of the `world_camera`.
+  This camera can be moved around in the world by updating the x and y of its `position`,
+  and the zoom can easily be set using `reset_depth(desired_world_units_on_y)` or the `z` of its `position`
+
+  `App::ui_sprites` lists the UI sprites drawn from the point of view of `ui_camera`.
+  By default, this camera is pixel-perfect with the origin in the top left corner of the window.
+  However to support screens with different DPI, it is recommended to standardize
+  the display size using `reset_depth(height_of_reference_display)`.
+
+* `depth` defines an API for 3D games based on instances of `Actor`.
+
+  This framework is build upon `flat`, see the doc of this submodule first (just above).
+  As such, clients should still implement `update` with the game logic, and fill `ui_sprites` for UI elements.
+
+  At each frame, elements in the list `actors` are drawn to screen.
+  Each `Actor` is composed of a `Model` and other information specific to this instance:
+  position in the world, rotation and scaling.
+
+* `limit_fps` refines existing services of _gamnit_ to limit the framerate to a customizable value.
+
+* `keys` provides `app.pressed_keys` keeping track of the currently pressed keys.
+
+* `model_parsers` provides services to read and parse models from the asset folder.
+
+* `network` provides a simple communication framework for multiplayer client/server games.
diff --git a/lib/gamnit/REAME.md b/lib/gamnit/REAME.md
deleted file mode 100644 (file)
index 33c2501..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Portable game and multimedia framework for Nit
-
-This framework is based on the portability framework _app.nit_ and the OpenGL ES 2.0 standard.
-
-It is modular, different parts of the framework are available through different entry points:
-
-* `gamnit` provides low-level abstractions over some services of OpenGL ES 2.0, like textures, shaders and programs.
-  It defines the basic methods to implement in order to obtain a working game: `App::frame_core` to update the screen
-  and `App::accept_event` to receive user inputs.
-
-* `flat` provides an easy to use API for 2D games based on sprites.
-  Clients of this API must redefine `App::update` to update the game logic and fill `App::sprites` with objects to draw.
-
-* `depth` defines an API for 3D games.
-  It is based on a list of `actors`, with `Model` composed of `Mesh` and `Material`.
-
-* `cameras` provides cameras classes to produce MVP matrices which can be fed to shaders.
-
-* `limit_fps` redefines existing services of gamnit to limit the framerate to a client-defined value.
-
-* `network` provides a simple communication framework for multiplayer client/server games.
index 61e9c40..6350c2f 100644 (file)
@@ -1,6 +1,6 @@
 gamnit depth, a framework to create portable 3D games in Nit.
 
-This framework is based on a list of `Actor`, in `app::actors`, which are drawn to the screen at each frame. Each actor is composed of a model and other information specific to this instance: position in the world, rotation and scaling. Each `Model` is either a composite of models or it is composed of a `Mesh` defining its geometry and a `Material` defining how to draw the model. `Material` can be subclassed to use custom shaders.
+This framework is based on a list of `Actor`, in `app::actors`, which are drawn to the screen at each frame. Each actor is composed of a `Model` and other information specific to this instance: position in the world, rotation and scaling. Each `Model` is either a composite of models or it is composed of a `Mesh` defining its geometry and a `Material` defining how to draw the model. `Material` can be subclassed to use custom shaders.
 
 # Assets