We were inspired by older Grand Theft Auto games and their top-down driving mechanics. The A&M campus made a great candidate for an area to explore, so we implemented a system of getting in and out of vehicles to an Aggieland map.

What it does

Gives the player a time challenge to travel to as many classes as possible while picking up as many Student IDs as possible.

How we built it

We built the program using Pygame to detect player keyboard inputs continuously. This allows the player to smoothly navigate the map across different modes. We also custom built a collision engine based on the hexadecimals colors of the pixels on the imported map background to keep the car on the roads and the walking character away from buildings.

Challenges we ran into

We ran into the issue of getting the camera to follow the player's movement. To fix this, we had to implement a system that moved all of the background image in the reverse direction of the player's inputs to maintain the illusion of movement. However, this solution did not work with the Student ID pickups as they just stayed on the screen. To solve this, we implemented a new class called world() that allowed us to output items to the screen in a way where their position was based off of an in-game x-y plane instead of the physical pixel position on the display.

Accomplishments that we're proud of

We are very proud of how smoothly our game ended up running. Initially, moving the background image caused the game to lag to 8 FPS. By compressing the background image, our FPS now approaches 60 FPS. We are also happy about how well our collision detection works for keeping the car on the roads. Considering it is based only on the color value of pixels and not hand-drawn boundaries, it keeps the car from going off-road almost perfectly.

What we learned

We learned that it is much better to work inside a class based system when creating vehicle objects so that we did not have to reimplement all of our code to create a new vehicle. With classes, we only have to add a few lines of code to add a new vehicles such as the Veo scooter. Initially we did not set up our program this way, but we made the decision to redesign the entire system early on to save us pain later on.

What's next for Grand Theft Aggie

On our own time, we plan to add more Student ID drops and locations to visit throughout campus. We may also add more game modes and a free roam option.

Share this project: