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();
}