Inspiration
I’ve always debated fictional battles with my brother and friends, who would win, Goku or Superman? Could Batman beat Spider-Man if he didn't have his belt? These chats were always a blast, but pretty subjective. Being a huge fan of comics, anime, and sci-fi, I wanted a way to settle these arguments more objectively, something that could analyze personalities, powers, environments, and context without fan bias. That’s how Universus came to life, to make those “what if” battles smarter, more organized, and way more enjoyable.
What It Does
Universus is an AI-powered battle simulator that lets you pit any two characters from fiction against each other and get a detailed, neutral outcome. You just enter the characters (and their variants if you want), and Universus takes over: - It creates a neutral battleground that blends elements from both universes. - It analyzes each character’s strengths, weaknesses, history, and mindset. - It considers the environment and survival factors. - It chooses a winner and explains why they win — and why the other character loses. - It presents a clear narrative of the battle and an objective knockout. Plus, it selects thematically appropriate colors and generates unique character portraits that reflect the chosen variant. All of this with accurate research powered by Sonar.
How It Was Built
Universus is built using NextJS. We use Shadcn UI for accessibility and design consistency, along with Tailwind CSS and Framer Motion for responsive styling and animations. Each battle triggers two API calls: - One to Sonar Pro, which analyzes characters and produces structured battle data in JSON. - Another to Sonar, which finds relevant, high-quality character portraits. Sonar also picks each character’s primary and secondary colors from a curated palette. We added a helper to clean image URLs to avoid rendering issues. The app is designed with performance, clarity, and creative fun in mind, with animated canvases and transitions to make each battle feel dynamic and engaging.
What I Learned
Working with Sonar showed me just how far large language models can go when given structure and direction. Prompt engineering was crucial, I had to iterate a lot to ensure the results were clear, consistent, and fair. I also gained a deeper appreciation for error handling, fallback systems, and managing state with multi-step async AI workflows. It really showed how creative you can get with AI.
Challenges
One big challenge was keeping the battles balanced, making them fun while still grounded in the source material. Also to decide how much or little content to show to keep the reasearch without boring people. Sometimes Sonar would make weird choices or favor popular characters, so I had to fine-tune the prompts to keep things impartial. And I had to build a solid fallback mechanism and URL cleaner to handle any broken images reliably. One thing I still haven't figure out is that the API call fails from time to time for no apparent reason. I'm still looking into it.
What’s Next
I’m excited to add features like battle history, saving matchups, and possibly letting users vote on alternate endings. One thing I really want to add is the ability to challenge the result. Send a response challenge to Sonar to see if it wil change the result. Like arguing with a friend. In the long run, Universus could become a hub for fans to explore, share, and challenge battles across any fandom, all powered by structured AI and deep research.
Built With
- motion-framer
- nextjs
- shadcn
- sonar
- tailwind
- typescript
Log in or sign up for Devpost to join the conversation.