You can edit almost every page by Creating an account. Otherwise, see the FAQ.

Oxygine

From EverybodyWiki Bios & Wiki


Oxygine
Developer(s)Denis Muratshin
Written inC++
Engine
    Operating systemMicrosoft Windows, Linux, iOS, MacOSX, Emscripten
    TypeGame SDK
    LicenseMIT license
    Websiteoxygine.org

    Search Oxygine on Amazon.

    Oxygine is a C++ engine for 2D mobile and PC games. In the basis of the engine there is a scene graph, that is similar to Flash one. This feature is like Flash for C++, but more comfortable and way faster. Initially it was developed for mobile platforms (iOS, Android), but can be also used for PC games. Source code is available under MIT license (use for free anywhere).

    SDK includes[edit]

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

    Supported platforms[edit]

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

    Examples of code[edit]

       //create sprite and display it
       spSprite sprite = new Sprite();
       sprite->setResAnim(gameResources.getResAnim("anim"));
       sprite->attachTo(getRoot());
       sprite->setScale(0.5f);
    
       //run animation tween
       sprite->addTween(TweenAnim(gameResources.getResAnim("anim2")), duration, loops);
    
       //run position tween
       sprite->addTween(Sprite::TweenPosition(x, y), duration, loops);
    
       //handle events
       sprite->addEventListener(TouchEvent::CLICK, CLOSURE(this, &someClass::onClick));
    
       //short syntax example
       sprite = initActor(new Sprite,
             arg_resAnim = gameResources.getResAnim("plus"),
             arg_scale = 0.5f,
             arg_onClick = CLOSURE(this, &HUD::clicked),
             arg_pos = Vector2(70, 55),
             arg_attachTo = getRoot());
    

    Features[edit]

    • 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 dictates requirements to 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. If you want to use your own scene graph you can use just low level images rendering system from Oxygine.
    • Debug Tools. 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. “Textures Inspector” shows you currently loaded textures into memory
    • 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. Your own can be easily created
    • Set of basic UI components commonly used in games: Button, Sprite, ProgressBar and others
    • 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. For different event handlers(or tweens) you can setup callbacks based on Winnie.Closure.
    • 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.
    • 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.
    • Screenspace masking
    • Atlas assembling on the fly during the loading, if you didn't make it before.
    • Multi-threaded resources loading.
    • It is possible to partially unload from memory “heavy” resources, like atlases. The resource handle to work with atlas will be still valid (as well as his size) and will even have texture point, but the texture itself will be empty. This is very important when you have strict memory limitations: for example if you created all UI with all resources loaded, but there is no need to display them.
    • Fast automatic batching.
    • Bitmap fonts based on BMFont. Possibility to add your own font type.
    • You could build it on top of the Marmalade, SDL2 or adapt it for your platform. Oxygine also could be build with Emscripten for internet browser.

    And this is not all. There are a lot of features, but it is easy to use them, framework is not a monster and very intuitively clear. Viewing of couple examples would be enough to understand how it works.

    References[edit]


    This article "Oxygine" is from Wikipedia. The list of its authors can be seen in its historical. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.