I decided to write a game. And, in a hurry. It is desirable for a week subject to work at half time. The final stage was to be published on Google Play (which, of course, is not enough, but more on that later). So this is going to be an article about “vzhuh-vzhuh and production” style, or, as friends said, “Ludum Dare did it for himself”. Technical details will, however, a little.
After a small brainstorming, the idea of ​​"folding the tape" was born. The tape is of infinite length, it can be bent at a right angle (the number of bends is limited), and its "front" and "wrong" sides of different colors. There are also control points of the "front" and "purl" colors. The player wins when the tape passes by the corresponding parties on all control points. Quick search did not give anything like.
It should be noted that I had no idea how much this mechanic would be playable and whether it was possible to make at least some interesting levels. Of course, I drew a little, laid a paper tape, but not very long. That is, I seem to be lucky.
It is time to "choose a tool for the task" (the main argument in holivarah, yes). On the one hand, no complicated 3D, and especially tricky graphics were planned, on the other hand, short terms, and the desire to make the development was pleasant. Immediately I tried to write on the "bare" java with the androids sdk, the benefit of the planned problems was a little, it was possible to gash on the naked OpenGL. Fifteen minutes later, he quit. (let the adepts forgive me, but verbose language.). Then I remembered Haxe and the frameworks for it (there was a little experience). A few minutes of googling 2D frameworks hovering on HaxeFlixel. An important bonus of haxe (and openfl / lime / flixel) was the ability to debug on the desktop (more precisely, on the neko target. The project is very quickly assembled, it works at a good speed). The emulator from Android Studio is still braking, despite the hardware acceleration. Under android the native code gathers.
But, nevertheless, there is a "mouse" on the desktop, and on the smartphone "tachi", and in spite of the cross-platform nature, there are naturally different APIs. But this is the only platform-dependent code that was written.
The entire stack contains many "moving parts" (Android Multiple Versions, Android SDK, neko, haxe, hxcpp, openfl, lime, flixel ...), which increases the likelihood that something will break. The day (!) Was spent on normal installation and configuration, plus some problems appeared in the course of development (I have Ubuntu):
There was such a list of tools:
Since there are no small details, it is not the screen sizes in pixels that are important, but the aspect ratio. There are devices with a ratio from 4: 3 to 16: 9 (only five different ratios). Perhaps there are some rare exceptions, but they are rare. In my case, it suffices to test the most "square" (3: 4) and the most "stretched" (16: 9).
At first I indents and “grid” as a percentage of the screen, but as the artist appeared, and with it the layouts, I began to mark everything by virtual pixels. Those. The layout was in the resolution of 1024x1820, under the more “square” ones, it was fitted with the corresponding indents / snap to the edges.
But there are such manufacturers of smartphones who decided that the hardware buttons are not cool, the soft buttons are cooler. Because of this exit panel, the game gets the wrong size of the "window" at the start. It is treated by extension-android-immersive extension and installation
FlxG.scaleMode = new StageSizeScaleMode();
In the first stete (headband).
Most importantly forgot! Levels. Should be of interest and gradually direct the user to the "chips" that can be used. They wrote with their hands in the code, after which they went through, again with their hands, and, accordingly, set the minimum number of moves for which the level could be solved. Thus, ~ 20 levels were done:
Developer registration costs $ 25. The process is quite fast (about 10 minutes for everything about everything).
An hour before the "deadline" began to flood the game. In addition to the icon and screenshots, GP requires a 1024x500 banner for the background on the game page. Half an hour after downloading, the game was tested and made available to everyone for download. According to rumors, first apk check robots, and spread to the public, and then check people.
By the way, download statistics in the developer’s panel lags somewhere around the clock.
In general, I was pleased. HaxeFlixel can be pretty quickly studied at a level sufficient to wash down a small puzzle. Especially helped by the presence of tweenes (FlxTween), which allow you to "animate" (i.e., interpolate) any scalar variables, several functions to choose from (sine, power, etc.). This is a very lively interface.
After all the tools are configured, the build does not cause problems.
After posting on Google Play, I threw the link into all the chat rooms with friends and obsessively pressed F5 on the statistics page. It turned out about 30 installs. After a month, half of the game was deleted, several random installs from different countries appeared. Actually that's all. By itself, the game will hardly be noticed if there is no PR, popular keywords in the title / description and if the developer does not have a bunch of other games.
Recently released a new version of the game, now it looks much neater:
Play on Google Play
Haxflixel
Useful link about the description of the build process along with the signature apk
Source: https://habr.com/ru/post/319260/
All Articles