Games, Games, Games

Games in Synchro

We thought it would be fun to implement a couple of simple games on Synchro to demonstrate some unique elements of the platform.

The source code for these games, as well as many other apps that demonstrate Synchro, can be found in the SynchroSamples GitHub repository. They are open source, and there are instructions for how to get them up and running on your Synchro Server installation in minutes.

WARNING: Synchro is not a game development platform. Synchro is purpose-built for enterprise mobile apps (stuff that's a lot more boring than games, but, you know, runs your business).

When looking at the game samples below, here are a few things to consider:

  • All of the game code is running on the Synchro Server (as with all Synchro apps, none of the app code ever runs on the mobile device).
  • These apps contain no user interface code per se. The entire user interface of each game is accomplished using only data binding (ViewModel changes are made on the server by the game logic, propagated to the mobile client, and the user interface automatically updates to reflect the new bound data).
  • Every game move reflects a round trip to the server (these game were running on our production API server, an Azure instance running almost 2,000 miles away). With real Synchro apps, you will often be able to rely on dynamic local binding to build responsive interfaces that don't round-trip to the Synchro Server on every interaction.
  • Note that performance is pretty decent. Even with a distant server and a slow connection, the full round-trip and client response update is only around 200ms.

Lights Out

The Lights Out game is an implementation of the 1995 electronic game of the same name. When you click any square, it flips the state of that square, as well as the squares immediately above and below and to the left and right. The game is won when all lights are off.

Here is a video of the Synchro version of Lights Out being played:

And here is the code on GitHub. The implementation is under 50 logical lines of code (LLOC).

Game of Fifteen

The Game of 15 is a classic sliding tile game, where the object is to put the tiles in the proper order.

Here is a video of the Synchro version of Game of 15 being played:

And here is the code on GitHub. The implementation is under 80 logical lines of code (LLOC).

In Conclusion

  1. Isn't it cool that you can actually write a game that has no UX code and runs entirely in the cloud, but seems like it's running on your mobile device?
  2. Don't write games in Synchro
  3. DO write enterprise apps in Synchro. It's fun and easy and you don't need any client devs!