top of page
How I Made...

Double Breaker

Whiteboard Fun!
component diagram on whiteboard

What's a design session

without a whiteboard?

flow diagram on whiteboard
Blocks Design

I took the base graphics from a free online resource, although arguably I could draw them myself. So I already had the basic stripes and checkered designs. However, I wanted the different colors and patterns to be meaningful and intuitive, so I spent some time working on a pattern.

Here's what I came up with.

Particles Based Score Clouds

To visually indicate the different score given on each hit and more importantly - to which player it belongs - I used a concept I call

"Score Clouds"

The game has 4 built-in score levels: 10, 20, 50 and 100 points.

Each score value has its own particle system prefab. The shape of the particles is determined by the Material property of the Renderer module. Each score has its own material as well. Instances of the clouds are created on demand once a block is destroyed. Each prefab also contains the self destruct script which destroys the instance after it's done.

​

This approach is rather static and fits in case there are only a limited number of choices for particle shape. There is also a more dynamic way of doing this which you can find in my answer on the Unity Answers forum and in the tutorial video I made about it.

A test scene that I built for score clouds.

Test scenes provide easy testing in a neutral environment and promotes rapid development.

Testing the blocks prefabs

In order to be able to rapidly create new levels, I needed a thoroughly tested set of block prefabs to cover all block types. This called for a serious test scene.

This scene wasn't just for tests. I used it for building the actual prefabs it later tested.

 

The test rig uses a mock ball and some OOP magic to simulate a collision as done in-game. The block itself has no idea it is being tested.

​

The text below each block is auto-generated in run-time from the block itself. So if something changes in the prefab, I can see it immediately in this scene. 

Here's a code excerpt from this test rig. This code also inspired an answer I gave on stack exchange.

​

And below you can see the test rig in action.

​

Click either image to see it in full size.

​

bottom of page