"Don't Touch The Green" is a dynamic arcade game, testing the player's perception and reflexes in an unusual way. The player's goal is to match the colours with their proper names without touching any green elements. However, there is one catch - the font colour of the text and its background, does not match its name! In the game there is a dynamic level of difficulty, which, among other things, reduces the intervals in the appearance of colors and increases the maximum number of elements on the screen, making the challenge all the more intense as the time passes by. Over time, the gameplay is also supplemented by new elements that the player must pay attention to - emojis.
What is the best way to demonstrate the capabilities of the Qt technology, and not forget about non-business users who just want to have fun? That is right – create a multiplatform game!
However, creating a successful game is not so simple. Engaging mechanics, challenging gameplay, and interesting concept are only a few of many issues you have to work out when it comes down to designing one. Nevertheless, the most important thing is to make the app exceptional in some way.
The way we wanted to achieve this in the case of DTTG was to mess with the player’s perception using in-game mechanics. The Colour of entities not matching their actual name is an unusual way to test attentiveness and dexterity.
However, how did it come down to create such a weird title of the game? The main “villain” of the game needed to be a color that is usually associated with positive feedback. The green was an obvious choice. Those two main factors made a great combination for an arcade game.
Let’s not forget that DTTG is a tech demo, so there are things we want to demonstrate with this app. Let’s start by talking a little bit about the core of DTTG itself – Qt technology.
Why devs love Qt? It is constantly developed and maintained, so new features are provided regularly. On top of that, there is absolutely outstanding documentation that provides answers to almost every question. There is also QML declarative language which stands for “Qt Markup Language”. The main positive trait of the language itself is its efficiency – it is written in C++ and runs natively on target devices. Due to its JSON like format, it is also straightforward to read and maintain. In our opinion working in it is a pure pleasure. Remember – a happy developer is a guaranty of a successful application.
First, of many features of Qt, you should focus on is the ease of creation multiplatform solutions when using this framework. DTTG has a single 2894 line codebase, based on QML and C++ language, that allows deploying to many platforms without any additional coding. Not without reason, one of the Qt slogans is “Code once, deploy everywhere”. You are no longer limited by technology to stick to a single platform.
This superior feature provides devs with the possibility to deliver products faster and for clients to save money. You do not have to rewrite the app when it comes to deploying to another platform or cut corners because you have to depend on memory inefficient and feature-limited web app based frameworks.
Resource effectiveness is especially important when it comes down to game development. Responsiveness and smooth visuals are one of the key factors for player satisfaction. To provide that you can abandon some features or use some low-level technology which makes coding a nightmare… but these scenarios will not happen if you are using Qt!
Among the advantages for which Qt is known there is also memory efficiency. While using Qt you can integrate lightning fast C++ app logic with smooth and efficient QML front end. As we mentioned before QML is written in C++ so it is pretty effective by itself. On top of that, if possible, hardware acceleration is used to increase its performance. The language also benefits from the Just-In-Time and Ahead-Of-Time compilation.
With that, you can create an app that can be run without a hitch on any device – from smartphones to embedded devices like RaspberryPi Zero. Those are not only baseless statements. When running app on Windows machine, the RAM consumption of DTTG (while playing the actual game, not in the menu) fluctuate between 90-125 MB. This is almost the same RAM consumption as running Ionic angular blank app template!
To make the whole process of project creation as efficient as possible we pushed even further than just using the Qt itself. DTTG also utilizes Felgo – a cross-platform application development SDK.
Besides giving you access to many ready-made classes, it provides you with one of our favourite tools: QML Hot Reload. It gives you the power to view the results of changes in the code in real-time without the need of rebuilding the app. With that tool, UI implementation is lightning fast.
Stand-alone Qt is capable of providing everything that mobile game dev should need, but why to reinvent the wheel? At its roots, Felgo is a framework dedicated to game development. Apart from our beloved Hot Reload, it provides objects that make game creation a piece of cake. Physics, multiplayer, animations and many more components are provided by Felgo.
Using Qt when creating 2D mobile games is a good choice. Nevertheless, this is not the only case when Qt shines bright. You can find more tech demos created by the Scythe-Studio team that presents the power of this great framework.