Having fun with Unity and PlayMaker

While I normally post on architectural CAD, BIM and visualisation, this post will show you a more playful endeavour: making a small Game.

Udemy Learning Platform

I've started migrating my tutorial videos to the Udemy platform instead of Youtube playlists, as they allow a more structured and focused learning experience. Whenever you engage in a course, you have access to it forever. They also have mobile clients, so you can watch on your iPad and work on your computer at the same time, if you want. The mobile app can even download videos for offline viewing or play them at a higher speed.

Game Mechanics

Last week, I released my first actual game-oriented course. It is a small clone of a Flappy Thingy, but only focusing on the game mechanics: moving things, reacting on collisions and keeping track of a score. I completely skip the actual game art, the textures, the sounds and effects, as I think that if you are making such a game, you'd better tweak it completely so it doesn't resemble another game. Better yet, extend the dynamics into something original.

While I am aware that architects are usually not making games, you might want to add some Game Mechanics in your architectural visualisations, to make them more compelling and engaging and have small rewards for your virtual visitor.

If you have an account on Udemy, you can register for the course. The price at the time of writing this post is $29. While I am a bit wary of going a more commercial road, I can also announce that the course will be increased to $39 when I release a second chapter very soon. There I tackle a little brick out game, to stay with the same theme.

flappy_capsule_pm-2015-01-30-08-57.png

https://www.udemy.com/create-flappy-game-mechanics-with-unity-and-playmaker/?couponCode=flappy-mechanics-for-9

This link will give you the course for $9 and you’ll get access to all future updates.

Unity & PlayMaker

You need Unity of course, but the free version is just fine. However, you also need PlayMaker. This is a visual programming system for Unity, so you can create interactive games and apps, with no direct coding.

You add Finite State Machines (FSM) to GameObjects, which encapsulate the behaviour. In these FSMs, you define States. At any point in time, an object is on only one state. Each state can have multiple Actions, which do something. You can also define Transitions, to go from one state to another. Transitions require Events and Events can be called in many Actions.

Let me clarify this with a Flappy example from the first chapter. The bird, which is simply a 3D capsule, has an FSM to control its movements. We’ve called this “Flapping”.

It has a state called “idle”. This is the START state, as indicated by the START event above it. Inside the idle State, we are waiting for the player to press any button or press the mouse or touch the screen. This is captured in the Any Key Action. This action calls the “up” Event we defined.

There is a transition from the up event on the idle State to the “Flap Up” State. In this new state, a physics impulse force of 45 is added to the GameObject in the Up direction (Y in this case). After this force is added (by the Add Force Action), there is a very short Wait Action (0.05 seconds) and then we transition back to the idle State through the FINISHED Event that is provided by PlayMaker for us.

hero_flapping_detail-2015-01-30-08-57.png

The rest is explained in the course. You can also download a finished example as a Package to import into Unity, but I suggest you re-create it step by step, to have a better understanding.

Don’t forget: there is a second chapter upcoming and if you register for the course, you’ll get this with no additional cost.

Any feedback or reviews on the course are highly appreciated! But be honest and fair.