Tag Archives: ORDER

Making a puzzle game: ORDER

ORDER_for_itch

Play ORDER here.

Playing with Polygons

ORDER was born from a little experiment in manipulating polygons in Unity. I wanted to see how I could create coded animations which would allow a polygon to change its number of sides.

polyChangeEarly

Initially, I created a polygon with multiple triangle meshes that created a spoke effect. I could manipulate the length of each polygon to change the polygons shape. I then created a little piece of code which checked if each of these spokes was the same length as the boundary of the desired shape. This worked ok, the animation between shapes didn’t look very nice (especially between triangle and square), there was some edge detection problems, and when a number of shapes were manipulated at the same time, the frame rate severely dropped.

So in order to reduce the stress on the frame rate, I had to simplify the system.

polyChangeLater

The best thing I could do was reduce the number of triangles to that equal to the number of sides. Although there are possibly even more efficient ways of doing this, this would likely work for my process.

All ‘unused’ triangles, were bunched together to create a ‘line’, therefore creating the appearance of different sized polygons. The initial limitations of this system is that it could only be used to create regular polygons.

For the animation of the points I used half a sin wave, the rate of change is roughly slow-fast-slow.

Making the Game

I knew I had two things that I could do with the polygons, I could change their number of sides and I could rotate them relatively easy.

Initially the first version of the game, used three sets of controls.

  1. Select the polygon that you wanted.
  2. Change the number of sides of the selected polygon.
  3. Change the rotation of the selected polygon.

Each action would also affect the neighbouring polygons in some manner. Either also rotating them or changing their number of sides.

The issue was very clear, this was horrible to do. It did not feel good in anyway.

So…

I changed the control method so that changing the polygon that is selected, also manipulated that polygon and it’s neighbours. The newly selected polygon has it’s number of sides increased and the neighbours are rotated. This felt better, but was a lot to visually take in. This reduced the controls to one of movement only.

I added a colour change to show which polygon is selected, a small pulse animation to the newly selected polygon, and a delayed rotation animation to give a sense of cause and effect. This definitely helped.

Beating the Game

Finally I needed a winning condition. Ideally I wanted the player to win whenever all the shapes were matching both in rotation and the number of sides. However, I was not able to prove that this was possible for all the different permutations of this. This issue, meant that I could not fairly set it as a goal.

I settled on a fixed goal of having all shapes return to triangles and all pointing down after being randomised.

The next issue, is how do you show that this is what the player needs to do.

I kept adding a range of information in different forms until I think I got it right:

  1. The starting condition of the polygons is the required position.
  2. Text tells the player that “this is ORDER.” and once randomised “return to ORDER”.
  3. Polygons in the correct position pulse, those that are not are static.
  4. A counter indicates the level of order.

Conclusion

ORDER_for_itch

I am happy how the game turned out, it was a fun experiment in Unity and did not take too long to complete. It is perhaps not the most novel of ideas, but I think it at least adds an additional level of complexity to a common grid puzzle structure (changing something changes the neighbours – return to an ordered pattern), by having two methods of manipulation and fixed selection movement between neighbouring polygons.

If you want to play ORDER you can do so here. it may require a Unity plug in to run as well as permission to run.