Play Now Login Create Account
illyriad
  New Posts New Posts RSS Feed - Town view magnifying glass: redundant?
  FAQ FAQ  Forum Search   Register Register  Login Login

Topic ClosedTown view magnifying glass: redundant?

 Post Reply Post Reply
Author
Laccy View Drop Down
Greenhorn
Greenhorn
Avatar

Joined: 26 Apr 2010
Location: Spain
Status: Offline
Points: 56
Direct Link To This Post Topic: Town view magnifying glass: redundant?
    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
Back to Top
Arya View Drop Down
New Poster
New Poster
Avatar

Joined: 14 Apr 2010
Location: England
Status: Offline
Points: 38
Direct Link To This Post 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. :)
Back to Top
Alexandra Moldovia View Drop Down
New Poster
New Poster


Joined: 19 Apr 2010
Status: Offline
Points: 4
Direct Link To This Post Posted: 26 Apr 2010 at 10:23
I like the glass?
Back to Top
HonoredMule View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 05 Mar 2010
Location: Canada
Status: Offline
Points: 1650
Direct Link To This Post 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.


Edited by HonoredMule - 26 Apr 2010 at 11:30
Back to Top
GM ThunderCat View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 11 Dec 2009
Location: Everywhere
Status: Offline
Points: 2157
Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.