preface

In this mini-game, we will use the SpriteKit framework for development. The SpriteKit framework is Apple’s focus on 2D games as a high-performance game framework. Check out the official documentation for this framework.

One thing I can say about this game is that it opened my door to game development. In the summer vacation of 2017, I used cocos-2dx, a cross-platform game framework based on C++, to complete the first and second versions of “square pinball” mini-game. In the process of completing the two versions of the game with cocos-2dx, I found that the so-called cross-platform is actually to use a platform-independent language or a DSL made by ourselves, respectively for different platforms, to make a bridge with the native development language, through the use of DSL to smooth the differences between the platforms.

In a rough sense, all cross-platform frameworks do “dirty work”, including the current version of Flutter, except that the “cross-platform” of Flutter is more thorough. Traditional cross-platform frameworks, such as CoCOS-2DX, have finally reached the “rendering” layer. But Flutter bypassed the native platform by using Google’s own rendering engine, which is more finely tuned.

There’s a ton of learning material available online, and SpriteKit has been a relatively mature 2D framework since its release with iOS8. I used Cocos Creator to reproduce a simple Web version of “Square Pinball” during May Day last year, and it has also been open source. You can find it here, or scan the following QR code to try it out.

Preliminary knowledge

In this mini-game, we are officially entering the simulation of the physics world. There may be a little bit of math and physics required, but anyone can do it, and thanks to the SpriteKit physics engine, we can do it at a relatively low cost. Manipulate every rigid body in the simulated physical world using an “object-oriented” approach.

In the case of the first two mini-games, we were just “forcing” a game through the UI components of the iOS system, and we didn’t have to think about things from a player’s point of view, just finishing the game for the sake of completing the features.

Now, I need to rethink with you the questions that should be considered in a boutique mini-game:

  • The story;
  • Way;
  • The fine arts;

For a small game with a small investment, it’s almost impossible to compete with the triple-A behemoth, and I think the “indie” games that do a good job are Hollow Knight and Candle Man. My independent games here is, of course, not alone, in the true sense of a person but to a small number of the development team, if you are interested in the “independent game”, can go to see the documentary, personally think pretty ground do the current domestic independent game development team describe more real.

To be honest, after I watched the documentary, I really understood the gap between what I thought of as “games” and what these people thought of as “games”. Since then, my understanding of games has improved to a higher level. Although I was once a “problem student” in the words of the teacher who abandoned my studies because of games, I have been “hurt” for a long time, so I have brought a lot of prejudice and misunderstanding to “games” itself.

There was even a period of time when MY classmates were so addicted to the game itself, AND I always looked at it with an attitude of “game is poison”. But now I find that “game” is something that can truly define a “world” of your own, which is in accordance with the previous idea of making an app. We can define how users use the app and the operations they can carry out in the app.

In a world of “game”, we can completely from the perspective of a more underlying to describe, to define, and is no longer limited to the “function” itself, start from the education we users how to walk, how to read, how to use a tool, do something to achieve what you need to use conditions and so on, these things can be set off by the game developers themselves completely, Through his own perspective on the world, the extent to which he understands the society, he can portray what he really wants to express in a custom game world.

On Tuesday we had invited jenova Chen made a share, in his share I really know how to use the game to draw up their own world view, how to tell his understanding of the world, I thank him very much, let me back to the “game” have a new understanding, at the same time, it put the game as a my efforts in the direction of future development.

The game story

In AD 4666, the earth has completely is not suitable for human habitation, that we have better homes has been cat star people control, because one thing happened at the end of 2020, led to the survival of the human society become explosion pressure, make more and more people have cats, follow-up development to 7.5 billion people raised a total of 15 billion cats, So, did it wipe out the human race?

No, in fact, it was their hubris that ended their reign. They believe they are masters of all creation, they pollute the water, they occupy the land, they kill the sky. In the end, there is no nuclear winter at all, only the long autumn of their own self-admiration.

“No, they just killed themselves.”

Tendons follow most of the remaining humans on a quest for colonies, but how difficult it is to find a habitable planet in the middle of the universe! Even the most basic needs can not be guaranteed. The only way to obtain energy is to obtain meteorites or other small planets shot down, and extract basic elements in rubble through energy converters for secondary processing and transformation.

Fortunately, Jin er finally found the colonial planet that belongs to him, named as “snail star”, in order to build the planet that belongs to oneself, Jin er began to reserve basic raw materials day and night, even in the dream, are working hard for his planet.

The above is the first version of the small game story background, very quintessence, in simple terms, is to keep trying to get raw materials, build their own planet. This is the nature of the game “Snail can’t Sleep”.

The game is currently available for download in the AppStore: Planet Can app (I don’t know how long it will last 🤔)

conclusion

From what I have described above, we can find that making games is never short of tools to realize games, but it is the understanding of the game itself, how deep the understanding of a thing is, from the side reflects the actual impact of doing this thing.

Because this game will take much more time than the first two, and in order to achieve a more perfect experience, I will focus on a few small points, just because in the process of implementing this little game, it taught me a lot, I want to teach you what this game taught me.

In this game, we’ve done the following:

  • Game explanation;
  • Familiar with 2D programming;
  • Rigid body collision and detection;
  • Ball launch and block elimination;
  • Game logic improved.