Kieran's profile picture

Published by

published
updated

Category: Games

Racer Prototype: DEV LOG 1 Base Mechanics and Assets

20/04/2025 Base Mechanics and Assets 

Hello! For my racer prototype I knew that i wanted to better my planning and implementation of my game's mechanics more efficiently and effectively. This is because of how unsatisfied and disappointed I was with my asteroids prototype. By following the details outlined in chapter 2, I can effectively plan out how and when ill implement each feature. this is to ensure my design process is more satisfying and easy on my end.

To start, I was able to implement the top down movement mechanics or the procedural aspects in my game. This was relatively simple as after i had attached the "top-down" behavior to my player character i just needed o change the key binds to match my intended ones for my game. However one major tweak i needed to add is to make the player face forward automatically after a key is released. I achieved this by making it so that when the right and left key is NOT being pressed, the player rotates to their original position. this is the code i used to achieve this:


I then ran into a bug where the player would be able to travel off of the track. To amend this, I added boundary points where if the player exceeded a certain x coordinate. This is the code i used to make this work: 

In order to continue adding formal elements to my game, I then coded the enemy spawning mechanic by following this tutorial: https://www.youtube.com/watch?v=qoah3jArKJU&t=3297s.

From the video, I learned that by utilising variables i can implement a random in range feature to make it so different enemies can generate on a spawn tile sprite. Something that was not outlined in the video was how to generate an enemy on multiple tiles so my game was bugged to only generate on one tile like this: 

This was fixed using this code:

So now! My game looks like this:

I then added a death mechanic as the final boundary for the gameplay. I achieved this by creating a boolien variable that checks if the player is dead. When the player collides with a hazard it will change the variable to IsDead = true. This will then trigger a sequence where the players animation will change, a sound will play and it will kill the player. For now (for prototyping purposes) ive set it so the scene resets to the beginning but later on this will change to a death screen. This is the code i did to do this: 

Before i end off this post i will be sharing the dragon assets that were made by my good online friend, allied_almond:

I think they came out really nice and im glad they helped me with drawing the sprites for the dragons. Well that's all for this post, next I'll talk about implementing the projectiles and scoring system. Kier signing off!


0 Kudos

Comments

Comments disabled.