Sunday, June 30, 2013

Sneaking progress

New screenshot:



First thing this morning, I've knocked out the difficult / boring / tedious bits:


  • Guard as its own object. When I first wrote the code, I was on a plane, working on a netbook, so I didn't have big monitors to make organizing my code easy. I've finally ripped all of the guard's code out of the main file and into a guard object. Not visible, but important for the next pieces.
  • Multiple guards. Following on the above refactoring, I was able to have more than one guard patrolling the level. The difficulty jumped up substantially.
  • Guard visibility arc. You can see yellow sectors in the screenshot above; that's where the guard can see. Well, the guard can see farther, but just in the indicated direction. Perhaps I'll want to adjust either the display or the visibility calculation This turns the difficulty down, as you can now sneak behind guards and between them.
  • Guard turning speed. Guards now turn at a maximum of one radian per second. I put that number in as a starting point to tune from, but it feels OK.

Next up:

  • Crazy Ivan. My current thinking is that the guard will have a random fuse, and when it expires, he'll turn to a random direction. This won't necessarily be a full turn; perhaps just a small turn to the left or right. If he turns and doesn't see anything, he'll turn back to his patrol route.
  • Smarter / Lazier guard recovery. I'm still thinking about how to get this to feel right. Maybe take the closest waypoint, and look ahead to see if the following points are visible.
  • Game modes. Game over, title screen, and so on.
  • More levels. One cheat I might do is have a single level with different patrol routes or different numbers of guards.


No comments:

Post a Comment