Pixel Grower

2-Week Rapid Prototype • Unity & C#

Play as a farmer on a floating island, buy seeds from the market to grow flowers, once they are grown, collect the gold by clicking the flower and buy more seeds. Upload an image so it shows within the upload window in game, the flowers will grow like pixels forming an image.

Engineered the complete runtime pipeline for custom image processing. Parsed local image files into 2D texture data, extracted individual pixel color values, and mapped those coordinates to a 3D world grid to dynamically instantiate and grow corresponding flower objects.


                                public void ResizeAndExtractColors()
                                {
                                    if (sourceImage == null) return;

                                    // Step 1: Resize to 32x32
                                    resizedImage = new Texture2D(32, 32, TextureFormat.RGBA32, false);

                                    for (int y = 0; y < 32; y++)
                                    {
                                        for (int x = 0; x < 32; x++)
                                        {
                                            float u = (float)x / 32f;
                                            float v = (float)y / 32f;

                                            Color sampledColor = sourceImage.GetPixelBilinear(u, v);
                                            resizedImage.SetPixel(x, y, sampledColor);
                                        }
                                    }

                                    resizedImage.Apply();

                                    // Step 2: Extract colors into array
                                    pixelColors = resizedImage.GetPixels(); // returns Color[32*32] in row-major order

                                    ApplyColoursToPlants();
                                }
                                
Runtime Texture Downsampling: Unity C# utility function that dynamically resamples high-resolution source textures down to a 32x32 grid using bilinear filtering. The optimized color data is extracted into a 1D array to procedurally drive the color palette of generated flowers.

Play the Game

Controls

  • W A S D — Move character
  • Hold RMB — Free look camera
  • RMB + LMB — Throw / Plant seed
  • E — Buy seed (at stand)
  • Space — Jump
  • LMB — Harvest fully grown flowers
  • Q — Toggle Free-Cam mode (Ascend: Space | Descend: LCtrl)

Gameplay Loop

  1. Start with 50 Gold in your inventory.
  2. Upload any custom image via the in-game UI.
  3. Purchase seeds and sow them across the island.
  4. Wait for growth cycles to complete, then harvest for profit.