Thursday, March 25, 2010

Durr

Best bug/exploit ever. In crashRun, when you throw a flare or a grenade, you are allowed to select its landing spot. I realized the other day that I was actually bothering to check if there was a clear path to the target square, resulting the player's ability to bank grenades around corners:


######
#
# # ##
# # #
#@#*#
#####

Ie., the player would be able to toss a grenade to the asterisk.

I fixed this by drawing a line (using the Bresenham algorithm) to the target square to make sure there's a clear path. Monsters don't yet interfere with the throw (I guess the player is logging the item) but that's something I need to look at.

Also, the larger issue is that there are two different methods in the game for the throwing and shooting. When you use a grenade or a flare you pick your target square as described, when you fire a gun you must pick a direction, with the consequence that you must fire along a cardinal direction. I kind of like that, because it forces the some tactical maneuvering, but it seems kind of ugly having the two different methods.

Perhaps at some point I'll switch to DoomRL style targeting, though.

No comments:

Post a Comment