Box of Cards Video Clip
A social ad built in Unity3D instead of animation software — real physics tossing real cards, exported at one click. Part of the Box of Cards work.
Unity3D · Claude Code · Agentic Coding · Blender · Audacity
Advertising, a Decade Later
It has been quite some time since my last marketing campaign, and I have not used social media in what feels like a decade. I feel old.
It turns out that my target demographics are mostly on TikTok and Instagram, though I feel more comfortable on Reddit. So I will create a gameplay video to advertise.
Designing the video
I want to match the style of the game as I really dislike misleading advertisements. The vibe I aim for is relaxed, humorous, and with friends. To make it more interesting, I will use physics so that cards are tossed onto the board. There will be additional UI animations for information dumps and of course sounds.
I Already Own the Right Tool
There are tons of animation software and libraries. I heard some are really great and maybe their AI features would be useful? Physics support seems to be very uncommon, and at the very least I need animation curves to fake physics. But the pricing and usability were just meh across the board. I wondered why it could not be as simple as in Unity3D, and then I remembered that I am a Senior Unity Developer and can just use Unity3D to create the video. It has more functionality than I will ever need.
3D modeling a play card
A 2D plane was just not good enough, because cards have some thickness and I wanted realistic physics.
I originally learned to use Autodesk Maya, but I used Blender because I had wanted to switch for quite some time.
Throwaway Code, Honestly
This project has a very limited scope, will never be deployed anywhere and is only handled by one person. This means that code quality did not really matter to me, and writing all of this by hand would have taken two to four times as long. Cleaning up the code would take a few days, but it is not required right now.
Creating the video
I had great experiences using LLMs like Claude for development, especially for C# projects and in established projects for writing tests, boilerplates and refactorings.
I loved my JetBrains Rider subscription but really disliked the LLM features and cancelled it after 10 years. I will switch back if their LLM features improve. The Unity3D and C# code that was generated did work but the style was far from best practices. A lot of events were tracked in the Update loop, Awake and Start were used incorrectly, and every potentially missing SerializeField reference was wrapped in an if/else. I prefer to have my application obviously crash rather than have it run with a missing camera due to a caught exception.
Fine tuning
Clicking Play and waiting for the card toss to appear is time-consuming.
So I added buttons to several components to test different values for tossing cards, button colors, UI hand movement, click delays, and more.
So many configs
What needs to be configured?
Dozens of animations, each having a start time, duration, interpolation curve, and a sound with a delay. Card tosses have an origin, direction, velocity, initial rotation, rotational force, mass, friction and more.
Sound files from Envato
I first favorited all the sounds I needed on Envato AudioJungle, and then noticed that my Envato subscription does not include AudioJungle.
Instead I had to search all my sounds in a separate library. I felt very weird listening to laughter for 30 minutes, but it is still better than listening to 'AUDIO JUNGLE' 1000 times in an hour. I used Audacity to cut and fade audio clips and added config values for volume and delays in the engine for faster iterations.
All the config I need
One sentence of text, three answer texts and the winning answer index are all I need to create a new clip.
I might add additional card toss configurations later on.
One Click, One Clip
One sentence, three answers and a winning index in — I click START RECORDING and Unity runs, records and exports the finished clip.
Humor is not generic
All I need to do now is find funny sentences and answers, which turns out a lot harder than expected. Content my social circle finds funny is in conflict with various platform guidelines or has the potential to create a backlash. I often heard that every publicity is good publicity, but I do not want to start out this way. A lot of remaining content is funny due to its banality. I intend to include the community along the way to help me with these. I am curious how well this clip will do regarding social outreach. Choosing Unity3D was great for my use case and this was a lot of fun.