📜 ⬆️ ⬇️

Creating a Good Cat Gone Bad Game

Target audience: novice indie game developers.

Introduction




Basically, this is a list of tricks and free tools that I used to create the Good Cat Gone Bad mobile endless runner, which will be released on Google Play on May 4, 2016.
')
The game was developed as a project-hobby using Unity 5, and it took the whole thing about 4 months on a regular basis (full-time).

Design


After I decided on this crazy idea, I began to outline the list of application components and describe them using short abstracts. For example:

Components:


Game over menu:


Level:


Player:


Cop:


I use Google Keep to store these records and stuff.

In general, you have seen most of the initial design document. That was enough to start development. Later I improved the design using things like Core Loop , Subversion , Bartle Test .

Architecture


The project consists of modules. A module is a set of components (logic) and assets (textures, sounds, etc.) related to some feature or part of the infrastructure.

Assets/Src/Catzilla
├── AppModule
├── CommonModule
├── GameOverMenuModule
├── LevelAreaModule
├── LevelModule
├── LevelObjectModule
├── MainMenuModule
├── MarketingModule
├── PlayerModule
└── SkillModule

Components and assets inside the module are structured by type.

Assets/Src/Catzilla/LevelObjectModule
├── Animation
├── Config
├── Controller
├── Materials
├── Mesh
├── Model
├── Prefab
├── Sound
├── Texture
└── View

Each module (except modules consisting entirely of assets, for example, Marketing) has a component responsible for initializing the module (registration of services, configuration values, event handlers, etc.).

A special module (App) serves as the entry point to the application. Other modules are registered and initialized in it.

The whole thing is based on the Zenject library, which, in addition to this, provides flexible dependency injection.

The project architecture is based on an event approach. In my case, this means that the key components know nothing about each other and affect the events that are processed by intermediaries responsible for the interaction of the components.

Graphics


During the level, in each frame <5k vertices and <20 draw calls (draw call).

I made all these hipster models in Blender . Each model contains <200 triangles. Most models consist of separate parts (for example, legs, arms, head, body) so that they can be destroyed.


Cop A pile of cubes.


Start the track. Normal plane.


Some people do not believe that this is Impala 64.


And some think that this palm is not from Miami.

Texturing was done using the Hyden technique , and the textures of all level objects were combined into one large (256x256) texture, as optimization.


The combined texture of all level objects.

For the level zones (for example, park, highway) I used the material with the Mobile / Unlit shader (Supports Lightmap), and for the level objects - the Mobile / VertexLit shader (Only Directional Lights).

The game has only 1 directional light source and no shadows.

The reference resolution of the Canvas Scaler component is 480x800, which covers most of the devices. By the way, does anyone know about the existence of this page ?

The color palette of the game was generated in Paletton .

For the text, I used Press Start 2P font, which can be found in Google Fonts .

For floating text (for example, glasses above the object), I used Text Mesh, instead of UI Text in world space mode, as optimization.

Icons for the UI (for example, health, skills) were borrowed from the 64 Flat Game Icons pack.

Animation


Animation was done in Unity (Mecanim). Only 3 types of level objects are animated: player, civil and bonus (for example, a rotating piece that looks like a dollar).


Running civilian. 5 frames.

Audio


The sounds were generated in Sfxr , it seemed to me that he did it better than Bfxr .

Audio Source components use 2D mode (spatial blend = 0). Each object has its own Audio Source level, except for the player who has 2, for a larger number of simultaneous sounds. But for UI there is only 1 common Audio Source.

Sounds are played through a special component - the audio manager, which ensures that many sounds are not played at the same time, and also sticks together (actually discards) identical sounds if they are played for a very short time interval, so that the amplitude does not go off-scale in the output audio signal .

Marketing materials


Icon. A real masterpiece. It was made a separate scene in Unity, by placing one of the level zones and the player, and adjusting the camera.


You guessed it. Icon.

I used Icon Slayer to add cool effects (rounded corners) to it and get the desired dimensions.

The next piece ... the meaning of the masterpiece is the Feature Graphic (banner, promo, not important), which is made in the same way as a separate scene.


Maybe I should shoot blockbusters instead of all this?

The trailer was made in iMovie, using one of its templates - Blockbuster.


I'm sure Steven Spielberg would put a thumbs up to him.

Web site


The frontend of the site is made using Boostrap 3 . There is no server logic on the backend, just Nginx HTTP server. The whole thing is located on DigitalOcean . For deployment, I used Vagrant .

miscellanea


The project uses a package of Smart Localization (you guessed it for what).

For version control, I used Git . The source code is stored in Bitbucket .

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


All Articles