Giter Club home page Giter Club logo

mnit's Introduction

MNit

The project MNit is a framework for cross-platform application development. As of now it allows to write applications using OpenGL ES 1.1 for Linux and Android. It offers an abstraction over display initialization, assets packaging, application flow and general graphics operations.

Requirements

Make sure you have all development libraries for the Nit system and your target platform. On Debian like systems, to begin you need you need the packages: git-core build-essential graphiz. For Linux compilation: libgles1-mesa-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev. For Android, you must install the Android SDK and NDK.

Installation

Clone the repository anywhere, cd in the repository and run make to compile the Nit compiler and run the tests. Afterwards, add the bin folder to your PATH and set MNIT_DIR to the root folder of the MNit repository.

Project

A project using MNit must implement a sub-class of mnit::App (see tests for samples) and define a module for each platform. Each custom platform specific module may be very light as it only needs to import the main project and the platform specific module from MNit. However, they can be extended to customize the application behaviour on different platforms.

To compile, call mnitc specifying the target platform with the -t argument.

mnitc -t linux src/moles_linux.nit
mnitc -t android src/moles_android.nit

Quick start

To begin a new project using MNit, you can use the tool mnit-new-project. It will generate the basic folder structure and stub files for you. Example call:

mnit-new-project your_project_name org.your_java_domain

Assets

All assets of the project must be in the assets/ directory. Within it you can organize it the way you want.

Tests and examples

The tests directory contains two examples using MNit. Both can be compiled for Linux and Android.

The test simple is limited to the most basic use of the system. It can be used to test inputs and assets.

The simple game moles uses the assets to load images. It has a more complete game logic but still defined in a signle module.

The game dino is an example of a more complete game. The application logic is devided in modules by preoccupations. It uses some more advanced features of the display interfaces, to display the turning dino.

Tools

The bin directory contains a few more programs than mnitc to simplify the use of the MNit system.

mnit-android-trace is a small wrapper to ndk-stack to simplify debuging MNit application on Android. It must be called from the root of your MNit project. It wields results if there is a native crash in your Android application. It doesn't report Nit crash or native crash in system librairies.

The script svg-to-pngs uses Inkscape to export PNG images from SVG files. It will extract all objects with an id prefixed by "0" to the given folder. The SVG file must be redimensioned to fit all the drawings.

Usage: svg-to-pngs art/drawing.svg assets/images

mnit's People

Contributors

xymus avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.