HTTPS SSH

Overview

MJIN is a collection of tools to create cross-platform games.

MJIN is developed by Opensource Game Studio, a group of hobbysts that use their spare time to fullfill the dream: create game development tools that are as fun and easy to use as playing games.

MJIN projects

MJIN project is a library or an executable that is responsible for accomplishing specific task. Each MJIN project should only solve one problem. E.g., mjin-scripting (work in progress) is responsible for Lua scripting support. If we were to implement Python scripting support, we would do it in a separate MJIN project.

There are three types of MJIN projects:

  • runner
  • module
  • application

Runner projects

A runner project is an MJIN project that produces executable capable of running application and module projects.

Currently only mjin-player is the runner.

Module projects

A module project is an MJIN project that produces library that is referenced by any other project.

The most important module project is mjin-application because it serves as a glue between runner project and application one.

Application projects

Application project is an MJIN project that produces library that references mjin-application module. Application project can be seen as the one containing the main function.

High level structure

Screenshot

This scheme reads as this:

  • platform (desktop, mobile, web) interacts only with mjin-player, the runner project
  • mjin-player is a cross-platform application that is an executable on desktop, an html page in web, or an "application" on mobile; mjin-player only interacts with mjin-application
  • mjin-application is a set of callbacks and functions for basic needs, it does not directly interact with anyone, but provides a cross-platform interface for mjin projects
  • mjin projects is any number of mjin projects that reference mjin-application callbacks as a minimum, and are themselves frameworks with their own callbacks as a maximum

The dash border around mjin projects means that they are actually an integral part of mjin-application, because mjin-application and all the rest of mjin projects are compiled into a single library that is referenced by mjin-player.

Such a scheme works across all platforms.

Core MJIN projects

mjin-player

  • Type: runner
  • Goal: provide a base layer for MJIN to work on every supported platform
  • Features:
    • create and setup OpenGL / OpenSceneGraph contexts
    • call mjin-application callbacks that must be supported by each MJIN application
    • convert platform specific input events into OpenSceneGraph ones
  • Dependencies: none

mjin-player currently runs on the following platforms:

  • Linux
  • macOS
  • Windows
  • Android
  • iOS
  • Web (Emscripten)

mjin-application

  • Type: module
  • Goal: glue between application and runner projects
  • Features:
    • provide callbacks for mjin-player
    • provide platform independent logging
    • provide functionality necessary for all MJIN projects
    • [pending] provide platform independent resource management
  • Dependencies: none

mjin-application-sample

  • Type: application
  • Goal: provide the simplest possible MJIN application for education purposes
  • Features:
    • create in-memory cube
    • render it with built-in shaders
  • Dependencies: none

Build environments

MJIN build environment is a combination of tools and source code that make it possible to build MJIN projects for all supported platforms.

Since it's impossible to have single machine to build for all platforms, we can get away with just two, as of now, which are run by Linux and macOS.

Currently you need to operate these two machines manually.

Structure

The structure of MJIN build environment that is constant across different machines looks like this:

- ~/ <-- User's home directory
|
---- mjin/ <-- MJIN home directory
   |
   ---- projects/ <-- Directory for MJIN projects' source code and dependencies
      |
      ---- mjin/ <-- This (MJIN) repository copy
      |
      ---- mjin-player/ <-- mjin-player repository copy
      |
      ---- mjin-application/ <-- mjin-application repository copy
      |
      ---- mjin-application-sample/ <-- mjin-application-sample repository copy
      |
      ---- OpenSceneGraph/ <-- OpenSceneGraph repository copy

WALE build environment

WALE environment allows to build MJIN projects for the following platforms:

  • Windows
  • Android
  • Linux
  • Emscripten

Hence the name WALE.

Consult WALE documentation for installation instructions.

mi build environment

MI environment allows to build MJIN projects for the following platforms:

  • macOS
  • iOS

Hence the name mi.

Consult mi documentation for installation instructions.