0
\$\begingroup\$

I would like to build an app like the onw downloadable from here https://playhatch.com/. How is it possible, technically speaking, to achive such result? Need I to implement some instant app feature? Need I to instantiate a kind of android runtime like a "mini docker image"? What's the technical concept which allows to implement such a feature?

Many thanks

\$\endgroup\$
0
1
\$\begingroup\$

One way I can think of, is using javascript. Assuming multiple games made with javascript, you can make a "docker" app, that includes all thoses, possible as files in the hard drive, and you can play any of them on-demand using javascript. You can also use the same method to download games from a website, although this may affect the age rating of your game, and if not handled well, may not be allowed in some Stores. This of course means that whenever you want to try a new game, you'd have to wait some time for it to download, similarly to how android handles the Play Store.

I haven't used the app that you mentioned, but if by "streaming" it means you are playing the game while it downloads, then you have to make the game in such a way that its playable with some of the assets, and while the user is playing it, it keeps downloading new ones. You'd have to separate the game in chunks like "basic" and "extra" or something similar.

You could probably do it with native code as well, but it would behave very similarly to the Play Store (for android), and it may not be allowed in some stores.

\$\endgroup\$
11
  • \$\begingroup\$ Thank Tom, that's more or less also what I ended up with. But what it strange, is that for example that app allows you to play for example to Monument Valley, so completely integrated with the play store \$\endgroup\$
    – simone
    Feb 21 '19 at 16:37
  • \$\begingroup\$ @simone are you sure this is "completely integrated with the play store" ? If it's not made by google, and allows users to download apps from the Play Store without interacting with it, I'm pretty sure it would violate Google's ToS. I've never used the app though, so not sure if I'm missing something. If it doesn't work that way, it would be useful to include in your question how it works, as people aren't likely to try it just to answer a question. \$\endgroup\$
    – TomTsagk
    Feb 21 '19 at 17:32
  • \$\begingroup\$ I don't think the linked app works by downloading the game to the local device. It looks like a streaming app like the now-defunct OnLive - running the game on a server somewhere, and streaming its video/sound output to the client device, which in turn streams its user input to the server to input into the game. \$\endgroup\$
    – DMGregory
    Feb 21 '19 at 17:40
  • \$\begingroup\$ @DMGregory Oh, that would make sense, so no matter what the game is or how performance intensive it is, the app always streams pixels and runs smoothly? \$\endgroup\$
    – TomTsagk
    Feb 21 '19 at 19:06
  • 2
    \$\begingroup\$ I can verify that Hatch does indeed run apps remotely on external servers, and you log in from any device to access your save game. The game is a special build, usually based on the Google Play build, but this is not strictly necessary. \$\endgroup\$
    – Ed Marty
    Feb 22 '19 at 0:57
1
\$\begingroup\$

The way this particular app works is as a "thin client"

The software running on your local device is just a relay. It accepts your inputs and sends them to a remote server.

The game running "inside" the app is actually running on that server. It accepts the relayed input and uses it to update the game state, and streams the resulting rendered video to your device for display.

This is similar to how the old game streaming service OnLive worked, a model which is now most famously used by Google Stadia.

With this model the game can run on hardware vastly more powerful than the device the player is holding, but at the cost of lots of bandwidth to transmit the rendered view, and latency from the back-and-forth communication (and compression/decompression) involved.

As for how to implement your own steaming platform in this vein, my advice would be: do not do this.

Doing this well, managing the sheer bandwidth demands and optimizing latency, takes an immense investment in engineering and infrastructure — a Google-scale project. If you have to ask how to do it on StackExchange, then it is very likely you do not have the resources to pull it off successfully.

A better bet may be to evaluate existing, battle-tested streaming platforms, to see if any of them would meet your needs, then release your game on that platform. Let the experts in streaming handle that part, so you can focus on your game.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.