Inspiration

For many, trading feels out of reach: too risky, too complex, or just plain dull. But we knew it didn’t have to be that way. We wanted to create an game that gave beginner traders a fun, competitive, and most importantly, instructive experience in the trading world. And so came BattleStocks—a fusion of financial education, strategic gameplay, and fun, riskless trading.

What it does

BattleStocks is a "fast-Paced, competitive, stock trading game." Traders join a room of at least 2 players. From here, the host can start the game which will enact an order of "phases" to the game. In the very first phase of a game, all players are given $10000, which they'll use to buy shares of an assortment of securities. After, each subsequent phase has each trader vote on one of three "events" which will affect the prices of each stock. At the end of the last phase, the trader with the most value securities wins.

How we built it

Utilizing, Svelte, TypeScript, Bun, Drizzle, Hono, and PostgreSQL, we prioritized a modern, high-performance tech stack designed for speed, interactivity, and scalability.

Challenges we ran into

Auth:

    db.insert(User).values(user);

See the problem here? We sure as hell didn't... for 8 hours. Here's the correct way to insert this data into the table:

    **await** db.insert(User).values(user);

Accomplishments that we're proud of

We successfully connected WebSockets from our backend to our frontend via Hono! 😁 This allowed us to create "servers" or "rooms" that're vital to our application.

What we learned

Make your teammates promise to not forget await

What's next for BattleStocks

From creating a more flowy, robust UI, improving our backend and running servers non-locally, to adding more game data, features, and functions, BattleStocks is just about ready to scale into an emmersive, massive online game full of competitive traders.

Built With

Share this project:

Updates