<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 7 February 2018 at 14:23, Ralph Versteegen <span dir="ltr"><<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div>I actually already started rewriting cursor movement yesterday, but didn't finish. I haven't really nailed it down yet, but can just make a first pass at it and then we can tune it.<br></div>My ideas a fairly similar to yours, except that instead of an iterative search for a slice that matches a certain criterion, I just assign each a score (metric) and pick the one with the best score, like it's already done.</div><div>When using a metric, it's useful to think about the isolines: the lines along which different slice positions would have equal goodnesses.I'm <br></div></div></div></div></div></div></div></div></div></blockquote><div><br></div><div>I experimented a bit with some alternatives, and selecting planks which are sharply off to the side but close to the previous plank was a constant problem. Which makes the battle cursor logic seem quite sensible (although I didn't copy it over to plankmenu and try it). I would actually be easy to adapt it to rectangular planks; I found just using the point on the edge of the plank facing the previous cursor position and closest to the previous cursor works pretty well most of the time - in other words, reducing all other planks to single points.<br></div><div><br></div><div>I think the isolines we want are something like these:</div><div><br></div><div><img src="cid:ii_jdd8nr340_16170eac4b3762bd" width="566" height="354"><br>​</div><div>This is similar to what you said about checking for planks within a rectangle or within a cone.<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div></div><div><br></div>BTW, I rewrote how cursor movement in battles worked, a number of years ago (battle_target_arrows). I used something very similar for that, except that the sizes of enemies are completely ignored. We weren't totally happy with how that worked out because the cursors might skip over a target. But I wrote it in such a way that (I believe) it's impossible for there to be unreachable enemies. However, it's still possible that you can't select an enemy from one direction and have to loop around from behind.<br></div>It works like this:<br></div>-Find all targets within a 90 degree cone from the current<br></div>-Pick the one in the cone with the smallest distance along the 'move' axis<br></div>-If none, pick the target that's on the right side of the target with the smallest angle to the 'move' axis (will be more than 45 degrees)</div><div><br></div><div>But for grid-like arrangements, using a 90 degree cone like that is definitely going to have bad results.<br></div><br></div>However, when you take sizes into account, it may be impossible to avoid unreachable slices. Rather than autodetecting such placements it might be easier to just let people test out their menus directly with a test mode in the slice editor.</div><div><br></div><div>We could maybe replace the battle cursor movement with a plankmenu if it
 works alright or better than the existing, by just ignoring the enemy sizes to avoid the unreacble problem. The only thing needed is to special case spread attack 
selection, which happens when you press left/right and there are no more
 enemies.</div><div><br></div>Regarding diagonal movement, I could do that. Problem is that you usually don't press both directions at the same moment, so I doubt it will be very useful. (But the keys will fire together thereafter).<br>In fact I bought a USB adaptor for my old PSX controllers a few days ago, so now I can even try out an analog joystick, and possibly allow moving at arbitrary angles!<div><div class="h5"><br><div><div><div><div><div><div><div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 7 February 2018 at 05:25, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Tue, Feb 6, 2018 at 8:22 AM, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div>I think the only good thing about the current method is that it should be impossible to have any unreachable plank, but its other glaring flaws outweigh that by a great deal.<br><br></div></div></blockquote><div><br></div></span><div>Thinking about that more, I think my logic is probably wrong on that too. ;)<br><br></div><div>The current method sucks no matter how you slice it! (pun intended)<br></div><div><br>---<br></div><div>James<br></div><span> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div><div class="m_4618864170811268530m_787017218727417567m_-480086589580813378m_4810137557670838691HOEnZb"><div class="m_4618864170811268530m_787017218727417567m_-480086589580813378m_4810137557670838691h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 6, 2018 at 6:45 AM,  <span dir="ltr"><<a href="mailto:subversion@hamsterrepublic.com" target="_blank">subversion@hamsterrepublic.co<wbr>m</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">teeemcee<br>
2018-02-06 06:45:13 -0800 (Tue, 06 Feb 2018)<br>
90<br>
Add a screen for testing plankmenu cursor movement to the spam menu<br>
<br>
...it sure is broken!<br>
---<br>
U   wip/custom.bas<br>
______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
</blockquote></div><br></div>
</div></div></blockquote></span></div><br></div></div>
<br>______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
<br></blockquote></div><br></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br></div></div>