Simple API for 2D games, built around Sprite and App::update

Client programs should implement App::update to execute game logic and add instances of Sprite to App::sprites and App::ui_sprites. At each frame, all sprites are drawn to the screen.

This system relies on two cameras App::world_camera and App::ui_camera.

  • App::world_camera applies a perspective effect to draw the game world. This camera is designed to be moved around to see the world as well as to zoom in and out. It is used to position the sprites in App::sprites.

  • App::ui_camera is a simple orthogonal camera to display UI objects. This camera should mostly be still, it can still move for chock effects and the like. It can be used to standardize the size of the UI across devices. It is used to position the sprites in App::ui_sprites.

See the sample game at contrib/asteronits/ and the basic project template at lib/gamnit/examples/template/.

All subgroups and modules

module flat

gamnit :: flat

Simple API for 2D games, built around Sprite and App::update
module flat_core

gamnit :: flat_core

Core services for the flat API for 2D games
package_diagram gamnit\>flat\> flat gamnit gamnit gamnit\>flat\>->gamnit app app gamnit\>flat\>->app core core app->core serialization serialization app->serialization pthreads pthreads app->pthreads json json app->json android android app->android ...gamnit ... ...gamnit->gamnit android->gamnit ...core ... ...core->core ...serialization ... ...serialization->serialization ...pthreads ... ...pthreads->pthreads ...json ... ...json->json ...android ... ...android->android gamnit\>depth\> depth gamnit\>depth\>->gamnit\>flat\> gamnit\>virtual_gamepad\> virtual_gamepad gamnit\>virtual_gamepad\>->gamnit\>flat\> android... ... android...->android

Ancestors

group android

android

Android platform support and APIs
group bundle

android > bundle

A mapping class of String to various value types used by the
group c

c

Structures and services for compatibility with the C language
group cocoa

cocoa

Cocoa API, the development layer of OS X
group codecs

core > codecs

Group module for all codec-related manipulations
group collection

core > collection

This module define several collection classes.
group core

core

Nit common library of core classes and methods
group curl

curl

Data transfer powered by the native curl library
group dom

dom

Easy XML DOM parser
group egl

egl

Interface between rendering APIs (OpenGL, OpenGL ES, etc.) and the native windowing system.
group gen_nit

gen_nit

Support to generate and otherwise manipulate Nit code
group geometry

geometry

Basic geometry data structures and services.
group glesv2

glesv2

OpenGL graphics rendering library for embedded systems, version 2.0
group gtk

gtk

GTK+ widgets and services
group ios

ios

iOS support for app.nit
group java

java

Supporting services for the FFI with Java and to access Java libraries
group json

json

read and write JSON formatted text
group jvm

jvm

Java Virtual Machine invocation API and others services from the JNI C API
group linux

linux

Implementation of app.nit for the Linux platform
group matrix

matrix

Services for matrices of Float values
group meta

meta

Simple user-defined meta-level to manipulate types of instances as object.
group mnit

mnit

group more_collections

more_collections

Highly specific, but useful, collections-related classes.
group opts

opts

Management of options on the command line
group parser_base

parser_base

Simple base for hand-made parsers of all kinds
group performance_analysis

performance_analysis

Services to gather information on the performance of events by categories
group pipeline

pipeline

Pipelined filters and operations on iterators.
group poset

poset

Pre order sets and partial order set (ie hierarchies)
group pthreads

pthreads

POSIX Threads support
group realtime

realtime

Services to keep time of the wall clock time
group sdl2

sdl2

This is a low-level wrapper of the SDL 2.0 library (as sdl2) and SDL_image 2.0 (as sdl2::image).
group serialization

serialization

Abstract serialization services
group shared_preferences

android > shared_preferences

Services allowing to save and load datas to internal android device
group sqlite3

sqlite3

Services to manipulate a Sqlite3 database
group template

template

Basic template system
group text

core > text

All the classes and methods related to the manipulation of text entities
group ui

android > ui

Views and services to use the Android native user interface
group v3_4

gtk > v3_4

group xdg_basedir

xdg_basedir

Services for using the XDG Base Directory specification

Parents

group app

app

app.nit, a framework for portable applications
group gamnit

gamnit

Portable game and multimedia framework for Nit

Children

group depth

gamnit > depth

gamnit depth, a framework to create portable 3D games in Nit.
group gamnit

gamnit

Portable game and multimedia framework for Nit
group virtual_gamepad

gamnit > virtual_gamepad

Virtual gamepad mapped to keyboard keys for quick and dirty mobile support

Descendants

group android

android

Android platform support and APIs
group bundle

android > bundle

A mapping class of String to various value types used by the
group egl

egl

Interface between rendering APIs (OpenGL, OpenGL ES, etc.) and the native windowing system.
group examples

app > examples

group glesv2

glesv2

OpenGL graphics rendering library for embedded systems, version 2.0
group intent

android > intent

Services allowing to launch activities and start/stop services using
group notification

android > notification

Services to show notification in the Android status bar
group service

android > service

Android service support for app.nit centered around the class Service
group shared_preferences

android > shared_preferences

Services allowing to save and load datas to internal android device
group src

android > examples > src

group ui

android > ui

Views and services to use the Android native user interface