For this project, I wanted to explore how to set up a server for Unity. Since I had no prior experience with networking or backend systems, I built my own server to support level sharing and storage.
Development
3D Nonogram
This is my current solo project, a 3D nonogram game where players can create their own levels and share them with others.
After that I set up the server. The server runs on a Raspberry Pi 5 using Python Flask.
To avoid exposing my public IP or relying on port forwarding, I implemented a secure solution with a reverse proxy using ngrok.
This allowed me to host and test the server safely while learning more about server management and Unity integration.
I started with creating a level editor and a save and load system that serializes to JSON for easy backend storage.
Project Info
Role: Programmer & designer
Tools: C# & Python flask server
Hardware: Rasperry PI 5
Time: 8 Weeks
Github
Code Snippet
Explanation
The script I chose to highlight is the core of 3D Nonogram’s level editor. It allows players to create and edit voxel-based puzzles directly within the game.
When the script is active, it:
Detects voxel interactions using an optimized raycast system (
Physics.RaycastNonAlloc) to avoid memory allocations.Handles different editing modes — placing, erasing, and painting voxels based on player input.
Maintains undo/redo history through a custom command system, allowing players to revert or reapply actions.
Synchronizes voxel data with a
GridSaveDatastructure, enabling smooth saving, loading, and uploading of custom levels.Provides visual feedback with a transparent voxel that follows the player’s cursor, showing exactly where the next block will be placed.
For data management, the editor serializes all voxel information into JSON files for easy storage and server integration.
This system allows 3D Nonogram to support full in-game level creation, editing, and sharing without requiring external tools.
What I learned
Server Development
Hosted and managed a backend using Flask on a Raspberry Pi 5, and integrated Unity functionality for communication between the game and the server.
Security Practices
Used ngrok as a reverse proxy to avoid port forwarding and minimize potential security risks.
Data Serialization
Implemented JSON-based serialization to transfer 3D puzzle data between Unity and the backend server.
Game Architecture
Designed and built systems for level creation, saving, and loading within Unity.