Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0009722 [DCSS] Patches tweak always 2015-05-15 16:03 2015-10-02 18:23
Reporter Panacea View Status public  
Assigned To Medar
Priority normal Resolution done  
Status resolved   Product Branch 0.17 ancient branch
Summary 0009722: Eliminating redraws from Autofight / Automagic with invisible_targeting option
Description On Webtiles, the widely used Autofight / Automagic macros can be immensely slow (sometimes in the order of 5 seconds per attack) depending on the number of enemies and items around, because cursor and beam are redrawn as if the user had manually targeted an enemy. This is unnecessary and often makes using those functions slower than manual targeting.

Thus, I added an invisible_targeting option (default false) which gets toggled before and after Auto* commands are processed. What remains is the attack animation itself, which happens instantaneously.

If adding the option is against conventions, do tell me - another way would be adding an "invisible" flag to the direction_chooser and making that accessible in Lua.
Additional Information
Tags No tags attached.
Attached Files ? file icon 0001-Introduce-new-option-invisible_targeting-to-be-used-.patch [^] (4,746 bytes) 2015-05-15 16:03 [Show Content]
? file icon 0001-Allow-disabling-targeter-s-screen-updates-for-proces.patch [^] (4,714 bytes) 2015-09-25 00:07 [Show Content]

- Relationships

-  Notes
neil (administrator)
2015-09-02 16:22

A few concerns:

  1. If crawl.process_keys() raises a Lua error() for whatever reason, we might miss turning the option back on. Probably that could be avoided with a pcall()? Lua isn't my strong point.
  2. I think there is no reason to make this settable from the rc: the "else BOOL_OPTION(invisible_targeting)" in can be eliminated.

I think it might be better to use an extra argument to crawl.process_keys rather than setting something in options.* from Lua. Then the C++-side crawl_process_keys can inspect that parameter and use an unwind_var around Options.invisible_targeting so that it is always restored regardless of flow control. You wouldn't need the entry in then, either.
Medar (developer)
2015-09-25 00:18

Added an another patch, that tries to do things the way neil suggested. Plus stops sending flush_messages to WebTiles server. Not sure about all of it, so not pushing yet.
Medar (developer)
2015-09-29 03:19

Pushed a version of my patch as 0.17-a0-1937-g38f2e49. Without the flush_messages stuff, that didn't make much a sense at all.

Thanks a lot for the patch.
Panacea (reporter)
2015-10-02 18:23

Woah, I didn't expect this to be implemented after such a long time and didn't check my mail on that account any more - sorry for not responding to your concerns. Thanks a lot for making the effort to properly fit this into your framework!

- Issue History
Date Modified Username Field Change
2015-05-15 16:03 Panacea New Issue
2015-05-15 16:03 Panacea File Added: 0001-Introduce-new-option-invisible_targeting-to-be-used-.patch
2015-09-02 16:22 neil Note Added: 0029452
2015-09-25 00:07 Medar File Added: 0001-Allow-disabling-targeter-s-screen-updates-for-proces.patch
2015-09-25 00:18 Medar Note Added: 0029535
2015-09-25 09:51 Medar Issue Monitored: Medar
2015-09-29 03:19 Medar Note Added: 0029552
2015-09-29 03:19 Medar Status new => resolved
2015-09-29 03:19 Medar Fixed in Branch => 0.17 development branch
2015-09-29 03:19 Medar Resolution open => done
2015-09-29 03:19 Medar Assigned To => Medar
2015-10-02 18:23 Panacea Note Added: 0029566

Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker