Git Product home page Git Product logo

naughtycode / oxygine-framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oxygine/oxygine-framework

0.0 2.0 0.0 155.38 MB

Oxygine is C++ engine and framework for 2D games on iOS, Android, Windows, Linux and Mac

Home Page: http://oxygine.org/

License: Other

HTML 1.35% Makefile 0.10% CMake 0.56% C++ 88.73% Java 3.85% Batchfile 0.01% QMake 0.32% C 4.01% Objective-C++ 0.57% Python 0.08% GLSL 0.42%

oxygine-framework's Introduction

BUILD AND RUN

See oxygine-framework/readme/ folder. It has instructions on how to build and run oxygine on different platforms.

Wiki available at

https://github.com/oxygine/oxygine-framework/wiki

Oxygine is a C++ engine for 2D mobile games.

Yet another shell around OpenGL/D3D API you would say? No, this is a set of classes and tools to create a game according to your requirements.

At the basis of the engine there is a scene graph, that is similar to Flash. In short, You can call this as Flash for C++, but more comfortable and way faster. Initially it was developed for mobile platforms (iOS, Android), but can also be used for PC games.

Source code is available under MIT license (use for free anywhere).

##SDK includes:

  • Source code, libraries
  • Necessary tools, documentation
  • Examples
  • Demo for testing and demonstration of base features

##Supported platforms:

  • Android
  • iOS
  • Windows
  • MacOSX
  • Emscripten (web)

##Examples of code:

//create sprite and display it
spSprite sprite = new Sprite();
sprite->attachTo(getStage());

//run animation tween
sprite->addTween(Sprite::TweenAnim(gameResources.getResAnim("anim2")), duration, loops);

//run position tween
sprite->addTween(Sprite::TweenPosition(x, y), duration, loops);

//handle click event
sprite->addEventListener(TouchEvent::CLICK, [sprite](Event*){
    
    log::messageln("clicked to sprite!");
    //change sprite color
    sprite->setColor(Color::Gray);
});

##Features:

  • Programming language is C++.
  • For rendering OpenGL(ES) 2.0 is used. Custom shaders supported.
  • Compressed textures supported.
  • Component based system, simple and predictable OOP API. Possibility to inherit from classes and overload their behavior.
  • No global mega managers of everything, that dictate the requirements and the way you write your code.
  • Effective and flexible work with resources, very close to your game.
  • Components of the engine have weak links between each other. Can be used together, separately or not at all.
  • Fast creation and deletion of objects using memory pools for all engine objects.
  • SceneGraph is somewhat similar to Flash (diagrams with inheritance models). It is built on smart pointers (analogue boost:intrusive_ptr). No need to hassle with memory control, memory leaks.
  • Debug Tools (screenshot). Tree Inspector is “Visual profiler” for Scene Graph. Right in the game you can view the graph and different branches to analyze and errors search. “Textures Inspector” shows you currently loaded textures into memory (screenshot)
  • Render to texture.
  • Resources description is stored in xml file. It has multiple different parameters: you can add your own resources types, format can be set, in which you will store the texture(atlas) in memory, number of columns and rows for animation, etc. Any resource can have user-data attributes.
  • Tweens for frame-by-frame animation, color, position, rotation, etc. Easily create your own.
  • A set of basic UI components commonly used in games: Button, Sprite, ProgressBar and others (image) Command-line tool on Python to process your resources: Build you resources from XML files into atlases, determining the optimal size of atlases. Resize assets from high-res to necessary for your game. Does additional work to optimize work with resources in the game. Compress automatically to ETC1 or PVRTC textures format.
  • Well-designed handling of events from mouse and multi-touch (for example you can press two buttons with two fingers at the same time without collisions) based on AS3 Flash model.
  • It is possible to write code and dialogs in blocking style (concurency programming/coroutines).
  • Accurate rendering of text with line-wraps, vertical and horizontal alignment support, localization, utf-8. Base HTML tags support (screenshot).
  • If you want to add multiple sets of assets for different game resolutions it can be done on the engine level by writing just a few lines of code. You won’t need to adjust coordinates manually for different resolution. It is enough just to keep initial art in high-res.
  • Masking (screenshot, screenshot)
  • Atlas assembling on the fly during the loading, if you didn't provide it yourself.
  • Multi-threaded resources loading.
  • It is possible to partially unload “heavy” resources like atlases from memory. The resouce handle to work with atlas will be still valid (as well as its size) and will even have texture points, but the texture itself will be empty. This is very important when you have strict memory limitations: for example if you created the whole UI with all resources loaded, but there is no need to display them all at once.
  • Fast automatic batching.
  • Bitmap fonts based on BMFont and FreeType. Possibility to add your own font type.

You could build it on top of Marmalade, SDL2 or adapt it for your platform. Oxygine can be built with Emscripten for internet browsers as well.

And this is not everything. There are a lot of easy-to-use features, this framework is not a monster and is clear and intuitive. Viewing a couple of examples is enough to understand how it works.

##Contacts You can find more information at oxygine.org

oxygine-framework's People

Contributors

frankinshtein avatar zmeyc avatar tony avatar otraore avatar neo7k avatar robhshu avatar radonthetyrant avatar ptdave20 avatar yahor10 avatar jordan-woyak avatar pscamman avatar borchbruevich avatar taymindis avatar

Watchers

James Cloos avatar  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.