Under the hood

Let's talk about the technology used to develop Slide Four.

The game use the MonoGame engine, and is written in C# instead of Java thanks to Xamarin framework. This allow cross platform delelopment for Android and Apple iOS reusing the same codebase.

To speed up the development process I created a shared project containing all the game logic and assets, and two different implementation projects: one for Android and the other one for Windows.

Using this approach I mainy develop on Windows, which is much faster than debugging every time directly on the Android device. I choosed to discard the Android emulator from the beginning, even using hardware acceleration it results too slow on my PC. 

The iOS porting is planned in the future, I need a Mac to doing it. For the moment I joined the Apple developer subscription, thus when I will be ready I shouldn't wait too late to implement the iOS version.

Developing on Windows helps me too in scaling the app's contents into the screen. The game use a portrait virtual screen of 480 x 800 pixels. A bit low for today standards, but I can increment the screen size in the future. Well, I use an Asus Zenfone 4 Max Pro as dev device, which have a huge Full HD screen (1080 x 1920 pixels). On Windows I choosed a 360 x 600 pixel app display.
I set up a class representing the virtual screen and containing the horizontal and vertical scaling ratios, so every thing will be rescaled on screen when drawing operations are performed.

Similar approach for the inputs, which are mouse clicks on Windows, and taps on mobile. I defined a generic Input class, and two other classes to extend it for mouse inputs and hand taps. The mobile solution use the touch input class, while the Windows solution use the mouse input cass. On game kernel side I refer only to the generic input class.

See ya...