Mobile application - Compagnon Rallyman GT

Views: 78

What is Rallyman GT?

Before talking about the companion application, we need to introduce Rallyman GT. Rallyman GT is a very good rally-themed board game, written by Jean Cristophe Bouvier, a very nice man who's totally passionate about what he does.
The game is published by Holy Grail Games, a publishing company that makes it a point of honor to produce quality games. They are a passionate team, and most of their games are launched on the KickStarter platform.
Rallyman GT was funded on KickStarter in December 2018.

What does the app enable?

The app has three main functionalities: Circuits, Time Trial and Championat.


Application Rallyman GT - Circuits

This tab brings together all the official circuits, to enable players to quickly assemble the tiles to create the board for the circuit in question, for each circuit the list of tiles making it up is provided in list form, two images representing the circuit are also provided, one image showing what the circuit looks like once the tiles have been assembled, one image with more detail showing directly the identifier of each tile making up the circuit.

The time trial

Application Rallyman-GT - Solo

This is the part that accompanies the game's single-player mode, allowing players to follow their solo games. They enter the circuit they've chosen (official or custom), their aniseed nickname and other information such as the weather or tire type.At the end of the game, the application calculates and saves the scores on a "Score Board", so that players can review the details of their games whenever they like.

Championship mode

Application Rallyman GT - Championnat

This mode accompanies the game's multiplayer mode, and its functions are very similar to those of the single-player mode, except that there are several circuits and several players (who may or may not be in teams).As in single-player mode, these results are saved in a "ScoreBoard" so that players can consult their scores later, compare games .. etc.

What type of application is it?

It's a so-called hybrid application(I talk about it here), using web technologies for its interface, a choice made for several reasons:

  • To shorten development time.
  • To be as independent as possible of each manufacturer's operating system.
  • To enable it to be transformed into a PWA, so that gamers can use it on all platforms, for example, or if App Store validation becomes more complex than originally planned (iOS developers get my drift :p).

A web-only application?

Even if it's a hybrid, it uses "native" technologies. For example, ScoreBoard data is stored via SQLite, and both mobile platforms have an embedded version of SQLite.
The web has built-in storage systems such as "localStorage", but I preferred to use embedded SQLite for several reasons:

  • To be sure that scoreBoard data is backed up when the phone is backed up (Google Drive / iTunes / iCloud)
  • To be able to store more data, from my point of view iOS limits a lot of things in the web APIs, WKWebview (which is the Safari engine used in hybrid applications) is much more limited than what Android offers (with Chrome Webview), so except for display I prefer to use native.

Image display and pinch-to-zoom is also a native module linked to each platform, it's possible to do it in basic web, but knowing that a module for Cordova already existed and did it very well I chose to use it, which gives a good user experience when you want to look at an image in detail (like the circuit images).

The application's interesting features

From a technical point of view, this application wasn't a big challenge: it's totally offline, no API calls to any server, and it embeds the data required for its operation directly in the binary. To make it more interesting, I integrated a "watcher" that monitors the state of a game in progress, in order to save it intelligently.
The idea behind this "watcher" is to prevent data loss. Let's say a game is in progress and the player, for whatever reason, needs to use his phone and leaves the application. But here, when the player restarts the game (whether in single-player or championship mode), the app suggests that he/she return to where he/she left off, and this also works if the smartphone shuts down because it's out of battery - which means that when you're caught up in a game, you don't have to watch your battery :p. Finally, the automatic status backup is compatible with iCloud, iTunes and Google Drive... And yes, even if the player breaks his phone, he'll find his game on the new one, although in that case it's true ... I imagine that finding his game won't be his first problem ... haha.
Previously I said that as a hybrid application it could be ported to PWA, in fact this has been done, but it's not used in production, as the majority of players use it on Android (and a small proportion on iOS).
Finally, as Microsoft CodePush is compatible with Cordova, it would have been possible to use it to shorten the deployment of bug fixes, but development time didn't allow it.


After presenting Josselin's React Native application"Neartrip" two weeks ago, Rallyman GT is a good example of a simple hybrid application, I've developed other more complex hybrid applications (with API calls, caching and even notifications ... I'm laughing ZERO. :p), which I'll present to you later.