Bug Fixing, yay…

Hey!

It has came to that part of the project where I am starting to fix bugs that I am continuously finding. It seems like a never ending process at the minute, but I thought I would share these annoying little things with you.

Out of all the bugs that I have discovered (so far), around 80% of them consisted of my ray-casts. The main one was whenever I decided to attack with a projectile, the projectile was in the way of my ray-cast to see if the enemy was in my line of sight and therefore removed the enemy from my “visible” list and then the bullet had no target. The fix to this was simple, move my ray-cast down a little bit so nothing was in the way of it.

One problem, which wasn’t a bug, was the fact that I couldn’t choose who to target when I was to attack. This meant that whenever I decided to attack, the program would somehow choose the second enemy out of a list of three which was weird to me as I would have thought it would choose the last enemy in the list. The fix was simple, I incorporated a drop-down list which would contain a list of visible enemies so the player would be able to choose which enemy they want to attack.

The other 20% of bugs inside my path-finding code. I built an A* path-finding folder which contained everything necessary for a 2D grid-based game. However, the bug meant that the enemy and player could move onto the same tile as the opposing character. For example, one of my enemies (Sid) was able to move onto the players tile and vice versa. I couldn’t find a fix for this so unfortunately I had to rip out my A* path-finding and I looked for help online on how to make it better. That’s when I came along Sebastian Lague on GitHub and YouTube. He has videos that help make an amazing A* path-finding class. But the problem still remained even with this new code.

Eventually I was able to fix it with one if statement to say “If the next waypoint is the player/enemy, do not move” and hey presto it works! However, a new problem arose. The enemies can now move and if they stop thanks to the new if statement, they take it upon themselves to have another turn and attack the player as they would be in range for an attack. There is a fix that is currently ongoing, but it may take some time.

 

Time for some good news!

Once this bug is patched, I will need to add a few aesthetics and then I will be up and running for my first testing session. This will contain a simple one-sided questionnaire which people will fill out after they have had a thorough play of the game or until they have had enough time playing it.

If anyone would like to test it when it is ready, drop me an email and I will send it to you with the questionnaire and all feedback will go into the game.

 

Thanks for reading as always 🙂

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s