Inspiration We wanted to make a game that was simple to pick up and really fun to play. We started with a tower defense idea, then asked what it would look like if the defense was a single character instead of a bunch of towers. That led us to a duck with protecting its nest and eggs from predators. Once we decided on that idea, we starting working and went as far as we could with it to make our vision into reality.
What it does QuackAttack is a 2D defense game where you play as a duck guarding its nest. Foxes and snakes run in along the ground, and hawks swoop in from the sky, and your job is to shoot them down with your unfertilized eggs before they reach the nest. Each predator that gets through damages the nest's health bar, and if it hits zero, the game is over. A live scoreboard displays your score every time you kill a predator. The main menu has a leaderboard that keeps the top scores of people who play on the machine, and it saves them between play sessions. Every piece of art, sound effect, and music in the game was made by us from scratch.
How we built it We built the game in Godot 4 using GDScript. A global autoload script holds the shared game state, including nest health, score, and the current game state, like menu, playing, and game over. Predator stats like health, speed, and damage to the nest are stored in a nested dictionary, so adding a new predator mostly means adding a new entry. We used signals to connect the gameplay to the interface, so the health bar and scoreboard update on their own whenever the nest takes damage or the score changes. The leaderboard is its own script that stores every score, finds the top three, and saves them to the player's device. The main menu uses tweens for the bouncing title and sliding panels.
Challenges we ran into Our biggest bug was a nest that would not die. Its health kept resetting to 100 after every hit, because the setter for that variable never saved the new value. Another challenge was getting the scoreboard to react when a bullet hit a predator. Bullets are created while the game is running, so they can't be linked to the scoreboard in the editor, and we had to pass the signal through the global script instead. We also had a hawk that froze in the corner of the screen because it never received a reference to the player, which taught us to read the debugger closely. Getting collisions to work reliably between eggs, predators, and the nest took a lot of testing with layers, groups, and signal connections. Making all of the art and audio ourselves was also a balancing act, since every new sprite or sound took time away from programming.
Accomplishments that we're proud of We're proud to have a complete game loop, from the main menu to gameplay to a game over and a saved leaderboard, built within 24 hours. We're especially proud that all of the art and sound effects are original, so the game has its own look and feel instead of borrowed assets, as well as the UI for the main screen that one of our team members worked on. We also like that the two predator types behave differently, with foxes on the ground and hawks in the air, and that the whole thing is funny and fun to play.
What we learned We learned a lot about Godot, such as how autoloads and signals keep game state organized and keep the interface separate from the gameplay code. We also learned how setters work in GDScript and exactly how they can go wrong, how to save and load data with Godot's file system, and how to bring our own sprites and sound effects into a game so they fit together. Most of all, we learned that cutting features early is what makes it possible to finish a game in a day.
What's next for Quack Attack We want to add a currency system where defeated predators drop sticks that you collect and spend in a shop on upgrades for your cannon and your nest. We also plan to add abilities, like a rapid-fire quack, egg bombs that explode on impact, and a spread shot, so each run can feel different depending on what you pick. On top of that, we want to add more enemies, such as raccoons and snakes, plus a boss fight, each with its own behavior and original art and sound effects. We hope to keep developing it after the jam.
Built With
- godot
- photoshop