Development of the first game [on Unity3D]

    Once I went to POVT (you can insert your specialty in IT ) in order to learn how to write games. Although the training was somewhat distant from the topic of interest, it brought fundamental knowledge, without which it would be very difficult. Further work after release in several companies only dragged on the enterprise, moving away from the game dev. But, from time to time, buying a new game, or watching the development of the next title, a very obsessive idea arises - "I want to do this!".

    The first attempts usually do not end in anything good - many mini prototypes remain at the earliest stage, or fit “on the table”. This is not a bad stage and there is no getting away from it. Over time, the desire to complete something will become so intrusive that youcan do it .

    For the last project, I took it very tightly and brought it to the release stage.

    This article wanted to go through the basic stages of creating a new game, with a fair amount of subjective opinion. I will not go into details of the implementation and the code - I would like to share my experience and help those who have their ideas, but do not take further steps. If you are ready, then welcome!

    Introduction


    The general plan of the main stages of creating the game, covered in the article:
    • Idea
    • Plot
    • Inspiration
    • Concept
    • Working prototype
    • Prototype development into final product
    • Completion

    At the end of the article I will touch on plans for the future, impressions of the selected tool and some errors.

    Search and nurturing ideas


    Ideas come often enough, for the most part they quickly disappear, but some will come back again and again. Write them down, just remember, and if after some time you return to the specific one again and start scrolling through its variations, it’s worth taking a closer look at it. If she still captures you, grab her!

    You can not start without a basic idea that defines the whole game from the very beginning. Of course, during development you will go through the stages when it seems too banal and interesting to no one, you will be frustrated by new opportunities, you will want to change everything, quit what you started, but do not step back from the initial plan, you will still have a chance to adjust what you started.

    In my case, the idea was the genre of boat racing.

    Plot


    A small script was written - just a few paragraphs of the text, which divided the game into all stages, from beginning to end, with specific goals and objectives, united by a common history. No, there weren’t any revelations and turns in him; he was absolutely direct. But without a plot, without the ability to complete the game - you just waste the player’s time for nothing - yes, there are an audience of such games, but this is simply disrespect for the game culture in general. If you once again sit down to do a runner, then give the players tangible progress, give them the opportunity to complete what they have begun, let them finally go through all that is, and update the game later for the next part of the adventure (or sell), think about replayability, re-passing, if there are no other ideas - but never release something without a final screen!

    The lack of a plot is justified only if your game is a purely competitive discipline. In the latter case, if these are not completely abstract games like Go, checkers, chess, you should take care of a clear description of the game world in order to avoid mistakes of this world yourself, when filling with content or during the creation of heroes. “Lore” is very important for the players, and if the details of the world are emphasized by invisible threads through the entire work, this will add atmosphere to which the player will return again and again.

    Inspiration


    Many developers play games themselves, watch films and series, read books, and often bring their vision or new interpretation of the shades of the affected works to the projects. Now it’s hard to come up with something conceptually new, and don’t be afraid to adopt something from other products. Sometimes, a good project is made up of fairly simple things on the surface of other games, of course, there are exceptions, but get inspiration everywhere and mix carefully in your project.

    My inspiration came mainly from three games.
    The main style was remembered, unexpectedly, with Mario , namely Sunshine - there was such a game on GameCube- the water was everywhere in it, it was very beautiful, the game even had several missions mini-races on this water, but, as far as I still think, since then, in all new Mario there is simply no such pleasant water. Even at the time when I was passing the game, I had a concept of a racing device with water-jet engines from the game. I didn’t really think about the fact that I once realized this idea, but it was very pleasant to recall my emotions more than a decade ago.

    The main gameplay option was the so-called time trial - I wanted to achieve something similar to the TrackMania series . Perhaps, in the last part ( Turbo ), developers crossed a certain line of hardcore bordering on the impossibility of perfect walkthroughs on
    maximum concentration
    у меня 316 медалей на 128 треках и временами хочется никогда не открывать игру снова
    но интенсивность гонок, которые хочется проходить без ошибок как можно быстрее, с мгновенным перезапуском в случае ошибки — вот тот ключевой момент, который определил весь геймплей.

    Дополнительно не хотелось ограничивать игрока между уровнями, хотелось постоянного контроля за героем, поэтому решено было сделать игру в открытом мире, при этом запуск гонок вдохновлен начальным BurnoutParadise, в котором не было запуска гонок из меню, и даже рестарта — нужно было всегда подъезжать к точке на карте и начинать заново. В моем случае рестарт остался, но эта возможность поддерживается очень непродолжительное время после конца гонки.

    Of course, these are all AAA-class games, and only a small detail was taken from each, but, as I already mentioned, you should never turn your back on what is already on the market. Undoubtedly, if your gameplay is so unique that no one around offers anything like this, this is wonderful, but in my case there was interest - to create a pleasant product without flair for conceptual uniqueness. I remembered a time when I set myself each of the shareware games attached to the game magazines, and I wanted to make a game of quality no lower than such projects.

    Concept


    The concept should reflect the main mechanics - in my case it was the behavior of the base boat, on the water, with the possibility of changing its characteristics, as well as the basic control and camera.

    Despite the fact that before Unity3d there was not much acquaintance, this stage did not become something incredibly difficult.
    For reliable boat behavior, I had to go deeper into the physics of processes and write my honest Buoyancy script, taking as a basis one of those found on the network. After the first attempts, in which a significant simplification of the ongoing process was used, without leverage, and separation of volumes, everything began to feel just fine!

    A script was also created with parameters determining the maximum speed, buoyancy, and some others through the editor interface. Try not to abuse the public fields for the editor, often many of the fields initially selected as open by the editor are editable, after some tests take concrete values ​​forever, and from now on they should be closed in the class properties.

    The camera was created as a separate physical object that seeks to follow a certain point in space - for this, the force of gravity is applied to it and the maximum possible angles of instantaneous rotation and the distance of instantaneous movement are additionally limited. Even in the final version, I did not do anything about the camera passing through objects, only the ability to instantly teleport the camera to a new point was added.

    Working prototype


    At this stage, focus on the implementation of all the moments of your story component. All parts of the game and the main mechanics (if there are several) must be implemented so that you can " go through " a truncated game in the form of a sequence of all mechanics from beginning to end - even without specific solutions in the visual design, precisely at the prototype level.

    This stage is the most important - it is here that you will understand what a game will represent without all the tinsel of decorating art and design. Only the naked mechanics of the whole game. It is with such prototypes - additionally visually improved, and assembled into a certain seamless product, that the studios approve their projects. You may also find at this stage that the mechanics are not working, that radical changes are needed. Approve the game for yourself and continue on, from this moment the game will be filled with duration, decorations and content.

    In my case, I created a basic version of the tracks, with starters, directly start and finish and checkpoints. It became possible to go through various tracks, a start screen and the mechanics of displaying history in slides appeared - at first it was just squares of color - and I saw them for a very long time.

    Prototype development


    It’s time to upgrade our prototype to the type of product that is in some way similar to the final one. Write out all the ideas about how you can decorate the game, and everything without which you cannot see it in the release version, note the minor ones. Try to include as many points that are most attractive to you as possible. Accept that not all of them will go to the final product. Now you are ready to decorate and fill the world of your game! Advice during implementation - don't be afraid to break something!

    In some places, this is similar to the work of a sculptor (or artist), when you have to carve a shape, but there is no ideal option, and each stroke only gives a new shape. In the beginning, it’s difficult to get used to it, because from the point of view of the programmer it is too non-deterministic. I’ll try to explain - when some objects are laid out in our scene, you just have to accept that they will always be in their places, and if once again we take a fresh look and move everything under our new vision, then this will not change - the intermediate options are overwritten among all possible. It is simply impossible to quickly restore one of the specific options. Of course, in critical situations, I duplicate all the objects for rollback, but after the adoption of the new option, the old one leaves irrevocably.

    For the code, use any version control system, but this is rather a mandatory item, and I don’t think that anyone nowadays does without it.

    I (still | not) an artist!


    The most difficult was the development of all models, texturing and rendering of plot images filed in the form of frames stylized as a comic book.

    There were few pictures - in the region of 20, but to create storyboards and fill them with content - unfortunately, it took more time than I wanted.

    Everything was also ambiguous with the models - once there was a little modeling experience for personal purposes, and even a couple of cars were added in GTA3 , but nothing was done on such a scale. Given the sweep and optimization of models, this was the hardest part. In total, to fill the world, more than a hundred of them were created, and I believe that this is still not enough, but with such a pace, the game would never come to the release stage.

    Sound


    Similarly to the artistic component, there is work with sound. This is a very important part, but, unfortunately, without the ability to license tracks and sounds, our choice is very limited. There are several resources from which I have chosen the options which are absolutely not demanding licensing. However, for a more serious project, this will not work. If you yourself can record and produce the right sounds, music is just great!

    In the future, it is worth cooperating with indie composers, they are also glad to cooperate, and many modern indie games are voiced just like that.

    Product completion


    Review the original script again - complete all tasks for its execution. Check the list of decorating ideas again, but stop yourself if it contains items of paramount importance. Show this option to your friends, ask what they liked and what not. Do not be afraid to accept criticism, but do not succumb to empty remarks - your vision should not be completely crossed out by reviews. Often at this moment you can still include a couple of parts that are not difficult to implement in the game. Further - only release!

    Ahead


    Many ideas, of course, will remain unrealized. In my case, there are more than 20 items left in the task list, of which only 2 add something really new, the rest is additional polishing and decorating the world. Leave them, know how to stop yourself, otherwise the project will be endless. If users take it positively, then perhaps it’s worth continuing to improve it, however, everything can be polished for a very long time, and, taking into account the time spent, it took me about 5 months to work one person from the earliest prototype, it should be completed on what is.

    If I had an experienced modeler, artist and composer in my team, then everything could be completed in a month, but alone, without the necessary skills, everything happens much more slowly.

    There was also an idea to release the project on mobile platforms - it’s still a multi-platform engine, but the reality is that you won’t get it without additional tough optimization. If the game has an audience and there are requests, then an attempt to port will definitely be. Now it’s necessary to have discrete graphics (the integrated IntelHD4400 was tested - it’s obviously not enough, but when using a discrete graphics card even a laptop, you can count on the normal number of frames)

    Impressions of Unity3d


    It was very convenient to work, given the experience of C # development, only in some cases you run into Mono limitations and the specifics of the objects themselves. There are a lot of lessons - though the majority are focused on beginners, so it’s difficult to listen for a long time about the location of brackets, the names of variables, the standards of their code with different notations and other things like that, and a disproportionate amount of time is devoted to these little things. But at a speed of one and a half to two times faster, often you quickly browse or scroll to the key moment in the video, watch how to work with the next window, open the attached listing and continue in your project.

    There are many different plugins for Unity, and even with our own hands a small dialog extension was developed for the editor to generate buoys on the track, with some coefficients for smoothing turns. You can find a huge number of scripts on the network, and you should not bypass the built-in AssetStore, which has both paid (most) and free options. Additionally - contact the official forum, where they will answer you.

    Also - in Unity there are still problems in the form of something not working correctly, and in my case, the game had to be released on the latest beta version, since all the previous ones were simply not designed for the WindowsStore build - an error in working with shadows. As a result, there is still one problem that has not been completely resolved, due to which I had to generate a project in Il2CPP mode, although I wanted to get the usual C # - the problem is known and hangs in the proposals for improvements, but you should not hope for a speedy resolution.

    The only thing I want to add is a very long recount of lighting! Baking it can easily cross the border of 20 hours on stage, and this is not with the weakest CPU. But without this, it will be scary to look at your shadows. Apparently, all developers should have at least 8 or even 10 or more cores, with an unlimited amount of RAM, because one task to recalculate light easily goes for 4GB consumption, the number of such tasks on large scenes is measured in hundreds.

    Mistakes


    I can see them only looking back now.

    The main thing is that after a month of work, start promoting your project - it doesn’t have to be advertising, but hold on to your blog entries, show what you are working on, it’s very good if you can publish some concepts or early gameplay at this point, but don’t be silent ! In my case, I realized that I was ready to tell everyone around only when I had the final build, and it seems to me that this is not worth doing.

    The development of models and pictures, in my case, too dragged out the project, and most of them could be left more schematic, focusing more on a few basic ones.

    Try somewhere in the middle, or even initially, a build on the target platform. In my case, it took another two weeks to fix all the flaws, and wait for the last beta to fix all critical bugs.

    Nevertheless, the most important thing is the experience gained in the release of the first completed project. Even if it is unsuccessful, this should not stop plans to work further and improve.

    PS Initially, the article was almost twice as large, and I had to do a more brief squeeze. Also such moments were cut out: UI, earth, water and waves, directly release with the calculation in the side. If you have any questions on the topic - ask, and I will try to answer.

    Also popular now: