Inspiration
We've all worked on group projects where some of our teammates use... slightly lower effort means... of writing code. Now with bAIted!, we've turned the question of "AI or not" into a video game!
What it does
bAIted! features a gameplay loop inspired by Among Us. The game takes place across multiple rounds, where players have to correctly identify and vote out the vibecoder! In the coding phase, players will be given a coding question to solve. While human players write code in the embedded editor, AI players are forced to use a helpful AI agent! The AI agent will generate a solution to the code for them, and AI players will be able to prompt it for a limited number of changes in order to make it seem more human.
This is followed by the discussion phase, where all players are shown the code that everyone has written, and have to choose one player to vote out! The game will continue for multiple rounds until either the vibecoder has been voted out, or the number of human players remaining is equal to the number of AI players remaining.
How we built it
Ahem, let's just say we have a few "AI imposters" among our ranks as well...
In all seriousness:
- When a lobby is created, a random lobby code is generated for players to join.
- Players connect to the lobby through web sockets.
- Once the game is started, the game takes place in multiple phases (reading, coding, discussion)
- The lobby handles the sharing of data between clients so that players can see each others' code during voting.
Challenges we ran into
We had an ambitious list of features for the project, but throughout the hackathon, we had to reconsider and prioritise the most important features in order to have a workable prototype. For example, we sacrificed a chat function as it would take too much time and discussion could be done through speaking in person or in voice calls.
What we learned
We learnt about how to use websockets to create common lobbies for players to join, similar to existing web games like skribbl.io. Moreover, we also learnt how to integrate existing API like AI APIs to help generate content like questions in the game. Lastly, and most importantly, we learnt how to divide the game into separate parts such that one person can work on said part and then integrate them to other parts.
What's next for bAIted!
If we had more time, we would implement special abilities such as humans being able to spy on other players, or vibecoders being able to sabotage human players to make their code look like AI. We would also like to add support for more coding languages besides Python as well.
Built With
- codemirror
- next.js
- openai
- socket.io
- tailwind
Log in or sign up for Devpost to join the conversation.