Bag Simulator: Interactive Game with AI
The interactive project "Bag Simulator" transforms an ordinary paper package into an object for digital interaction. Author Arseniy Popov created a game where the user can crumple, tear, and explore a virtual bag.
The concept arose from forced wait time for a flight at the airport. Inspiration came from observing the folds of an ordinary bag, which the author decided to digitize and endow with its own miniature life.
At the core of the project is an experiment with interactive advertising. A familiar package becomes an object with which the viewer decides what to do: shake out virtual potatoes or feel like a sculptor.
Development took place in dialogue with ChatGPT and Codex neural networks. The idea, visual direction, and assessment of sensations belong to the author, while writing and refining the code were performed via AI.
The technical foundation of the project is JavaScript and WebGL 2. Geometry, textures, and shaders are generated programmatically, and the scene is calculated in real-time. Special attention was paid to physics.
Early versions resembled rubber: the bag stretched and passed through surfaces. Developers had to refine stretch limits, preserve creases, handle collisions, and manage tears.
For mobile devices, physics calculations are offloaded to a separate thread. This allowed striking a balance between graphical detail and performance on smartphones, eliminating freezes after prolonged crumpling.
Sound effects of rustling, crunching, and tearing are synthesized programmatically via Web Audio API. Sound variants change dynamically so that interaction does not become monotonous.
The prototype was created in 16 hours, followed by a couple of days to fine-tune the physics. Costs amounted to about 30% of the developer's weekly limit plus a $200 ChatGPT Pro subscription.







