Part 24 - Refining the Game - Part 1.

By Jamie Chatterton / June 15, 2018

So. We have a basic game now.

However it needs some refining.

For instance...

You get all the coins you add.

It pushes everything to the front.

There are no coins on the game at the start

There's no 'dead' area where you don't get anything back like a real game

In this section let's fix those issues.

First the easiest - It pushes everything to the front.

It's the easiest to solve, as it's a modification of the animation of the pusher object.

Editing Pusher animation

Selecting the pusher and going to the "Animation" window. Then moving the current frame to the 1:00 mark…

Select pusher in animation window
Select pusher in animation window

The "pusher" is moved to the front at the time in the animation.

We can directly change the position.z coordinate. Checking at the time of 0:00, the position.z is 6, so a good halfway position for 1:00 would be 3, no?

Changing that and checking the animation we get…

However, it's not really enough to be anything.

Adjusting the floor

The next thing that is relatively easy is to alter the geometry of the floor object. A coin pusher generally has a raised lip at the end to make the coins pile up and stop them immediately falling out.

I'm going to hide everything but the 'floor' object to make this easier. Selecting them all and unticking the top-most checkbox in the inspector disables and hides them.

Select all objects except floor
Select all objects except the floor
Other objects hidden
Other objects are disabled and hidden

The current floor object is not quite fit-for-purpose. All of the faces are single faces. What we need from it is to 'sub-divide' the top face so we can manipulate it a little and create the lip we want.

With the face-tool selected, select the top-face…

Select top face
Select top face

Now click on "Subdivide Faces" in "ProBuilder"

Click Subdivide Faces
Click Subdivide Faces

It's possibly down the list somewhere or an icon.

It can be a little hard to see, but what was a single face is now 4 faces… If I select 2 alternative ones it may make it obvious

Four faces 1
Four faces 1
Four faces 2
Four faces 2

We don't really need four, just 2 long ones…

We can merge them back together… selecting two

Merging faces
Merging faces

And selecting "Merge Faces" in ProBuilder again, and do the same to the other two.

The main problem with this is that it creates vertices that aren't needed. We can remove them, but we have the shape we need now.

There are 3 vertices in the middle of the object, running along the width of it. Use the 'Vertex' tool and select all 3 of them

Select 3 vertices
Select 3 vertices

Now, my grid settings are set to 0.2, which is about right for this, and snap is turned on. With these 3 points selected , using the 'blue' 'Z' arrow, move those points to the right, towards what is the 'front' of the 'floor'. I end up with it about here…

Move towards front of the floor
Move towards the front of the floor

Now. We need to add the lip itself. We need to move the front edge itself up. Selecting the 3 points that make the front top… (I adjusted the view slightly)

Select lip of the floor
Select lip of the floor

The grid was left on and using the 'Green' 'Y' arrow, I move the points up a single grid unit.

Move up single grid unit
Move up single grid unit

And that looks about right.

Play the game and you'll noticed coins actually get stuck now and with the slowly pusher, it's taking all the coins in the players wallet to actually get anywhere

Git repository:

More posts in this series.