Table 9
Inspiration & Introduction
Marketmon is a web-based trading card game inspired by popular games like Pokemon or Yugioh where players can battle their cards against an opponent. Each card is directly tied to one of the companies in the S&P 500, and their stats are directly impacted by metrics about the company such as market cap, free cash flow, and earnings growth. As companies grow and expand, so do the strength and abilities of their corresponding cards. You can select a card to play, select what action you'd like to take, end your turn and then repeat the cycle until you emerge victorious or accept defeat.
The inspiration behind Marketmon was to create an engaging and educational experience that combines the excitement of trading card games with the world of finance and investing. By linking each card to a real-world company, players can learn about different businesses, their performance, and how various financial metrics influence their strength in the game.
Growth is a central theme in Marketmon, as players witness their cards grow in power as the companies they represent experience success and expansion. The game aims to capture the thrill of watching businesses thrive and translate that growth into tangible advantages on the battlefield.
How we built it
- We used Svelte with TypeScript and Tailwind CSS for our frontend, and used Python for data scraping.
- For game state and moves, we are handling logic client side in the browser.
- For generating monsters, we tethered together company data from Yahoo Finance, the Claude Haiku API to generate descriptions of the creature, and the Stability API to generate images.
- We utilized these various APIs and technologies to have everything connected together with real data, from scraping company data to generating unique creature descriptions and images based on the company's profile.
- Data that is gathered from Yahoo Finance is passed into the next part of creature generation which is generating a description. This is done by sending a request to the Claude API with a prompt that contains a business description of the company, along with specification to return a specific JSON format containing a description of the monster we want to generate. At the next step of our generation system, this description is parsed and sent within another prompt to the Stability API to generate an image for the creature, which is then saved.
Challenges we ran into
- Game logic is hard!
- Conceptualizing what the game logic should be was very hard as none of us have really played trading card games like Pokemon, Magic, Yugioh, etc.
- Issues with state mutability, other weird quirks
- Generating lots of images or text takes a lot of time which is scarce in a hackathon
- Trying to balance the game mechanics was a significant challenge, as we had to consider various financial metrics and their impact on card strength.
Accomplishments that we're proud of
- A generally functional UI that displays various cards on the page with real data, we spent a lot of time on the cards and we think they look pretty good
- Successfully combining yfinance data, the Claude API for creature descriptions and the Stability API for images
- Creating an engaging and visually appealing experience that blends the traditionally static trading card games with dynamic elements of finance.
What we learned
- Game logic is hard!!!
- TypeScript is awesome (we ran into a few bugs that probably would've been almost game over if we were using JavaScript)
- Integrating multiple APIs and data sources can cause weird variable naming discrepancies if you're not careful, so have to be careful with execution
What's next for MarketMon?
- General overview of improvements we could've made: improve game balance and logic, playing real time against other players, a system for levelling up and opening packs, etc.
- Expand the game to include more companies and industries (i.e. international companies or smaller companies), with would give players a broader range of cards to collect and battle with.
- Implement multiplayer functionality so players can challenge each other in real-time battles and compete on leaderboards.
- Introduce a leveling system and pack-opening mechanics to get players to collect and evolve their cards over time which could add depth and replayability.
Built With
- sveltekit
Log in or sign up for Devpost to join the conversation.