📜 ⬆️ ⬇️

Making an "adult" application for Android using the "child" programming environment Scratch

I got the idea to make an application for Android smartphone for the non-computer board game “Battle of Golems”. Sometimes this comes to mind. I wanted to make a program that would replace for the free Print & Play version of the game 20 good luck cards and a round counter, generating for two players the current Bonus card (or lack thereof) and showing the round number. This would save for those who print the game, two sheets of A4 format.



But what to do? I wanted something quick and not expensive to learn. From simple solutions came only AppInventor, which I have already used to create a robot control from a metal constructor. But then he decided - why not try something else?
')
The search showed that it turns out you can create applications (alas, not standalone, but now there are almost no problems with the Internet) on ... Scratch. Yes, it is in this “childish” programming environment, which I knew well when developing robots and methods for it before.

So I decided to make an application for a smartphone on ... Scratch.

The first step was to create the application itself. You can watch it by reference .

It is quite simple - two buttons that, when pressed, drop everything or generate data for the next round, sprites of good luck cards and a random number generator that gives them out. Just look at the code - I used several variables and signaling. All programming took no more than an hour. Alas, the most important thing (and I didn’t understand it immediately) - all graphics in the project should be raster!



And now ... MAGIC! I need to turn the Scratch project into an apk file for a smartphone. And I will do it in two steps:

Step 1 - generate an online application by inserting a link to the project in the input line on the Phosphorus project site .



Insert the link to the project and click Package.



Step 2 - I converted the resulting link with the application to apk on another site - appsgeyser.com

To do this, simply click Create Now and select the type of Website. Next, insert a link to the generated online project with your application, invent a name for the application and add additional information - a description and an icon. Press Create and (here you can be asked to register) the magic works - all you have to do is open the suggested link on the smartphone and wait for the generation and upload of the apk-file to it, which you can install and give to others. In fact, in Appsgeyser, you can do more complicated things, but I think here you will understand.



You can always look at the Dashboard and fix your application by regenerating it via the Scratch -> Phosphorus -> Appsgeyser chain.



You can download and test the finished application (apk) for the Print & Play version of the Golem Battles board game via this link .

Source: https://habr.com/ru/post/307940/


All Articles