DrumHero: How I Made My First Game

This year the SAMSUNG IT SCHOOL social and educational program turns 5 years old (read about IT SCHOOL here), and on this occasion, we invited our graduates to tell about themselves and the experience of creating their mobile applications. We believe that with a strong desire, everyone can achieve success!

The first such guest in this column was Shamil Magomedov, a 2017 SAMSUNG IT SCHOOL graduate, now a student at MIEM HSE. Shamil, thank you very much that, despite the workload, you found the time to write this article!

Hi all!
Today I would like to talk about how I turned from a "conditionally enrolled" in the SAMSUNG IT SCHOOL to the finalist of the All-Russian competition for mobile development thanks to the game DrumHero.

DrumHero: How I Made My First Game

prehistory

I entered IT SCHOOL when I was in the 10th grade. From the very first days of training, I lagged behind the other guys, and this was predictable even before the start of the course (my terribly low entrance exam scores indicated this). All these principles of programming, the device of the Android platform and the Java language, how to understand it all?

Fortunately, I had everything I needed to successfully master the skills of development: a boundless desire to move forward and not stop.

Devoting a lot of time to homework, constantly lingering after classes with my teacher Vladimir Vladimirovich Ilyin (I was extremely lucky with him), I began to adapt to the fast pace of learning and think about my graduation project.

DrumHero: How I Made My First Game

With a teacher - V.V. Ilyin

Idea search

Many people think that when creating a project, whether it's a startup or something small for gaining experience, the whole difficulty lies precisely in the development: writing a bunch of code, learning new libraries, constantly testing - horror! Believe me, it's not like that at all. I reasoned in exactly the same way, until I myself was faced with the need to choose and implement an idea, it turned out to be one of the most difficult stages.

The most difficult thing in choosing an idea at the initial stage of learning is determining the complexity of the implementation: for a long time I could not come up with an application that would be within my power and at the same time I liked.

Most of all I wanted to write a musical game, but doubts about my abilities really interfered. It seemed that it would not be possible to finish the job, and for this reason I changed my choice more than once: mobile billiards, bowling, runner, etc. Ultimately, I learned one lesson from this: Difficulties will always arise, regardless of the idea of ​​the application, and therefore the most important thing is to choose what you like and go to the end.

DrumHero: How I Made My First Game

I have always loved Guitar Hero.

Implementation of game logic

The main idea behind apps like Guitar Hero is to tap the screen to the rhythm of the music.
First of all, I started implementing the game logic:

  1. Created classes of notes, buttons and bands along which notes will move.
  2. I placed the canvas on the entire screen of the application and already painted the location of the objects of the created classes on it.
  3. Implemented the simultaneous launch of the mp3 file of the song and the array of notes received from the database and voila! The first sketches of the game are already on my smartphone 🙂

DrumHero: How I Made My First Game

First version of the game

Yes, it looks “impressive”, but it was almost enough to test the game! The last necessary step was the list of notes for the song, and I had to sit a lot of time on its implementation.
The principle is quite simple: according to the values ​​of the database table, the program creates objects of the “Note” class and adds the received notes to the array. The table consists of two columns:

  • line number from 1 to 4 on which the note should go and
  • the time at which it should appear on the screen.

What did I spend a lot of time on, if everything is so simple? To fill this database!
Unfortunately, at that time I could not figure out how to automate the process of getting the sheet music in the format I needed from the mp3 file of the song, and therefore I had to manually fill in these columns by ear.

DrumHero: How I Made My First Game

The process of filling the database with notes

This method allowed me to start developing and testing the game at the very beginning, but it was clear that something else had to be invented. Here my teacher, Ilyin Vladimir Vladimirovich, helped me a lot, who told me about the existence of the MIDI format, explained its structure and helped me figure out the library I found for working with MIDI files.

The beauty of this format is that in it each instrument is already a separate track, on which certain “notes” are located. Thus, it is easy to process all notes in a loop and, depending on the track and time, automatically add them to the database. This is a very important property, because it was thanks to it that I managed to solve the problem of games of this genre: the inability to add my own songs. True, the MIDI format has a big minus - the sound (we all remember the melodies in retro games, right?).

Gradually improving the gameplay, I brought the program to a completely working state, added a lot of “features”: the ability to add your own song from the device’s memory or from the cloud catalog, the choice of difficulty level, beginner mode, and much more.
And finally, I came to the “icing on the cake” ...

Design

It was then that the embodiment of my “vision” of the game began. First of all, I started choosing a program for drawing. I had no experience in graphic design, so I needed an easy-to-learn (Photoshop - past), but at the same time flexible and convenient program (Paint, sorry). The choice fell on Inkscape - a good tool for editing vector images, mainly svg format.

After getting a little familiar with this program, I began to draw each element of the game and save it in different resolutions, suitable for different screen sizes of devices. There were also attempts to implement an animation of the explosion of notes, and despite the unsuitability of the resulting design, I was satisfied. Of course, in parallel with the finalization of the project, I continued to work on the design, adding new colors (gradients are love at first sight).

DrumHero: How I Made My First Game

First design version (two screens, no animation, old name)

DrumHero: How I Made My First Game

The second version of the design (4 screens, the initial screen smoothly pulsates with different colors, gradients everywhere)

I defended my graduation project and was very happy when I found out that I passed the qualifying round and was invited to the finals of the IT SCHOOLS application competition. I had about a month left before the competition, and I seriously thought about attracting a more professional person in the field of design. The search was not in vain: as it turned out, my brother's close friend is an excellent designer! She immediately agreed to help me, and the current design of the game is her merit.

DrumHero: How I Made My First Game

Final design

Publication

After completing work on the release version, I immediately began to prepare the application for publication in the Google Play Market. Standard procedure: purchasing a developer account, compiling an application page, etc. But this section is not about that.

The most amazing thing about this story is the download statistics. At first, the number of downloads of DrumHero increased gradually and almost evenly in some countries of Europe, the USA and the CIS countries, but a month passed and the number of downloads reached 100 downloads! An interesting fact is that most of the downloads came from Indonesia.

Conclusion

DrumHero is my first serious project where I learned how to program. He not only brought me to the All-Russian final of the SAMSUNG IT SCHOOL project competition, but also gave me great experience in graphic design, in GameDev, in interaction with the Play Market service and in many other things.

DrumHero: How I Made My First Game

Of course, now I see a lot of flaws in the game, although today the number of downloads has reached almost 200. In my plans to release a new version, there are ideas how to improve stability, improve the gameplay and increase the number of downloads.

Information:
IT SCHOOL SAMSUNG is a free full-time additional education program for high school students, it operates in 25 cities of Russia.
The student graduation project is a mobile application. It can be a game, a social app, a scheduler, whatever they want.
You can apply for training from September 2019 at Online программы.


Source: habr.com

Add a comment