top of page

Mobile Game - The Beginning

pratikparmar2

This is the first in a series of blogs catered to discussing the progress of a game being developed by 4 individuals for mobile using Unity. In this project, the role of coding the base mechanics of the game has been given to Pratik.

Board of match 3 style game
Preview from Unity

So far I have created, in C#, two scripts. The first script called 'Board Script' creates the background tiles in a 5 by 5 row starting at the bottom left while also placing a mineral ontop of each of these background tiles. This creates the background of the game which is set to be in the style of a match 3 game which can be seen on the left. The first 'for loop' takes care of the position of the width (row) and the second takes care of the height (column) until they have both reached the values set in the inspector which in this case is '5' for both thus creating a 5 by 5 grid. It is created in the order from the bottom left upwards, then the next row until all are populated. The commented code allows you to clearly see the steps each line of code is used for.



A match and unmatches
Matching GIF

This coroutine allows the ability to move a mineral back to its previous position if the player's move has created no matches which can be seen in the GIF on the left. It only works after a .5 second wait when it is called. If a mineral is not matches, it gathers the position of the row and column of the mineral and changes it back to the previous values and lerps between them to create a smooth transition effect. This can also be seen in the GIF. This creates the perfect effect that the team was looking for.


The current sprites being used for the background, tiles and minerals are temporary and were created by me in Paint 3D as placeholders so that I could test before the final minerals are created by the team designer.




References:

Board Creation: Mister Taft Creates (2017) Part 3: Filling the Board - Make a Match-3 game like Candy Crush in Unity using C#. Available at: https://www.youtube.com/watch?v=va2kbdu5z6E&list=PL4vbr3u7UKWrxEz75MqmTDd899cYAvQ_B&index=4 (Accessed: 05 October 2022).


Matching Coroutine: Mister Taft Creates (2017) Part 7 - Find a Match Part 2: Make a Game like Candy Crush in Unity using C#. Available at: https://www.youtube.com/watch?v=Y4-vLMJeK7s&list=PL4vbr3u7UKWrxEz75MqmTDd899cYAvQ_B&index=8 (Accessed: 05 October 2022)









11 views0 comments

Recent Posts

See All

Comments


  • 5d14492ca106b9d2b02204cce774fadd
  • LinkedIn
  • YouTube
  • Instagram

©2023 by Development.

bottom of page