DevelopmentDevelopment began on October 17th. In total, we spent 45 days during which:
- We learned how to use libGDX.
- We wrote code.
- We created graphics.
- We created music.
- Mastering how to use the game engine.
- Drawing and redrawing artwork.
- Writing music.
- Searching for sounds on https://freesound.org.
- Reading heaps of articles on how to promote games.
Initially, all game elements were generated randomly. In other words, we put providers (of black holes, scissors, ninja stars, pencil lead, hearts) into an array, got a random provider, got an element with random coordinates. It became clear pretty quickly that this approach was "really not really good". Friends participating in testing told us the same thing, recommending the use of templates. For those involved in game development, this is probably an obvious solution. But because we were newcomers to the field, it was very practical advice for us.
So we created several templates: a valley of scissors; pencil leads — it's pretty cool to collect them super fast (whoosh, whoosh, whoosh with your finger); and one more template that I don't know what to call — I'll just tell you what we named the class in our code:
These templates improved it, but it became too predictable somehow. That's why we added one more: a random template. In other words, we now have some "static" templates and one random one (insert "perfectly balanced" meme here).
Here's the main problem we encountered. LibGDX calls the render (float delta) method in an infinite loop. This is where all the elements are drawn. The pencil line is drawn as follows: we get finger coordinates and draw texture there. So, if we moved our finger across the screen very quickly, then the line would have "gaps" due to the milliseconds between calls to the render(delta) method.
The solution was quite simple: we remember the last coordinates where the texture is drawn, get the next coordinates, and if the distance between them is more than X and the finger hasn't been released, then we fill the gap. At first, we thought this option might not work — the lines would be angular. But our fears were unfounded, everything worked just as it should.