Inspiration
We were inspired by our own childhood, when we played retro games like "Plants VS. Zombies" or "PacMan" on our parent's iPhones. These games that make up our earlier years all have two opposing sides in the gameplay, but the catch is that players were only allowed to represent one single side. In our project, we decided to build upon the original, classic "Plants VS. Zombies" game, morphing it into an interesting and unique PvP mini-game, where players can freely choose which sides to represent. Plants or Zombies, it is now your decision to make!
What it does
The rules of the original "Plants VS. Zombies" game still applies - plants defend the home from zombies. The catch is that we've modified it into a local 1v1 game, where each player gets to choose a side to represent.
For players representing plants, place the different species strategically to fight off zombie attacks. Your goal is to defend your home until the timer ticks down to 0.
For players representing zombies, place the different variations strategically to break through the plants' defense. Watch for the timer, you got limited time!
How we built it
With help from Claude Code, we first implemented a basic framework, incorporating the logics behind the "Plants VS. Zombie" game. Next, we added different variations of zombies and ensured that the second player could add them to the field with several key binds. At this point, we only had simple placeholders representing plants and zombies, so we then decided to improve on the graphics of the game. We eventually overlayed a background image, and included sprite animations for each plant and zombie. Here, the game is pretty much complete, but some troubleshooting still needed to be done. After fixing certain minor bugs, we added more details such as sound effects for different interactions, as well as a title screen giving a background story and making the game more intriguing in general. Next, we played a couple games ourselves, and used the log data to train an agent to play as either plants or zombies. Last but not least, to spice it up further and actually bring the game to life, we used computer vision and auto calibration to develop a real life game board and game pieces. When pieces are placed on the board, the system would be able to recognize the type of entity and where it's placed based on its patterns, placing the same entity on the corresponding grid in game.
Challenges we ran into
At times, there were merge conflicts on Github, but this was resolved by taking advantage of AI technology such as Claude Code, resolving issues to ensure that updates are pushed to branches without any changes getting lost. In addition, we originally decided to use a traditional reinforcement learning method to train the agents to play the game. However, upon seeing that the results were not as effective as we anticipated, we turned to a different approach: playing the game in real time, recording data, and using this to train and guide the agent instead.
Accomplishments that we're proud of
Of all things, we are very proud that a functional game with sufficient details has been made within the past 24 hours. We're also proud that we were able to connect the project to our own experiences, whether it be the "Plants VS. Zombies" game we played as kids, or utilizing past knowledge with reinforcement learning in training an agent to play the game. Most of all, though, we're happy that our game was able to put smiles on all those who tried it out. It serves more than just a simple remake of our childhood favorite game.
What we learned
With Github, at times it may be a good idea to commit and push regularly, every 40 lines or so. This way, even if minor merge issues do occur, things could be relatively easy to be resolved. In terms of productivity, we've also learned that even though lots of work needs to be done in a short period of time, it is still important to take regular breaks. Throughout the project, we found that after continuous hours of working, our efficiency decreases substantially, and got little things done in the next 2 hours. Taking regular breaks would reset our energy and efficiency. In the long run, it would be more beneficial to the outcome of a project like this.
What's next for Zombies VS Plants
The game could be polished even further, for instance, adding particle effects whenever a zombie or plant dies, or making the screen shake when there'a an explosion, etc. We could also add game modes to make the competitive experience more interesting, and give different skins to the different zombies.
Built With
- claude
- css
- html5
- javascript
- python
- reinforcementlearning
Log in or sign up for Devpost to join the conversation.