Tuesday, 28 April 2009

Ranged Combat - some thoughts

I originally had planned on releasing the next version of Kharne this week which was going to include fountains, skills and ranged combat. But I've rethinking the ranged combat interface and it is going to need a lot of work, so I think I will just put out an incremental release (0.02b) with fountains, skills and a few bug fixes out this week and reserve ranged combat for the next release after that.

The rethink of the ranged combat interface will bring it much closer to the standard one for roguelikes (with support for mouse-targeting as well). It will also introduce proper ammunition. The ranged combat changes also tie in with a couple of other changes, such as adding mouse-over hints for monsters and items (providing the same information as is displayed in the right-click popup windows).

Since ranged combat is notoriously hard to get right, I'm inviting comments on the following proposed interface. This is something I want to get correct from the off. The amount of code to implement this is not trivial, so I really don't want to have to go back and recode it in the future if I can help it.

You have an inventory slot currently designated as the quivered item(s). This can be either ammunition, or a weapon (e.g. a dagger). If no quivered item is designated, then the first suitable item that is picked up is allocated. Pressing { and } will cycle between any suitable ammunition or weapon in your backpack). You can also select the current quivered item(s) from the inventory screen via the mouse. The current quivered item(s) is displayed on the main screen.


Left-clicking on a monster (in view) will fire the currently selected item at that monster.


Pressing f will bring up a heads-up display overlaid on the current view with all hostile monsters in view highlighted. If you've previously fired at a monster in view, this one will be pre-selected. Pressing TAB will cycle between visible monsters, or monsters can be selected manually by using the cursor keys. { and } will still work for selecting ammunition at this point. Pressing ENTER will fire the item. Missiles/items that do not hit the target will either fall short or fall long and some of them can be picked up again and reused.

If you've previously fired at a monster, and that monster is alive and in view, then pressing F will fire the currently selected item at that monster again.

The best-case keyboard sequence for firing will be thus be f-[ENTER] then F, F, etc. Best-case mouse sequence is left-click, left-click, left-click...


1 comment:

Jotaf said...

Actually, best case would be: left-click, f, f, f... :)

I can't see anything wrong with it, but others who have seen more systems might think differently.