Nravo Kids Development – #1 Using Playmaker to Make Cartoon-like Games

In this series of articles I will go through the technical details of NravoKids project.

 

Development of the first project was really fast and rough and thanks to some of the amazing Unity Asset Store assets I managed to create a modularized application that is easy to modify and debug. This post will be particularly useful for those who need to create cartoon-or-movie-like interactive 2D games.

 

Current article is a brief overview of the assets I’ve used, why are they useful, their advantages and drawbacks. I will also describe how they are coupled. So lets begin looking at our assets!

So the project is about creating an interactive cartoon for children that are 1-3 years old and that runs like a cartoon but contains some interactive elements (that are animated on click for instance).

Asset #1: Playmaker for Unity3D (95$)
Purpose: Visual Scripting

Developer story. When I was given a task to create a 2D cartoon in Unity I started researching how to make this simple and efficient. The thing I needed was a framework that could provide something like timeline view for what is happening in the scene. There are lots of animated and moving objects in the scene and I needed a way to make a sequence of events (e.g. mountains appered -> dog appeared -> dog started barking).

 

For those who have never seen Playmaker it is a state machine for visual scripting represented by actions and events that trigger transitions between them. You should definitely look into it because it can save lots of time almost in every project. If you already familiar with it hope you will see some tricks you haven’t seen before.

 

General Idea. Playmaker appeared to be a perfect framework to organize this kind of flow. That’s why it is used as a core game engine. Each scene has a manager that controls its flow from beginning till the end. This “manager” communicates with other “submanagers” while the scene is running. It may seem not an elegant solution first but the flow is very straightforward and obvious.

One of my scene managers

 

Readability and Modularity. Each node represents a single action and you can see what is going on while your game is running. Isn’t it great? Color coding and comment block (can contain any Unicode characters) make the scenario really easy to read.

 

 

Eficiency. Using Playmaker templates allows to stay DRY and be consistent by reusing the same state machine. For example, there are animals that play animation when the are clicked, so they use the same template to do so. Other thing is that your code is not recompiled when you modify your state machines and this is a huge time-saver. Also integrated iTween library makes translating, rotating and scaling objects a breeze.

Extensibility. We can use Playmaker to its full potential by writing out custom actions like the one below for Flurry Analytics.

 

Popularity. Almost all other frameworks that I work with have their own Playmaker actions implemented. (SmoothMoves, Sound Manager Pro)

 

Conclusion. So if you are implementing and interactive cartoon or a cutscene in your game Playmaker is something you should probably look into. The tool is very versatile and almost every Unity project can take advantage of it.