I present my new game - “Brick Break”.
There is old classic puzzle game, moved to 3D, in graphics and gameplay.
Link to Play Market
Game implemented on AngelScript + Urho3DPlayer.
Later I will github sources - scripts itself and my changes in Urho3D engine.
If there are technical questions on the implementation of the game - I am ready to respond.
From the interesting features of the game I want to note
- 14 procedural live GPU-calculated backgrounds.
- Custom shaders for rendering tiles, optimizing for mobile performance.
At the beginning every tile has model with three materials with different diffuse and specular colors and rendered in 3 drawcalls. Later colors was be assigned to vertexes as attributes, and render at one drawcall. This led to the need to write custom shaders as the standard did not support the work with two colors at the vertex. It also took to create a utility that converts a model of three materials into a model with one material, recording the colors of the materials into vertex attributes. Thanks to the excellent support of scripts, this utility also turned out to write on the AngelScript.
- Pseudo “instancing” for rendering tiles on edges of cube.
Initially, each edge was drawn as 24 individual tiles, because each could have its own color, and the tiles could move. OpenGL ES 2.0 does not have instancing support, and it requared 24 (at the very beginning, even 72) drawcall for each edge - very bad. Therefore, for the cube edge, one common model was created, in which an attribute — the tile index — was additionally set for the vertices of each tile. After that, uniforms were transferred to the shader - an array of 24 vec2, in which the index of the tile color was specified in X, from 0 to 5, and in Y - whether this tile should be drawn at all (0 or 1). The values of colors themselves were transmitted in another uniform. When the tiles on the edges moving, in shader of edge is transferred not to draw this tile, and on this place an individual tile is rendered. This is reduces drawcals for each edge for only One.
- Support in shaders of 3 variants of graphics quality, which user can switch in game settings. Also enable 4Xmsaa in screen mode.
- Integrate android billing and ads. For ads using appodeal sdk, integrating many ads network, also supported admob and unity ad. For appodeal native ads I was able to render native advertising in the game space - on blank cube face. All billing and ads game logic implemented also on AngelScript, java-part of the game only transmit events to urho engine. In Urho3D was added “mbedtls” library for verifying purchase’s rsa-signature also in script, not in java-side.