Gobble Goblin

24-Hour Game Jam • Unity & C#

Play as a poisoned goblin eating fruits to survive, other goblins attack so you must switch between puzzle and shooter.

Engineered the complete gameplay pipeline from scratch. I programmed the procedural grid generation for dynamic fruit spawning, designed adjacency and colour matching algorithms to detect valid player moves, and implemented the combo-chaining logic that drives the scoring and health regeneration systems.


                                void CheckNextFruit(FruitController fruit)
                                {
                                    if (LastFruit == -1)
                                    {
                                        LastFruit = fruit.m_fruitType;
                                        LastPair = fruit.m_fruitPair;
                                        LastX = fruit.transform.position.x; LastZ = fruit.transform.position.z;
                                        fruit.transform.localScale *= 1.3f;
                                        fruit.m_clicked = true;
                                        CurrentSelectedFruit.position = fruit.transform.position;
                                        CurrentSelectedFruit.gameObject.SetActive(true);
                                        return;
                                    }
                                    if ((fruit.m_fruitType == LastFruit  || (fruit.m_fruitPair != -1 && fruit.m_fruitPair == LastPair)) &&  fruit.m_clicked == false)
                                    {
                                        if (Mathf.Abs(fruit.transform.position.x - LastX) <= 1 && Mathf.Abs(fruit.transform.position.z - LastZ) <= 1)
                                        {
                                            Chain++;
                                            Score += Chain;
                                            fruit.transform.localScale *= 1.5f;
                                            LastFruit = fruit.m_fruitType;
                                            LastPair = fruit.m_fruitPair;
                                            LastX = fruit.transform.position.x; LastZ = fruit.transform.position.z;
                                            CurrentSelectedFruit.position = fruit.transform.position;
                                            CurrentSelectedFruit.gameObject.SetActive(true);
                                            fruit.m_clicked = true;
                                        }
                                    }
                                }
                                
Chain Matching Logic: Unity C# gameplay script managing match-three or chain-linking mechanics. Validates fruit types or pairs, enforces a maximum distance constraint (`<= 1`) between selections, and calculates scaling combo scores based on the active chain length.

Play the Game

Core Mechanic

Press Space to instantly swap between Puzzle View and FPS View.
Full tutorial and controls are provided in-game.