Escape from the Zoo or how I did casual games on iOS


A lot of free time = work on a new project. This game inspired me to publishPapaBubaDiopabout the expulsion of viruses. Unlike him, I decided to use the native UIKit Dynamics framework. Firstly - I did not work with him, but really wanted to try. And secondly - it is native. And, although the manual says that it is not intended for creating games, I still decided to try it.

In general, I like games, when something falls, the idea accumulates that it should all disappear somewhere on the principle of a funnel, prompted me to start developing.

Having an idea, I decided to start searching for free design assets. And accidentally stumbled upon a pack of painted animals. Here are my main characters - it is they who will fall and ride. And if so - there should be a goal - an escape.

The player taps on the screen and, accordingly, a new animal appears on the same vertical, starting to fall and overcome obstacles. It seems everything is simple, but no. If you start a lot of animals at once, they will start to get stuck, stupid and the whole escape will be covered.

The initial version of the game involved a limited time and counting the number of escaped fugitives, but then I revised the calculation details a bit. After all, it is easy to notice that the shape of the guys is slightly different. For example, a deer, a monkey and a panda are not round in shape and, accordingly, obstacles pass much more difficult. It was decided to give the number of points (credits) depending on the form.

In general, in UIKit Dynamics, you can describe the shape of an interaction object by specifying the UIDynamicItemCollisionBoundsType parameter. It can be a rectangle, ellipse, or BezierPath. My case is an ellipse, and the shape of the ellipse depends on the proportions of the asset of the object. Correspondingly, a deer, a monkey and a panda are an oblong oval, and, for example, a chicken, a duck and a snake are pure-looking circles. It sounds wonderful, but such assets)

Animals - ovals
image

image

image

Animals - circles
image
image
image

The most dreary was, of course, the creation of levels. In UIKit Dynamics, an obstacle is invisible, so the visible part must be drawn separately. I had to prepare a set of structures, each of which contains the start and end point of the obstacle and, walking through them, draw and add as a barrier.

Having made the level, I sat down to test it and many problems surfaced. For example, the angle of inclination is too small and the animals began to accumulate, making passage impossible. Or the location of the obstacles was so-so. Also, by test, I found the real number of points (credits) that can be scored at a level. Now I can say that all levels are passable.

When the levels accumulated enough and the game became close to the readiness of the release, I decided to add the last touch - to make some pets more alive. Since there were no assets with closed eyes in the free pack, it was decided to put a wife for this matter. So half of the zoo appeared blinking animation.

Also, at the end of the development, it was decided to show the next drop-down animal - at some levels, this really affects the choice of the discharge site.

In general, UIKit Dynamics is really not intended for game development. The biggest limitation was the inability to animate obstacles. Perhaps there are workarounds, but I have not yet found decent working options. Therefore, at the moment, all barriers are static. At the same time, the framework is quite simple to understand, easy to use (because it is immediately implemented) and does not require dancing with a tambourine.

A couple of tips for completing levels. Do not immediately throw a lot of living creatures - they like to pile up and get stuck. Try to keep your distance, but do not forget about the time.

The game itself is available here and is absolutely free.

I would be grateful for the feedback on the gameplay and ratings. It’s really interesting how much this kind of gameplay format β€œfits” with the public.

Be healthy.

All Articles