Regarding DOSBox, I think that Joannes meant to use the PC version which allows to tweak the emulated processor speed, to see if a slowdown also occurred in the original engine. But it's irrelevant, since the bug was recently introduced.<div>

<br></div><div>PY<br clear="all">_______________________<br>Pierre-Yves Gérardy, MD<br>Headache Research Unit<br>University of Liege<br>Citadelle Hospital (University dept. of Neurology),<br>Boulevard du XIIe de Ligne, 1<br>

B4000 Liège, Belgium<br>Phone : +32 (0) 4 225 71 41<br>Mobile : +32 (0) 472 543 727<br>Fax : +32 (0) 4 223 88 07<br>Department Secretary : Ms Groven : +32 (0) 4 225 63 91<br>
<br><br><div class="gmail_quote">On Fri, Apr 17, 2009 at 12:06, Neil Millstone <span dir="ltr"><<a href="mailto:neil@millstone.demon.co.uk">neil@millstone.demon.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div class="im"><br>
<br>
Johannes wrote:<br>
> Neil Millstone wrote:<br>
><br>
>> > I've been testing ahead of the release later this month, and have found<br>
>> > issues with Kyrandia 1's pathfinding.  It seems that it can take more<br>
>> > than 10 seconds to find a path from one side of the screen to the other<br>
>> > on the DS.  This makes the game almost unplayable.<br>
>> ><br>
>><br>
><br>
> KYRA's pathfinder is rather simple & stupid. I remember it might search<br>
> through the whole scene borders when calculating a patch. It does so in<br>
> both directions (counter clock wise and clock wise) and if no<br>
> possibility is found it tries to find the nearest accessible point. All<br>
> in all that's *some* positions processed, but 10 seconds sound too much.<br>
> Just for your information, a scene can contain something like 80*60<br>
> positions at maximum, but it shouldn't really try all of them. Did you<br>
> try how fast it is in DOSBox? Since our implementation should be<br>
> identical to the original such a delay should be noticeable in the<br>
> original DOS version too.<br>
><br>
</div>I'm not sure what you mean. I can't run Dosbox on the DS, there's not<br>
enough RAM or CPU on the DS to run Dosbox.<br>
<br>
Also, this code ran fine in previous versions, so I'm not sure why it would be so much slower now.<br>
<div class="im"><br>
<br>
<br>
<br>
> Of course one might think of just implementing a new pathfinder for<br>
> KYRA. I myself don't have the time for that before 0.13.1 and I would<br>
> say it would be too risky to adopt a new one for a minor-release anyway.<br>
> I might look into a new pathfinder after release though.<br>
><br>
</div>I agree, a change like that at this point would be too risky.<br>
<div class="im">><br>
>> > One particular bad case is found on the screen 'Below Brandon's Home'<br>
>> > right near the game's starting point.<br>
>> ><br>
>> > To reproduce this issue:<br>
>> > 1) Start a new game.<br>
>> > 2) Exit the room<br>
>> > 3) Skip the cutscene<br>
>> > 4) Click the bottom of the screen to travel down on the root<br>
>> > 5) You should be in 'Below Brandon's Home'.  On the left side of the<br>
>> > screen there is a root that's slightly lighter than the rest.<br>
>> > Underneath this is a dark patch of grass.  Click this patch of grass and<br>
>> > the DS takes 10 seconds to calculate a route.<br>
>> ><br>
>> > I've tried this on the PC, and there's not even a hitch - but this is<br>
>> > probably to be expected since my PC is many times more powerful than a DS.<br>
>> ><br>
>><br>
><br>
> I can't reproduce that other here either, but I'm not sure which place<br>
> you are talking about exactly. It would be nice if you could supply a<br>
> screenshot with the spot marked. There's some debugging code in the KYRA<br>
> pathfinder which could be enabled to check which positions it searches<br>
> when trying to calculate that path.<br>
><br>
> // Johannes<br>
</div>I don't think you'd notice the slowdown if you're playing on a fast<br>
machine like a modern PC.  The DS is only a 67Mhz ARM9, so is incredibly<br>
slow compared to anything recent ;-)<br>
<br>
I can see some modifications to the pathfinder since the last major release but can't try reverting these because of other changes to the codebase making the old code incompatible with the current engine.<br>
<br>
I'm going to try adjusting compiler optimisation options to help it, as I've switched instruction sets since the last build (in order to get around the growth of the binary) so it's possible this would have made the performance worse. I can optimise just the one file concerned.<br>


<br>
If this doesn't work, is it possible to make the pathfinding less accurate on a #define without breaking the game?  It's also possible that the slowness is down to virtual method calls, or something, where just inlining those would fix it without making any changes to the actual algorithm.  It all depends on how much time I get to look at it before Saturday.<br>


<br>
Failing that, my only other option would be to release without Kyrandia support since it's not playable at the moment.<br>
<br>
Thanks for your help,<br>
<font color="#888888"><br>
- Neil<br>
</font><div><div></div><div class="h5"><br>
<br>
------------------------------------------------------------------------------<br>
Stay on top of everything new and different, both inside and<br>
around Java (TM) technology - register by April 22, and save<br>
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.<br>
300 plus technical and hands-on sessions. Register today.<br>
Use priority code J9JMT32. <a href="http://p.sf.net/sfu/p" target="_blank">http://p.sf.net/sfu/p</a><br>
_______________________________________________<br>
Scummvm-devel mailing list<br>
<a href="mailto:Scummvm-devel@lists.sourceforge.net">Scummvm-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/scummvm-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/scummvm-devel</a><br>
</div></div></blockquote></div><br></div>