📜 ⬆️ ⬇️

Why in 2017 to write your own engine for mobile games?

These days there are a lot of game engines. Two-dimensional, three-dimensional, native and on scripts. At first glance, everything that has been done has already been done and you can just make a game. However, according to statistics, about half of the top 100 mobile games are made on their engines. Why do many large studios do projects exclusively on their technology? What does not suit them in those engines that now have? To answer this question you need to understand why you need an engine, what they generally are and how they differ.

The game engine for the developer is a tool. Like a hammer for a carpenter or a racing car for a pilot, the tool influences success. Of course, not always. It happens that on weak technologies they make masterpieces, and on high-end engines they make frankly failed projects. But “on average in the hospital”, the choice of instrument rather significantly influences success. To understand how much, you need to understand why and how the games are made.

Big goal



So why do we make games? Everyone has different goals, someone makes just for fun, someone to make a lot of money. But still, in most cases they want to make money on the game. Consider exactly how the engine affects the achievement of this goal. For this, it is necessary to recall the elementary formula of how that very money is obtained, or, more correctly speaking, profit.

Profit = Income - Expense
')
Now we will consider in detail each component and how the engine affects them. And then we will define some metrics by which we will briefly evaluate the existing engines.

Costs


Any developers seek to reduce these costs. For small developers, costs can be fatal, and the project won't even see the light. Big developers are also interested in reducing costs, because you can make a project faster, check it out, go to the market before others, or just try a lot more ideas for the same money.

We analyze the development costs in more detail. They include a lot of things, such as marketing, payment for equipment, wages, and so on. In different projects in different ways, but as a rule, wages are one of the largest items of the project budget. How does the engine affect the cost of development? Again a small formula:

Remuneration = (Cost of a specialist 1 + Cost of a specialist 2 + ...) * Development time

It looks easy. Based on the formula, it is clear that there are actually two values ​​that can be influenced: the cost of specialists and the development time. We reduce the cost of a specialist, reduce development time - and our project has fallen in price! But how to make a specialist cheaper? How to make it work faster? The answer is the right choice of technology and the right formulation of work.

The right set of tools allows you to find the right specialist for a particular job. Ideally, the artist draws, the programmer writes the code, the typesetter makes up, the animator animates, the technical designer adjusts the content, in general, everyone is busy with his own business. However, in reality, it often happens that programmers are busy with everything - layout, animation, setting up resources. And not even because there is no one to do it, but because only he can assemble the interface and zanify it through code. Specific tools are still required for certain works.

Hence the first metric of the engine - the toolkit . Availability of tools allows you to hire the appropriate specialist who will be better and faster to cope with their work. Naturally, completely different tools are needed for different games, but there are common ones that are necessary for everyone: resource tuners, animations, effects, graphics, physics, sound, and interfaces. All this can be done by code, but, as practice shows, it is rather inefficient.

In addition to general tools, almost every game has some specific features that require special tools, such as a level editor or a configuration editor for game objects. Here you can highlight this metric as the engine's flexibility - it is an opportunity to tailor it to your specific needs with minimal cost.

Next, the development time. I propose to decompose it into two components: the time of the operation and the number of repetitions. Consider the example of interfaces. If you have a special interface editor, then the layout in it will be much faster than in a text file or in code. Accordingly, the time for the layout operation will be less. If there is an opportunity to work with templates, then the number of operations of the same type will be less. Simply put, the simpler, more convenient and thoughtful the tool, the faster the development will take place. And this is the next metric - the convenience of the toolkit or usiability , as it is often called. Here many may notice that in many indie teams there are no specialized people and still the programmer does everything. Which is more convenient to write code. The topic is quite controversial, but I have seen a bunch of examples where the same programmers make content much better and faster in special editors than with the help of code.

Naturally, even if you remove the maximum unnecessary tasks from the programmer, he still needs to write code. From the experience of game development, I can say that 80% of all time is a boring routine that needs to be done quickly and without much concern for performance. Dialogues, client-server interactions, scripts and stuff like that. Here you can highlight another metric - the complexity of the development of game logic . It describes how complex the development of most of the code will be, those same 80% of the routine. Usually scripts are best suited for this. And the remaining 20% ​​are precisely those bottlenecks that require flexible optimization and tuning. What, in fact, also applies to the metric of flexibility .

The price of a specialist is also influenced by the input threshold of engine complexity. The easier it is to use it, the more specialists, the cheaper and easier to find them. However, too low a threshold often means that the engine is limited.

Also by the time of development can be attributed to such a metric as portability - the ability to apply the same solution on different platforms, instead of implementing on each separately. If you make a game on several platforms at once, time costs are reduced in proportion to the number of platforms covered.

Income


Everything here is not as obvious as with expenses. For a start, let's look at what is the income from the game. And again the formula, very simplified, but to a greater extent reflects the result:

Revenue = Average User Revenue * Number of Users

Again, two quantities that can be influenced. So, how does the engine affect the average revenue per user? There is a rather indirect connection, and often there is none at all. But we are considering the "hospital average", so we will not reject.

There are many factors that make up this income: the involvement of the player, the interest of the game, the need to pay for the promotion, the ability to pay, the time spent in the game and so on. There are a lot of factors, they are always different, at least to say something about the amount of income is very difficult and very few people know how to do it well.

One of the factors affecting the success and profitability of the game is its quality. Beautiful art, smooth animations, good effects, interesting gameplay - all this influences the player’s opinion, his desire to stay in the game. And this is directly affected by the engine. We have already considered that the toolkit is necessary for effective development, but it is also necessary for developing high-quality content. Beautiful animations, interfaces, effects, scenes: all this is difficult to do without good tools. A bad tool is like a bicycle with oval wheels, on which it is quite difficult to go somewhere. However, quite often developers ride such bicycles: the programmer makes awkward animations on his favorite sines and cosines, the designer imposes a level in a text file, and so on. All this does not lead to quality results. Therefore, the toolbox is important.

In addition to tools, quality is affected by engine performance . Let the game have great content, beautiful art and great effects, but all this disappears when the game starts to slow down. The player is not comfortable to play, the interface becomes non-responsive, animations do not produce the proper effect. Performance also affects how rich the game will be. With a non-optimal approach, we can show N sprites and X animations, and with an optimized engine we can show more. It does not always produce the desired effect and sometimes unnecessarily, but it gives more freedom of action, more opportunities to realize your ideas.

Performance also affects player retention. On average, a new player installs the game and decides on its removal within 20-30 seconds. Making it wait for the game to load at this time is not a good decision. Also the size of the game affects the threshold of entry. Few people want to download the game size of 200MB on the mobile Internet. Energy costs in the game also affect. Many players run the game on the phone on the way home, and if the battery level is low and your game spends it much, the player would rather stay connected than play your game. Actually, the time that he chooses to spend in the game will decrease if he knows that the device battery will inevitably sit down. The conclusion from this one - you need to try to save resources.

Let's move on to the next part of the formula - audience reach. Here the metrics are quite understandable. This is performance and portability . The more platforms, the more devices are covered, and accordingly users. The better the performance, the weaker the devices support the game and more players can play your game. You can hope that your players have a new Apple product in their pockets, but statistics show that there are few new devices, everyone goes with the outdated “middling”. Approximately the same situation on Android.

Preliminary result


Now we have a rough idea of ​​what metrics engines have and how they affect the success of the game:


Based on this list, we estimate the existing engines. I propose to consider only the most significant, based on the statistics collected by Unity3D, with a few of my additions.

image

The opinion below should not be considered as 100% true, it is compiled by me and may not fully reflect reality


Perhaps so far, few people have tasted this engine, but it is developing and getting better. It has a good all-in-one editor in which you will find everything you need. The game code is written in an internal scripting language similar to Python. The developers claim that it is possible to optimize parts of the game in C ++, or to make additions for the editor.



Internal corporate engine from King, which they decided to bring to the light. Appeared in the public domain relatively recently, the community is developing rapidly. Under the hood, he, according to the developers, everything is optimized as much as possible. Game logic is written in LUA scripts. There is an all-in-one editor, but rather limited in functionality.



Professional game engine at the height of technology. Excellent picture, performance, tool for real professionals. However, it is difficult to use it in mobile development. Yet it is more designed for three-dimensional AAA games. Doing mobile 2D games on it is like a cannon on sparrows.



Completely free and open source engine. There is an all-in-one editor, documentation and a bunch of examples. Game logic is written in C ++, or in JavaScript. A lot of projects on it are released, a distinctive feature of these projects is a good optimization. However, upon closer examination, the editor is not as convenient as it seems at first glance, there are a lot of shortcomings in the source code and you have to finish a lot of things.


Game maker / Construct and related


The engines of this kind were created so that anyone could make their own game, without any knowledge of the development. Everything is as simple and straightforward as possible, these engines do great with this. However, for large or even medium-sized projects, they are poorly suited.



The most common in our days engine. And this is the reason - it is very convenient. Great editor, almost unlimited possibilities, 2D, 3D graphics, anything you want. And of course, C #, with which development is pretty easy. However, he also has skeletons in the closet. Often productivity leaves much to be desired. I agree, if you make an effort, you can do a lot, but the price is high. In addition, sometimes incomprehensible plans for the development of developers engine. The most necessary things remain at the bottom of the roadmap, but in new and new versions there appears something that sounds great on the selling page, but not everyone needs to be developed.



Own engines, C ++


The choice of either large studios or madmen. For this, we need cool specialists, but they are few and costly. And as a result, Frankinstein from technology is obtained, which is constantly falling apart. It turns out a very wrong development, most often it is those expensive programmers who do everything. But it turns out the most ideal product. All that the designers want is implemented, works as smoothly as possible and runs on ancient devices. But the price for such technology is high.


So still, why do we need another one?


According to a brief description of those above, it becomes clear that there is no solution that will satisfy all needs. Each of them has some disadvantages, be it convenience or performance. Let's try to imagine the very ideal that will satisfy all our needs, it will turn out to be the very “silver bullet”.

Obviously, he must combine qualities that are very difficult to combine. It should be simple, but at the same time flexible. This can be solved by building a system where top-level components are based on low-level ones. For example, there is some very flexible low-level framework, and on top of it are some top-level things like an editor and scripts. That is, the upper level provides convenience and is designed for most tasks, and you can resort to the lower one in search of more efficient solutions.

Moreover, the low level should be really low, and not just provide a good API. Here everything should be as transparent as possible for the developer.If there is even a small black box effect, the developer will not be able to absolutely control the system, and accordingly achieve the maximum result. The only way to this, in my opinion, is open source.

The top level should be well thought out enough to perform its function well. Many developers of In-house engines here make the same mistake; they put different technologies together and build connections between them. However, as practice shows, this leads to the fact that they interact poorly. A more specific example: importing animations from a third-party editor and particle effects from another. As soon as it becomes necessary to use the effect in animation, problems begin. Particles are not played in the animation editor and vice versa. Accordingly, the final result is achieved by the designer rather hard. Therefore, everything should be in one system so that the designer can animate, superimpose sound, effects, and all at once, in one place.

However, the ideal can be described in colors for a long time, so let's return to the specifics and analyze in order according to our metrics:


Total


In the end, there may still be a better engine nowadays. But this is only one opinion, me. Although the experience of developing on different engines gives me an idea of ​​the tool that I would consider ideal, I would like to know the opinion of others on this matter. I think it will be interesting to many if someone else in the comments writes his opinion on some kind of engine. It may even be useful to those who still choose the engine on which they want to make the game.

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


All Articles