Inspiration
I have always been fascinated by the simple yet addictive games like the dinosaur game on Chrome. I wanted to create something similar to that but with more functionalities and different modes to make it more engaging for the players.
What it does
My Python game, Dinosaur Adventures, was inspired by the dinosaur game on Chrome, as well as the Aircraft War game. The game has two modes: classic mode, which is similar to the Chrome dinosaur game but with additional functionalities, and shooting mode, where the player controls a dinosaur with a gun and must shoot down enemies while dodging their bullets.
In classic mode, the player's objective is to jump over cactus and dodge flying wyverns to survive and earn points. There are day and night modes which switch when the player reaches a certain threshold of points.
In shooting mode, the player must shoot enemies while dodging obstacles and bullets. I made different types of enemy. Wyvern, Cactus, and the Final Boss. They can shoot different types of bullets and they have different health values. The player has a health bar, and the game ends when the bar is empty. First aid kits can be collected to heal, gun items can be collected to upgrade the player's weapon, and helmet items can be collected to upgrade the player's equipment. There is a final boss that we need to defeat. It has two stages, when it's health drop to half it will become angry and turn to second stage. It will throw cactus in the first stage, and it will shoot it's featheres in the second stage.
How we built it
I built the game using the Pygame library, which is a popular Python library for game development. I started by creating the basic layout and graphics for the game using Pygame. I then added the functionality to detect collisions between the player and the obstacles and enemies.
I also used the Pygame mixer module to add sound effects and music to the game. I created different sound effects for jumping, shooting, and collision events. I also added background music to make the game more engaging.
Challenges we ran into
One of the biggest challenges I faced was using Python. I used C++ for most of the time in college, so I only used Python for very few times. I need to learn Python syntax during implement this project. It's kind of a tough time for me.
Another one of the biggest challenges I faced was creating the shooting mode. I had to figure out how to make the dinosaur shoot bullets while moving and dodging obstacles. I had to experiment with different approaches to make the controls smooth and intuitive. Also the collision check between character and bullets needs time and patience to debug.
Also, another challenge I faced was optimizing the game's performance. Since Pygame is a high-level library, it can be slow at times, especially when dealing with large images and animations. I had to optimize the code to make the game run smoothly on all devices.
Accomplishments that we're proud of
I am proud of creating a game that is not only fun to play but also challenging. I am also proud of the shooting mode, which adds a unique twist to the classic dinosaur game. I put a lot of effort into creating the graphics and sound effects, which I think turned out great.
What we learned
I learned a lot about game development and the Pygame framework while building this game. I learned how to write object oriented programming code in Python to create complex game objects and how to optimize code for better performance. I also improved my problem-solving skills by figuring out solutions to various challenges.
What's next for Dinosaur Adventures
I plan to add more modes and features to the game, such as pause, cast spells, and more levels. I also want to improve the game's graphics and animations to make it more visually appealing. Finally, I want to optimize the game further to make it run smoother on low-end devices.
Log in or sign up for Devpost to join the conversation.