Inspiration
I have had privilege to host a couple of events, Kahoot has always been the go-to game. Greedy Pig is here to serve as a variety for event games. Not only designed events, it could be played amongst friend, player and computer (i.e next milestone)
What it does
Greedy Pig is designed to be adaptable, offering multiple options such as using either a roulette or a dice as the item of play, determining game end conditions (e.g., reaching a specific score or number of turns), and optionally including a moderator to manage game flow.
The game supports two or more players, fostering a lively and competitive environment.
Gameplay Mechanics:
Players roll a six-sided die to accumulate points. Rolling a one ends the player's turn, resulting in the loss of all accumulated points for that turn. Players have the option to either keep their score and pass the die or continue rolling to potentially increase their score, risking losing it all if they roll a one.
Scoring & Strategy:
Success hinges on strategic decision-making, balancing risk and reward to maximize point accumulation without succumbing to greed.
Game Conclusion & Rewards:
The game ends either when the agreed-upon number of turns is reached or when a player achieves the target score. The winner, determined by the highest score, receives the accumulated prize pool when in the game is in betting mode.
Greedy Pig stands as an innovative fusion of entertainment and technology, poised to captivate event attendees while exemplifying the potential of Convex Database.
How we built it
Greedy Pig is built using modern web technologies and leverages the power of Convex Database for real-time data management. Here's an overview of the key components and technologies used:
Frontend Development:
The frontend of Greedy Pig is developed using React.js, a popular JavaScript library for building user interfaces. We utilized Redux for state management and Tailwind CSS for styling to ensure a responsive and visually appealing user experience.
Backend Integration:
For seamless integration with the backend, we used Convex Database. Convex provides real-time data synchronization, allowing multiple players to interact with the game simultaneously. We employed Convex's mutation and query functions to handle data updates and retrievals efficiently.
Game Logic:
The core gameplay mechanics of Greedy Pig, including dice rolling, score calculation, and turn management, are implemented using TypeScript. We carefully designed the game logic to ensure an engaging and fair gameplay experience for all participants.
Scalability and Adaptability: One of the main objectives while building Greedy Pig was to make it adaptable for various settings, including events, casual gatherings, and competitive tournaments. We achieved this by implementing configurable options such as game end conditions, player moderation, and choice of gameplay items (dice or roulette).
Challenges we ran into
I had a few blockers on using the validators and ensuring they are in sync with the frontend. Most of the challenges were as a result of tinkering with Convex for the first time. I would say it is a knowledge gap factor.
Accomplishments that we're proud of
Was somewhat confused on how to go about design of the app so as to enjoy the real-time update from Convex. Knowing how to structure one's data on the frontend so one enjoy the real-time feature of Convex is a bit tricky.
The flexibility and configurability of Greedy Pig enable hosts to tailor the game to their specific preferences and requirements, whether it's adjusting scoring rules, setting game end conditions, or customizing the user interface.
What we learned
With convex, I could handle most tasks that requires real-time update instead of relying on Websocket and traditional database, I could have a system like Convex that does all these features I mentioned as one standalone platform.
What's next for Greedy Pig
Looking ahead, we have several plans to further enhance and expand Greedy Pig:
Additional Gameplay Modes. Introducing new gameplay modes and variants to cater to different preferences and play styles, such as team-based competitions, timed challenges, and solo play against computer opponents.
Enhanced Social Features. Implementing social features such as friend invitations, and player profiles to foster a sense of community and competition among players.
Integration with External Platforms: Exploring opportunities to integrate Greedy Pig with external platforms and services, such as social media networks and streaming platforms, to reach a broader audience and facilitate seamless cross-platform gaming experiences.
Continuous Optimization and Updates: Continuously optimizing and updating Greedy Pig based on user feedback and emerging trends in gaming technology to ensure a compelling and immersive experience for players worldwide.
Built With
- convex
- nextjs
- typescript
Log in or sign up for Devpost to join the conversation.