Wine Lottery
Creative technology
I built the Unity application in November and December 2019 to give the existing vinlotteriet.no lottery a more exciting draw. Each ball represents a paid ticket, and the machine uses physics to select the winner.
Making the draw visible
We already had an Angular application for organising wine lotteries, but its draw animation lacked the anticipation of a physical lottery machine. I wanted to make the draw feel more like an event, so I modelled the machine and built the complete Unity application myself. I also maintain vinlotteriet.no and have made visual changes to the web application.
Matching Firestore in Unity
Participants and tickets are stored in Firebase. The Unity client uses data models that match the Firestore data returned by the raw API. Recreating and maintaining that structure by hand was a chore, but it allowed the machine to draw from the same lotteries people had prepared on vinlotteriet.no.
Physics with real consequences
The balls move quickly, and at that speed the physics engine could sometimes miss a collision with the colliders forming the bowl. This was more than a visual problem. Every ball represented a ticket bought with real money, so a ball escaping from the simulation could exclude someone from the draw. I adjusted the timing and collision setup, then added a secondary catch web around the machine so an escaped ball could not be lost.
Still in occasional use
The application is still used, although less often than before. I continued using it at work, where it now runs as a bingo machine at least twice a year. Other people have also used it after finding vinlotteriet.no on their own.
What I would change
I would improve the 3D work and clean up the timed sequence that controls the draw. A clearer sequence structure would make the machine easier to change and extend without disturbing the timing of the existing animation.
Designed, modelled and developed by Edvard Pires Bjørgen in November and December 2019. I also maintain and contribute visual changes to vinlotteriet.no.