For a clear sky above the head
Last year we launched a picosatellite with a real server into orbit, and in honor of this we made a Telegram game
“Satellite against garbage”
. We recommend that you try your hand at it if she suddenly passed you by. We are already
we will not repeat ourselves about how the idea of the game came about and which characters were invented for it. Here we will talk about the development.
The game is written on the engine
It is among the top three JS engines for developing 2D games. And not only them, it is often used to create graphical web applications. Unity is good, of course, but it is not yet adapted for the Internet. That is, it can do it, but the performance of the released applications may be low, which was experienced by some users of our last game
. Phaser is more low-level, giving more control over optimization. In addition, our game is two-dimensional, so Unity’s arsenal would be excessive.
All characters are single-sprite, because there is no animation. Only the surface of the Earth floating in the background is animated. We did not insert a 3D model or video so that even weak smartphones could handle the game. Instead, we took a rectangular texture of the earth’s surface, applied a mask and gradually shifted it in a cycle, imitating the rotation of the planet. And they added visual effects so that there was no feeling of a boring plane.
Many of you know that games and graphics programs use so-called texture maps: these are large images in which all kinds of textures are placed tightly, close to each other. The package includes files with the coordinates and names of each texture on the map. This is much more convenient, faster and more economical than uploading dozens and hundreds of individual image files.
HTML5 audio support is very limited on iOS and some Android phones. They only support playing one file at a time, and loading new files requires user intervention. To get around this, we used the same method as in the case of textures: in AudioSprite, we combined all the sounds into one file, and during the game we played only some specific sections of it using a “coordinate” JSON file. Moreover, in our case, each sound is presented in three formats: mp3, mp4 and ogg, so that there is compatibility with different browsers.
The game uses the Telegram API to get information about the user and to automatically stretch the game window to full screen: by default, in the messenger, applications open in a small window, which you have to pull on the edge to expand, which is inconvenient.
▍ Protection against fraudsters
We have implemented a fairly simple but effective anti-cheat system. With the help of some tricks, we calculated for each player whether he played fair or cheated himself. Frankly, we will not become, you understand, everything is under control. It is gratifying that despite the simplicity of the defense, no one was found who would break it completely. (Screams from the hall: “It’s hacked, that’s why you don’t know about it” will be left to the conscience of the screamers.) There were a few cunning people who dug into the game code and tried to spin the results for themselves, but we caught them,
If you haven’t played yet, don’t spoil the surprise, try to find the Easter egg yourself.
One of the characters you need to shoot down with a satellite is an astrohamster. If you manage to press it five times in a row, a black hole will open in the center of the screen, which will suck up all the flying debris, and then disappear. This gives the player a break.
On January 23, we summed up the results of the game and named the best fighters with space debris. They became:
🥇1st place – TheProgish (2616 points)
Gift – Yandex Midi Station.
🥈 2nd place – peach_nv (2061 points)
The gift is Baseus Bowie D05 wireless headphones.
🥉3rd place – LeXaNe (1808 points)
The gift is a MagSafe Hoco Q10A external battery, 10,000 mAh.
Also, each winner received a sweatshirt with the personal signature of cosmonaut Mykhailo Kornienko.
Discounts, raffle results and news about the RUVDS satellite — in our Telegram channel 🚀