Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Unity Hyper Casual Game - Exploring Hexa Sort Mechanics
Rating: 4.5 out of 5(22 ratings)
230 students

Unity Hyper Casual Game - Exploring Hexa Sort Mechanics

Learn & Create Various Mechanics from the Hyper Casual Mobile Game - Hexa Sort
Last updated 9/2025
English
English [Auto],

What you'll learn

  • How to create a hexagonal grid using Unity's Grid Component.
  • Implementing symmetrical hexagonal grids for level design.
  • Controlling and manipulating hexagon stacks within the game environment.
  • Developing and implementing merging mechanics for hexagon stacks.
  • Techniques for identifying and solving common issues in game development.

Course content

5 sections26 lectures3h 8m total length
  • Introduction1:12

    Learn to build a hexagonal grid in Unity, create a procedural layout inspired by Hexachord, spawn and snap hex stacks, and implement the merging mechanic, with shader for main menu.

  • Understanding the Hexagonal Grid9:01

    Explore the hexagonal grid in Unity using the grid component, hexagon layout, and cell size swizzle, plus a grid tester to map cells to world positions in orthographic view.

  • Procedural Hexagonal Grid7:58

    Create a procedural hexagon grid with a grid generator script, instantiating hexagon prefabs in a two-dimensional grid, controlled by grid size and world position mapping.

  • The First Stacks10:57

    Enhance the scene by adding ground plane with grid material, adjust its offset to prevent hexagon overlap, and set up a stack spawner to generate hexagon stacks with orthographic camera.

  • Coloring the Stacks9:41

    Color the hexagon stacks by using a hexagon script with a color property tied to the renderer, selecting two random colors per stack from a predefined list.

  • A Better Hexagon Stack3:09

    Build and manage a hex stack in Unity by creating a hex stack script, initializing a hexagon list, and adding spawned hexagons for color-based merging.

  • Controlling the Stack (Part 1)11:27

    Develop a stack controller that uses raycasts and mouse input to move hex stacks onto grid cells, with mesh colliders, layer masks, and occupancy checks to prevent overlaps.

  • Controlling the Stack (Part 2)7:22

    Tackle the stack drag mechanic in a Unity hexa sort game, using raycasts and layer masks to detect ground or grid cells and move the stack toward a target position.

  • Grid Cell Snapping5:25

    Move a stack by snapping it to a grid hex cell with occupancy check and raycast drag. Highlight target and place stack above the cell, or drop it if unoccupied.

  • Dropping Stacks on Empty Cells6:35

    This lecture covers snapping stacks to grid cells, dropping onto valid target cells, and reparenting stacks while disabling colliders to prevent moved items, paving the way for the merge mechanic.

  • Spawning New Stacks3:08

    Spawn new stacks by wiring a stack controller to grid cells, trigger on stack placement, and reset after three placements, while setting the game to 60 fps for smooth gameplay.

  • Merging Hexagons (Part 1)11:11

    Create and attach a merge manager to merge stacks on a grid cell by detecting neighboring grid cells with colliders and comparing top hexagon colors to merge toward the center.

  • Merging Hexagons (Part 2)8:59

    Explore merging hexagons in a hex grid by detecting similar neighbors based on top hexagon color, collecting and moving matching hexagons to a target cell, and updating stacks.

  • Merging Hexagons (Part 3)6:35

    Merge hexagons by removing them from their stacks and adding them to a new stack, calculating the initial y position and target local position, then use line tween for transitions.

  • Completing a Stack13:58

    Refactor and modularize the hexagon stack mechanics by extracting neighbor grid cells logic. Compute similar neighbor grid cells, process complete stacks to destroy hexagons safely, and unparent before animations.

  • Hexagon Animations10:18

    Animate hexagons in a Unity hexagon sort game using coroutines to manage moves, merges, and vanish effects with staggered delays and lean twin library moves for smooth gameplay.

  • Rotating Hexagons3:37

    Explore rotating hexagons using a line tween to rotate around, computing a rotation axis from direction via cross product with up, and applying a 180-degree, eased rotation with delay.

  • The Merging Loop5:37

    Update the grid by tracking updated cells, then check merges with similar neighbor cells using a merge manager and a coroutine in Unity to manage hex stacks.

Requirements

  • Basic Coding Knowledge (Loops, Coroutine, Actions will be used)
  • The will to Learn Advanced Game Development Concepts

Description

Hey Friend!


In this course, you will learn how to recreate various mechanics and effects from Hexa Sort, a famous and trending hypercasual mobile game.


We will start by creating a Hexagonal Grid using Unity's Grid Component. (Way simpler than creating our own system)

After you've clearly understood how this works, we will tackle Procedural Hexagonal Grid Creation, the basics actually.


We want to create a symmetrical hexagonal grid that we can then edit to Create Levels.

You will also learn how to create levels, the quick way.


After creating our grid, we will tackle Spawning Hexagon Stacks and controlling them.


We will learn how to Snap Those Stacks on the grid and Merge everything when it makes sense.

The trickiest part of the system is, you guessed it, the Merging Mechanic. We need to Iterate over Every Cell that has been updated during the previous merge.

It might sound weird, but you'll know how to do that after completing the course!


I'm also going to include some lectures on the Shader in the Main Menu, because that's something I find cool.

And if you want me to Explore More Hidden Gems of this game, please let me know!


Ready to jump in? Enroll now!


Disclaimer : This is not a beginner course, you need to have some basic Unity & C# knowledge before starting this course.

It's best if you know about loops, coroutines & actions.

Who this course is for:

  • Aspiring Game Developers, new to game development and are looking to learn advanced game development right away.
  • Developers who have some experience with Unity and want to deepen their understanding of grid-based systems and procedural generation.
  • Game developers specifically interested in the hyper-casual genre and wanting to learn how to recreate mechanics from popular games in this category.
  • Individuals who develop games as a hobby or are working on indie game projects and are looking for new techniques and inspirations for their games.