Hi,

Depending on the type of game, you might want to use a C++ backend for 
performance reasons.  Many games, however, can be written with the game logic 
implemented in JavaScript and perform just fine.

Eg, the "Maroon" demo (from the Qt5 qtdeclarative demos) available at 
http://qt.gitorious.org/qt/qtdeclarative/trees/stable/examples/quick/demos/maroon
 uses pure QML/JS with a simple cpp entrypoint.  It's a fairly simple "tower 
defence" game with a coral-reef theme.  It will run just fine on quite low-end 
hardware, to be honest.

Obviously, it's a Qt5 demo, so won't work with Qt4 (it uses particle effects 
which aren't supported in Qt4, for example), but similar demos from Qt4 (like 
the Qt4 version of SameGame) show that this type of game can be written with 
Qt4 QML/JS just fine.

But, yeah, for games which are more complex, or games which use much more 
OpenGL, just go straight to C++, I'd recommend.

Cheers,
Chris.

________________________________________
From: devel-boun...@lists.sailfishos.org [devel-boun...@lists.sailfishos.org] 
on behalf of Jonni Rainisto [jonni.raini...@jollamobile.com]
Sent: Wednesday, April 17, 2013 6:39 PM
To: devel@lists.sailfishos.org
Subject: Re: [SailfishDevel] How to write a game on Sailfish OS?

Hi

I agree that you usually you don't want to use javascript for game
programming (you run in performance issues).

However usually QML with C++ is pretty good choice. Or you can go with
plain full screen C++ & opengles2 game, or even use python or any other
programming language of your choice.

One pretty nice tutorial about QML with C++ is avail in here
http://quitcoding.com/download/Qt_Quick_Game_Programming_1_0.pdf

br, Jonni

On 04/17/2013 11:10 AM, thuai wrote:
> I want to write a simple game run with Sailfish OS. What language should
> be used? I don't want to use qml and javascript. Can c++ do this mession?
>
> thks for reply!
> _______________________________________________
> SailfishOS.org Devel mailing list

_______________________________________________
SailfishOS.org Devel mailing list
_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to