Print Page | Close Window

Town view magnifying glass: redundant?

Printed From: Illyriad
Category: Miscellaneous
Forum Name: Implemented
Forum Description: Suggestions which have been implemented or resolved.
URL: http://forum.illyriad.co.uk/forum_posts.asp?TID=417
Printed Date: 17 Apr 2022 at 09:18
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Town view magnifying glass: redundant?
Posted By: Laccy
Subject: Town view magnifying glass: redundant?
Date Posted: 26 Apr 2010 at 08:57
As the thread title suggests, I find the town-view magnifying glass widget a trifle redundant. Plus, and I admit I have no facts or data to support this, it seems to slow things down a little (my PC is by no means up-to-date, single-core 1.8Ghz AMD). However, even if it were to be shown not to affect performance, the info which the magnifying glass shows is duplicated in the mouseover pop-ups anyway, making the glass (in its current incarnation) er... useless?

I understand that the town graphics are getting a re-work, which is great to hear. It's unclear to me whether the town view interface is also getting some treatment, but it seems to me that just getting rid of the spying implement would de-clutter things nicely.

Just my 2p.
Laccy



Replies:
Posted By: Arya
Date Posted: 26 Apr 2010 at 10:16
Yes the magnifying glass slows down my crappy laptop too, it would be much smoother without it, not that i ever feel it's necessary anyway. :)


Posted By: Alexandra Moldovia
Date Posted: 26 Apr 2010 at 10:23
I like the glass?


Posted By: HonoredMule
Date Posted: 26 Apr 2010 at 11:21
Using Greasemonkey, there are two ways you can fix the zoom.


Try to improve the performance by rewriting the code:

        document.townZoomX = 0;
        document.townZoomY = 0;
        document.townMapNode = document.getElementById("townMap");
        unsafeWindow.mapZoomMove = function(evt) {
            var offsetX = document.all ? evt.offsetX : evt.pageX - document.townMapNode.offsetLeft;
            var offsetY = document.all ? evt.offsetY : evt.pageY - document.townMapNode.offsetTop;
            document.townZoomY = parseInt(offsetY) * 2;
            document.townZoomX = parseInt(offsetX) * 2;
        }
       
        unsafeWindow.mapZoomRefresh = function() {
            var x = document.townZoomX;
            var y = document.townZoomY;
            var ctrl = document.getElementById("mapZoom");
            ctrl.style.top = (-515 - y) + 'px';
            ctrl.style.left = (-32 - x) + 'px';
            ctrl.style.clip = "rect(" + y + "px " + (x + 163) + "px " + (y + 163) + "px " + x + "px)";
        }

        setInterval(unsafeWindow.mapZoomRefresh, 50);


(Increase the number in setInterval to reduce cpu usage at the cost of choppy panning.  If the number is sufficiently large to spare a few cpu cycles, the building borders will at least hover-highlight responsively, so you can tell when you're going to click on the right item without waiting.)


Or simply remove it from the page:

        getNode("/html/body/table[2]/tbody/tr[2]/td/table/tbody/tr[2]/td/div").innerHTML = "";
        unsafeWindow.mapZoomMove = function(evt) { return; }



Your mileage will vary with the first method.  For some, it won't help at all.  What's being attempted by that part of the page and the work required to accomplish it simply isn't reasonable for software rendering in this context.  Coupled with a little code that turns building tooltips into hover displays that popup instantly, I'm quite happy with the removal.

Also, if you're finding Firefox having huge overall performance issues that you never encountered before, this may help.  Illyriad's interface seems to slaughter FF like nothing else that I've seen, and I used to keep scores of tabs open at a time.


Posted By: GM ThunderCat
Date Posted: 27 Apr 2010 at 20:29
HonoredMule, you will be happy to learn that our code has been revised.

More changes will be coming with the gfx refresh - but that will be some time.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net