📜 ⬆️ ⬇️

Development of the first game [on Unity3D]

Once I went to POVT (you can insert your specialty in IT ) to learn how to write games. Although the training was somewhat distant from the topics of interest, it brought fundamental knowledge, without which it would be very difficult. Further, after graduation, work in several companies only delayed the enterprise, keeping it away from gamedev. But, from time to time, buying a new game, or watching the development of the next title, there is a very obsessive idea - “I want to do this!”.

The first attempts usually do not end with anything good - a lot of mini prototypes remain at the earliest stage, or fit “on the table”. This is not a bad stage and one cannot get away from it. Over time, the desire to complete something will become so intrusive that you can do it .

I took the last project very firmly and brought it to the release stage.
')
In this article I 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 are carrying their ideas, but taking no further steps. If you are ready, then Welcome!

Introduction


The general plan of the main stages of creating the game, covered in the article:

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

Search and cultivate ideas


Ideas come often enough, most of them quickly dismiss, but some will come back again and again. Write them down, just remember, and if after some time you return to a specific one and start scrolling through its variations, you should look at it. If she still grabs 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 stages when it seems too banal and not interesting to anyone, you will be taken away by new opportunities, you want to change everything, quit what has begun, but you shouldn’t deviate from the initial plan, you will still have a chance to correct the begun.

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

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 story. No, there were no revelations and turns in it, it is absolutely direct. But without the plot, without the possibility of completing the game - you just waste the player's time in vain - yes, there is an audience for this kind of games, but this is simply disrespect for game culture in general. If you once again sit down to do a runner, then give the players tangible progress, give the opportunity to complete what has been started, finally let go of all that is and update the game later for the next part of the adventure (or sell), think about replayability, repetition, 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 strictly competitive discipline. In the latter case, if these are not completely abstract games like Go, checkers, chess, it is worthwhile to attend to a clear description of the game world in order to prevent the mistakes of this world by 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 whole work, this will give an atmosphere for which the player will return again and again.

Inspiration


Many developers themselves play games, watch movies and TV shows, read books, and often bring their vision or new interpretation of the shades of the affected works to projects. Now it is difficult to come up with something conceptually new, and do not be afraid to adopt something from other products. Sometimes, a good project is spoiled by fairly simple things on the surface of other games, of course, there are exceptions here, but take inspiration everywhere and carefully mix 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 the GameCube - water was everywhere in it, it was very beautiful, there were even several mini-race missions on this water, but, as I still it seems, since then, in all the 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 engines-water cannons from the game. I didn’t really think about the fact that I once implemented this idea, but it was very nice to remember my emotions more than a decade ago.

The main option of the gameplay was the so-called check-in for a while - here I wanted to achieve something similar to the TrackMania series. Perhaps in the last part ( Turbo ), developers crossed a certain brink of hardcore bordering on the impossibility of perfect walkthroughs to
maximum concentration
I have 316 medals on 128 tracks and sometimes I never want to open the game again
but the intensity of the races that you want to go without errors as quickly as possible, with an instant restart in case of an error - this is the key point that determined the whole gameplay.

Additionally, I didn’t want to limit the player between levels, I wanted constant control over the hero, so it was decided to make the game in an open world, while the launch of races was inspired by the initial BurnoutParadise , in which there was no launch of races from the menu, and even a restart - you always had to approach on the map and start over. In my case, the restart remained, but this possibility is maintained for a very short time after the end of the race.

Of course, these are all AAA-class games, and only a small detail was taken from each one, but, as I mentioned, you should never turn away from what is already on the market. Undoubtedly, if your gameplay is so unique that no one around offers anything like this is great, but in my case there was an interest in creating a pleasant product without any habits of conceptual uniqueness. I remembered a time when I set myself each of the shareware games that came with game magazines, and I wanted to make a game with a quality not 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 controls and the camera.

Despite the fact that before Unity3d there was no particular familiarity, this stage did not become something incredibly difficult.
For reliable behavior of the boat, it was necessary to dig deeper into the physics of processes and write one honest Buoyancy script, taking one of those found on the network as a basis. After the first attempts, in which a significant simplification of the proceeding process was used, without a shoulder of force, and division of volumes, everything began to feel just fine!

A script was also created with parameters defining 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 that were originally selected as open edited by the editor, after some tests take specific values ​​forever, and from this point it is worthwhile to close them to the class properties.

The camera was created as a separate physical object, which tends to follow a certain point in space - for this purpose, a force of attraction is applied to it and the maximum possible angles of instantaneous rotation and the distance to instantaneous movement are additionally limited. Even in the final version, I didn’t do anything about passing the camera through objects, only the possibility of instant camera teleport to a new point was added.

Working prototype


At this stage, concentrate on the implementation of all the moments of your story component. All parts of the game and the basic mechanics (if there are several of them) must be implemented so that you can “ pass ”, let the trimmed game as a sequence of all the mechanics from beginning to end - even if without specific solutions in visual design, precisely at the prototype level.

This stage is the most important - it is here that you will understand what the game will represent without all the tinsel design art and design. Only the naked mechanics of the whole game. With such prototypes - additionally improved visually, and assembled into a certain seamless product, 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 further, from this point on 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 drive through various tracks, the start screen and the mechanics of displaying history in slides appeared - at first they were just squares of color - and I saw them for a very long time.

Prototype development


Time to improve our prototype to the type of product that is definitely similar to the final one. Write down all the ideas about how you can decorate the game, and everything, without which you can not see it in the release version, mark insignificant. Try to include as many of the most attractive items as possible. Deal with the fact that they will not all go to the final product. Now you are ready to decorate and fill the world of your game! Advice during the implementation - do not 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 is difficult to get used to it, since from the programmer’s point of view, this is too non-deterministic. I will try to explain - when some objects are laid out in our scene, you just have to accept that they will always lie in their places, and if once again we take a fresh look and move everything under our new vision, then this will not change - intermediate options are overwritten among all possible. Quickly restore one of the specific options is simply impossible. Of course, in critical situations, I duplicate all the objects for rollback, but after adopting a new version, the old one leaves irrevocably.

For the code, use any version control system, but this is rather a mandatory item, and I do not think that someone in our time does without it.

I (still | not) artist!


The most difficult was the development of all models, texturing and drawing pictures of the plot, submitted in the form of frames stylized comics.

There were few pictures - around 20, but creating storyboards and filling them with content - unfortunately, it took longer than desired.

With the models everything was also ambiguous - once there was a small experience of modeling for personal purposes, and even a couple of cars were added to GTA3 , but nothing was done on such a scale. Given the sweep and model optimization, this was the most difficult part. In total, more than a hundred of them were created to fill the world, and I think that this is still not enough, but with such a pace the game would never have reached the release stage.

Sound


Similarly, the artistic component is the 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 options that do not require licensing at all. However, for a more serious project this will not work. If you can record and produce the necessary sounds yourself, the music is just great!

In the future, it is worthwhile to cooperate with indie scene composers, they are also happy to cooperate, and many modern indie games are voiced in this way.

Product completion


Review the original script again - complete all tasks for its execution. Examine the list of ideas for decorating again, but stop yourself if it contains items of non-primary importance. Show this option to your friends, ask what they liked and what did not. Do not be afraid to accept criticism, but do not give in to empty remarks - your vision should not be completely crossed out with reviews. Often at this point you can still include in the game a couple of simple details in the implementation. Next - only release!

Reserve for the future


Many ideas, of course, will remain unfulfilled. 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 decoration of the world. Leave them, be able to stop yourself, otherwise the project will be endless. If users accept it positively, then it may be worthwhile to continue 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 of work by one person from the earliest prototype - it should be completed on what it is.

If my team had an experienced modeler, an artist and a composer, then everything could be finished in a month, but all alone, without the necessary skills, everything happens much slower.

There was also an idea to release the project on mobile platforms - it is still a multiplatform engine, but the reality is that without additional hard optimization this cannot be obtained. In case the game has an audience and requests, the porting attempt will definitely be. Now it is necessary to have discrete graphics (integrated IntelHD4400 was checked - it is clearly not enough, however, when using a discrete graphics card, even a laptop, you can count on a normal number of frames)

Impressions of Unity3d


It was very convenient to work, given the existing experience of C # development, only in some cases you encounter the limitations of Mono and the specifics of the objects themselves. There are a lot of lessons - most of them are focused on beginners, so it’s difficult to listen for a long time about the arrangement of brackets, the names of variables, the standards of their code with different notations and the like, and just 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 look through 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.

For Unity there are a lot of different plug-ins, and even a small dialog-editor extension was developed for the generation of buoys on the track, with some coefficients for smoothing turns. In the network you can find a huge number of scripts, also you should not bypass the built-in AssetStore, which has both paid (most) and free options. Additionally - contact the official forum, where you will be answered.

Also - in Unity there are still problems in the form of incorrect work of something, and in my case, I had to release the game on the latest beta version, since all previous ones were simply not designed for the WindowsStore build - an error in working with shadows. As a result, there is still one unresolved problem, because of which I had to generate a project in Il2CPP mode, although I wanted to get an ordinary C # problem known and hangs in suggestions for improvements, but you should not hope for a quick resolution.

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

Errors


I can only see them looking around now.

The main thing - after a month of work, start promoting your project - it doesn’t have to be an advertisement, but keep blog entries, show what you are working on, it’s very good if by this time you can post some concepts or early gameplay, 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 images, in my case, was too delayed in the project, and most of them could be left more schematic, focusing more on several key 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 shortcomings, and wait for the last beta to fix all the critical bugs.

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

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

Source: https://habr.com/ru/post/304722/


All Articles