/Mojoc

A cross-platform, open-source, pure C game engine for mobile game.

Primary LanguageCMIT LicenseMIT

Mojoc Logo

Mojoc v0.4.7

Mojoc is open-source, cross-platform, pure C game engine. It is based on OpenGLES3 and written in C99. It works on IOS and Android currently, but easily extended to other platforms, and will support more platforms in the future.

Architecture

Mojoc Engine Architecture

License

Mojoc is licensed under the MIT License.

Core Idea

Less is more, Simple is best, More complex thinking keep less and simple.

Features

  • The only need programming skill is C language with C99.
  • In platform-independent code, the C Standard Library is only tool that Mojoc used, in others Mojoc build everything.
  • Mojoc has own unique code style.
  • Mojoc use extremely lightweight OOC (Object Oriented C) programing model.
  • Mojoc application architecture based on Component, State-Machine, Message-Driven.
  • More feature details see

Published Games

Mojoc has made a cross-platform android and ios game on the App Store and Google Play. And I will use Mojoc to make more games.

Samples

The samples are complete, can play, present the Mojoc features game demo. Each platform provides its own platform editor for project build. For example, android use AndroidStudio, ios use XCode, windows use Visual Studio.

Now there is only one sample, which is the simplfied version of published game Super Little Red.

  • How to running ?

    • IOS Folder is XCode project that all set up well, just open it with XCode. The only thing need to be set is switch Mojoc platform macro in Platform.h.

      #define PLATFORM_TARGET PLATFORM_IOS
    • Android Folder is AndroidStudio project that all set up well, just open it with AndroidStudio. The only thing need to be set is switch Mojoc platform macro in Platform.h.

      #define PLATFORM_TARGET PLATFORM_ANDROID
    • Code Folder is sample code shared between android and ios.

FAQ

  • Why not C++ ?

    • There are plenty of C++ game engines, but pure C game engines are much rarer. I don't want to repeat, I hope to be differently.
    • The core idea of game engine I want to create is less and simple, which is consistent with the C language.
    • At the beginning, I had a idea of how to build a complex project with pure C language. I want to test the feasibility of the idea, that is Mojoc.
    • The C language is simple but powerful, it can implement a lot of interesting things. Why not C ?
  • What is the meaning of Mojoc name ?

    Mojoc = Mojo + c
    

    The c means the C language.

  • Who designed the logo and what is the meaning of it ?

    Yes, I designed. The logo is a unknown creature made up of 'Mojoc' letters.

    M : ears  
    OO: eyes  
    J : body  
    C : tail
    
  • How Mojoc was born ?

    Mojoc started in 2012 as a spare time project. At first, the Mojoc use Eclipse + CDT + ADT + NDK development, focus on android platform.

    In the time of development, I experienced a lot of repetition and thinking. For a long time, I was not very sure and clear how to use C language to simulate OOP and keep it simple and uniform. So I tried a lot of ideas, repeated the process, write code, modify, refactor, change ideas, delete code, rewrite again and so on.

    But in the end, I developed unique rules Mojoc Code Style and Mojoc OOC Model that make me feel right and great, when follow this rules to develop Mojoc.

  • What kind of games Mojoc can do ?

    For now, it is not recommended to use Mojoc to make games. Be honest Mojoc is not yet quite perfect. There are many improvements and refinements, and I'm working on it. But now, Mojoc's code architecture and programming model have been established. So Mojoc very suitable for learning and understanding how to use C language to build game engine.

Roadmap

The Mojoc Roadmap gives the direction of the Mojoc development.

Support & Donation