Win an Ipad
  Developer   Tutorials   Beginners’ tutorial ...   Introduction to Mosc ...
Lesson 1

Introduction to Moscrif SDK for cross-platform mobile games development

What is Moscrif SDK

Moscrif, standing for MObile SCRIpting Framewok, is a cross-platform development kit for mobile games. As the number of mobile platforms increases, it became impossible to write native code solely for every single platform. Instead, developers seek a "code once, run many" solution to save both, money and time.

We believe that a solid mobile game should run fast and smoothly, therefore we provide amazing 50FPS (best in the industry) and rely fully on OpenGL hardware acceleration.

Most basic games can be created within minutes as no advanced programming language as C, C++ or Java is needed. Moscrif is based on JavaScript that is not only known by most developers, but also is extremely easy to learn and use.

Advantages

Moscrif SDK offers everything a modern game developer is looking for and many new features are on the schedule.

  • Cross platform – you can easily create a game for iOS, Android and many other devices using just one code base.
  • IDE – Moscrif comes with its own IDE that of course can’t be compared to Visual Studio, but it simple and straightforward providing all the features a developer might need.
  • Free to download – in the most basic version, Moscrif is free to download. Because all the others similar SDKs doesn’t offer free download, it is well suited for beginners or developers on budget.
  • Performance – Moscrif uses powerful OpenGL graphics engine making it possible to provide amazing 50FPS for both, games and applications.
  • Easy to learn – learning new languages is not needed making the learning process quite fast as you can re-use your JavaScript knowledge.
  • Windows / Mac / Linux – all the major platforms are supported (Linux scheduled for Q4 2012)

Supported platforms

One of the key advantages is that only one code base is needed. Don’t waste the time with every platform separately. Write the code just once and run the game on devices like iPhone, iPad or Android devices.

Moscrif supports all the popular modern platforms like iOS, Android, Bada, Nook or Kindle. Windows Phone support is scheduled for Q2 2012. Such an amazing support allows you to build your game just once and port it to a large scale of devices. As a result, the biggest possible audience will be targeted helping to monetize the game as much as possible.

JavaScript

Unlike other similar tools, Moscrif doesn’t use any new programming language. Instead, it is based on well-known JavaScript. This great benefit makes it easier to adopt for web developers as they are already familiar with it.

Moreover, JavaScript is extremely easy to learn with countless number of tutorials all over the web. Therefore, it is well suited for beginning game developers as well.

Development with Moscrif SDK

Downloading the development kit

As mentioned before, Moscrif offers a free license that can be downloaded here https://moscrif.com/download

The system requirements are as follows:
For Windows users:

  • Windows XP+
  • .Net framework 3.5 or newer, Gtk#
  • 1GB RAM
  • 100MB of HDD

For Mac users:

  • Mac OS 10.7 or newer
  • Mono 2.10.4 or newer
  • 1GB RAM

The requirements for Linux users are not known yet, as the support for this platform should be available on late 2012.

As you can see, unlike other similar SDKs, you can develop mobile games no matter what your favorite platform is.

IDE

Integrated development environment is already included in the SDK download and can’t be downloaded separately.

Your first mobile application using Moscrif SDK

What would be the first lesson without the old school Hello World application?

Every game developed in Moscrif SDK has to be based on Game base class. As seen on the code snippet below, new Paint object was created that is responsible for drawing various objects on the device’s main screen.

For the purposes of this tutorial, iPhone 4 was selected as the targeted device. You can change the targeted device anytime in the upper toolbar in the IDE.

include "lib://game2d/game.ms"  //base class for all games, should be included in every game project class MyGame : Game
{
    function start()
    {
        super.start();
        this._paint = new Paint(); // new Paint object responsible for text decoration; with black background by default
    }     function draw(canvas)
    {
        canvas.clear(0xffffffff);   // fill the canvas with white background color         this._paint.color = 0xff0000000; //black color in hexadecimal format
        this._paint.textSize = 30;
        canvas.drawText("Hello Game", 210, 100, this._paint);         this._paint.color = 0xff33ff33; //green color in hexadecimal format
        this._paint.textSize = 50;
        canvas.drawText("Hello World", 135, 220, this._paint);         this._paint.color = 0xffff0000; //red color in hexadecimal format
        this._paint.textSize = 70;
        canvas.drawText("Hello Moscrif", 45, 340, this._paint);
    }
}
new MyGame().run();

Your next steps

The Hello World application is just the beginning. It needs some time and effort until you’ll be available to create great games with smooth animations and graphics. More tutorials are on the way that will teach you not only the very basics, but also advanced techniques you will benefit from. So stay tuned and happy developing!

Summary

Moscrif is well suited for both, skilled developers and beginners. No matter what mobile platform are you aiming for, it supports all the currently popular ones. With free to download license and its own IDE, it appears to be the right solution for game developers.

Hope you enjoyed this tutorial and thanks for reading it. More advances tutorials are on the way, so stay tuned!

 Introduction to Mosc ...   Bitmaps, Text button ... 
Tutorial details and chapters
Technology:
iOS, Android
Difficulty:
Beginner
Completion:
30 min
Beginners’ tutorial series chapters