Blog has moved, searching new blog...

29 September, 2012

mission: infiltrate. Motivation and finally fixing that problem.

Sometimes, if your stuck on a particularly piece of code in a project, it's good to leave it and have a rest from it for a few days (as long as you make yourself come back to it).  For me, when I have a problem that I can't solve, either, by myself or via the Internet, it really affects my motivation, and that has been the reason that I've never finished a game that's more than hangman or a 5 minute diversion.

I've just had one of those problems for more than a week.  I'd been having problems with the enemies 'line of sight' and stopping him seeing the player through walls and solid objects, depending on the angle he was looking.

 If my past habits where to go by, mission: infiltrate would be dead.   I didn't want to touch the problem or even go near the game for ten days.  But, today, I forced myself to sit-down and try and fix the problem.  Well, what I actually did this time was remove ALL of the code that I was having problems with and tried to rewrite the function from scratch (although, it did take me 3 times to get it right).

The feeling I got when I could see and knew that I only had to change one more line of code to get the whole thing to work was fantastic.  "Great, the project is back on!" I said to myself.

What did I do different?
In the past, when I was in a situation like this, I would have just switched off the development environment and not opened it at all this would eventually lead to the death of the project.  

This time, I turned my attention of setting up the basics of my next project after mission: infiltrate, GP Race Manager(as posted about in this blog), that kept me in the programming frame of mind.  Also, I didn't leave the mission: infiltrate project completely closed.  Every day, I'd open it just to remember where I am, and also I've worked on some other areas of the game, that aren't really related to the game-play, such as menu's or adding new objects to the game.


As well as fixing the line of sight problem, I've also added that the screen starts to go red, little by little, when you are hit by bullets.  Also, for the PC version, the right mouse button is now the shoot button, as the shoot button at the bottom of the screen is designed for android touch-screens.  Screenshot:




No comments:

Post a Comment