Marmalade makes it easy to create games that run cross-platform

    Marmalade makes it easy to create games that run cross-platform

    Marmalade makes it easy to create games that run cross-platform


    Posted: 12 Apr 2016

    At //build 2016, developers were shown how to create cross-platform games for iOS, Android, and Windows 10 using Visual Studio and the Marmalade Platform, the leading cross-platform solution for game developers.

    Developers can write code once and deploy it to many types of devices using Marmalade Core, a cross-platform C++ SDK, leveraging a platform abstraction API that hides much of the complexity of native platforms.

    Accessing a device’s accelerometer, for instance, reuses the same code across platforms:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    // Start the accelerometer
    accelAvailable = s3eAccelerometerStart() == S3E_RESULT_SUCCESS;

    // Read the accelerometer
    if (accelAvailable)
    {
    int32 x = s3eAccelerometerGetX();
    int32 y = s3eAccelerometerGetY();
    int32 z = s3eAccelerometerGetZ();
    }


    Projects can be opened in Visual Studio 2015 using the Marmalade Hub, the go-to tool for organizing and working within Marmalade Core.



    Marmalade Core: Project ready to Open in IDE with a click

    Visual Studio cross-platform technology

    By default, Marmalade Core projects produce a Visual Studio solution capable of generating an app binary that can be deployed to several target platforms without recompiling.

    The new cross-platform features of Visual Studio 2015 allow native debugging of Marmalade Core apps running on either the Visual Studio Emulator for Android (x86) or an attached Android device (ARM).

    Marmalade can easily allow game devs to, for instance, target iOS and Android from a Windows machine using this “single-binary” approach. This type of Visual Studio solution is ideal for generating a binary for distribution or for debugging on the Marmalade Desktop Simulator.



    Marmalade Core: Project being debugged as a native Android app in Visual Studio

    For on-device native debugging, Marmalade Core projects can also generate a special Visual Studio solution that allows for debugging on Windows Phone, Windows 10, and now Android. All it takes is a single click in the Marmalade Hub and Visual Studio will open, ready to build and debug your Android app.

    Hands-on with Marmalade 2D Kit and Marmalade 3D Kit

    As part of showcasing how Marmalade Core and Visual Studio combine to help create great cross-platform games, we also went hands-on at //build with 2D Kit and 3D Kit.

    2D Kit offers a set of tools and APIs to make creating 2D content easier than ever before. With a focus on user interfaces, 2D Kit’s editor can dramatically reduce the time and cost of creating a rich, dynamic, and engaging UI experience for your game.



    Marmalade 2D Kit: Editor in action

    With the help of a dedicated 2D Kit runtime, integrating the content you create in the editor with your existing pipeline and game code in Visual Studio is quick and straightforward. The code outline below illustrates how to go about integrating the runtime with your code.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    m_SceneContainer.RegisterTextureLoadCallback(...);
    m_SceneContainer.RegisterTextureUnloadCallback(...);
    m_SceneContainer.RegisterFontLoadCallback(...);
    m_SceneContainer.RegisterFontUnloadCallback(...);
    m_SceneContainer.RegisterStringLoadCallback(...);
    m_SceneContainer.RegisterStringUnloadCallback(...);
    ...
    m_SceneContainer = new CSceneContainer();
    ...
    m_SceneContainer.LoadScene(...);
    ...
    m_SceneContainer.DrawScene(...);



    3D Kit brings together a suite of tools and APIs to simplify the creation of 3D games built using Marmalade Core.
    Projects in Marmalade Core can seamlessly import and use resources created in modeling tools with FBX support, such as Maya, 3ds Max, and many more. Previewing your FBX files is easy thanks to Visual Studio’s integrated Model Editor.

    As a simple example of how 3D Kit can be used within a Marmalade Core project, here’s how you can load and render a 3D model.
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    // Load the 3D board model and materials
    CIwResGroup* pGroup = IwGetResManager()->LoadGroup("Board.group");

    // Get a reference to the model resource
    CIwModel* board = (CIwModel*)pGroup->GetResNamed("board", IW_GRAPHICS_RESTYPE_MODEL);

    // Build model’s 3D transform
    CIwFMat Transform
    Transform.SetRotY(Rotation.y);
    Transform.ScaleRot(Scale);
    Transform.SetTrans(Position);
    IwGxSetModelMatrix(&Transform);

    // Render the model
    board->Render();


    There’s lots of useful information on 2D Kit to be found in the Marmalade developer documentation here. To find out all about 3D Kit, take a look the developer documentation here.

    At //build, we also offered a look ahead to the future of 3D Kit, including an all-new editor for improved workflow efficiency and a next-generation graphics architecture, leveraging leading industry technology, such as DirectX 12.

    Want to know more? Download the Marmalade Platform for free at the Marmalade Developer site.

    Posted by Patrick Stanton, Director for Post Sales Monetization, on behalf of Marmalade



    Source: Marmalade makes it easy to create games that run cross-platform | Building Apps for Windows
    Brink's Avatar Posted By: Brink
    12 Apr 2016


  1. Posts : 7,254
    Windows 10 Pro 64-bit
       #1

    I like marmalade on bread, not in my PC!
      My Computers


  2. Posts : 11,247
    Windows / Linux : Arch Linux
       #2

    Hi there
    Nice Idea

    I believe IBM years ago tried something like this with a very capable Interpreter known as REXX -- that was when PC's where just starting and IBM was a REAL computer company rather than primarily a servicing and outsourcing service.

    Not sure what happened to REXX but it made development really simple on those early PC's - even some elementary Games like Slot machines were possible to create using essentially English sentences for coding. About as far away as possible from a really Geek "C" coder who probably delights in making code as obscure as possible !!!!!.

    The same source could run on loads of different platforms. It's a pity it never took off unlike Visual Basic or Java.

    If you want to have a go on a PC this page I think is still active. REXX is really simple -- if I can do it anybody can !!!

    rexx.org - Mark Hessling's Home Page

    Cheers
    jimbo
      My Computer


  3. Posts : 135
    win10
       #3

    Im taking course for game design and programming.

    Im finding out..

    there is alot of development software out there and even more coming out..
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 06:17.
Find Us




Windows 10 Forums