Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Site Discussion >> Javascript vs. Flash Client
(Message started by: mistre on May 31st, 2011, 9:13pm)

Title: Javascript vs. Flash Client
Post by mistre on May 31st, 2011, 9:13pm
I recently gave the latest Javascript client another go since Omar voiced in another thread (I can't find it now) that he would like to stop supporting the Flash client at some point.  

There are some things that I prefer with the JS client, but other things that I still like better with Flash Client V1 (V2 is not very good due to the fuzziness of the pieces).

What I like better about Flash V1:

1) The overall layout of the buttons is better layed out and visually appealing.  Most importantly, the send button is much larger making it easier to click in a blitz game.  The player and time info in the JS client is smushed together and quite ugly.
2) I don't like the orange ? in the upper left hand corner in the JS Client that pops up a text box that it is your turn to move after every move.  Is this really needed?
3) Must the F3, C3, F6, and C6 in the traps be seen when playing the game?  This is fine for planning mode, but it is visually distracting otherwise.  At least they could be made smaller.
4) As mentioned before - the blue square problem is an annoyance, but if nothing can be done about it - I can live with it.
5) This is a personal preference, but I don't really see what making the back rows gold and silver really adds to the game and for me it visually detracts from the sharpness and contrast of the board and the pieces.
6) The sounds I will call even (I like both sets - it would be cool to have an option to switch between the two).

I am not sure who created the Javascript client, but any improvements to it would be greatly appreciated if the Flash Client is going to cease to exist.

Thanks,
Mark


Title: Re: Javascript vs. Flash Client
Post by megajester on Jun 1st, 2011, 12:34am
Just by the way, I would like to strongly recommend that whichever client is preferred and developed, the older ones are allowed to remain on the site for the benefit of those using computers that either can't handle JS or where users don't have the admin permission needed to install Flash.

Title: Re: Javascript vs. Flash Client
Post by Eltripas on Jun 1st, 2011, 9:18am
V1 is horrible, slow and the time counter is weird, V2 is the best for me but it doesn't have a game plan, JS is decent but the blue square problem is annoying.

Title: Re: Javascript vs. Flash Client
Post by Swynndla on Jul 8th, 2011, 5:05pm
I have a gaming mouse, and it's really sensitive, and I get the blue squares often and it's such that I can't move unless I do several clicks to get rid of all the blue-ness (the clicks have to be at the side of the board and several clicks, and those clicks the mouse isn't allowed to move at all or the problem gets worse).  I've lost on time a few times when I've had easily enough time (usually) to make a move the the blue squares of death meant I couldn't move.  Other than that, I like the JS version a lot.

Title: Re: Javascript vs. Flash Client
Post by Nazgand on Jul 9th, 2011, 11:17am

on 07/08/11 at 17:05:55, Swynndla wrote:
... and I get the blue squares often and it's such that I can't move unless I do several clicks to get rid of all the blue-ness...

Fixed! Simply add this attribute to the boardspan element.

Code:
style="-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;"

You can do this yourself in most browsers, but I will message omar.
Edit: I must admit I rather like having unselectable squares.
http://img820.imageshack.us/img820/7969/horray.png

Title: Re: Javascript vs. Flash Client
Post by omar on Jul 9th, 2011, 5:17pm
Wow, thanks for posting the solution to this. I've been looking for something like this for a while. You must be a CSS guru.

I've modified the client and it seems to work. Awesome !!!

Title: Re: Javascript vs. Flash Client
Post by Nazgand on Jul 9th, 2011, 11:00pm
The BSoD has been demolished! Viva la revolution! (Blue Squares of Death, though Orange SoD in Ubuntu)

Title: Re: Javascript vs. Flash Client
Post by Hippo on Jul 10th, 2011, 2:57am
WOW, after pressing F5 blue squares disappeared :) ... in chrome, but not in mozilla :( ... but in mozilla the squares are transparent enough...

Title: Re: Javascript vs. Flash Client
Post by rbarreira on Jul 10th, 2011, 4:20am
I confirm what Hippo said, in Firefox 3.6.18 (Linux) I still see the selected squares.

Title: Re: Javascript vs. Flash Client
Post by dree12 on Jul 10th, 2011, 1:39pm
Firefox 3.6 is an outdated browser... I don't think it even supports moz-user-select (that was added in 4.0?). That's like using IE6 and complaining the entire thing glitches...

Title: Re: Javascript vs. Flash Client
Post by rbarreira on Jul 10th, 2011, 2:13pm

on 07/10/11 at 13:39:56, dree12 wrote:
Firefox 3.6 is an outdated browser... I don't think it even supports moz-user-select (that was added in 4.0?). That's like using IE6 and complaining the entire thing glitches...


Yeah except IE6 is about 8 years older than the first release of Firefox 3.6 :P Apparently Ubuntu 10.04 doesn't upgrade beyond 3.6 by default...

Title: Re: Javascript vs. Flash Client
Post by dree12 on Jul 10th, 2011, 3:07pm
4 major versions of IE have been worked on since IE6 (7, 8, 9, 10). In contrast, 5 have been since FF3.6: 4, 5, 6, 7, 8. (These are: FF 5.0 RTM, FF 6.0 Beta 1, FF 7.0 Aurora, FF 8.0 Nightly). Sure the FF version numbers are screwed up, but when you think about it there isn't that much difference.

Title: Re: Javascript vs. Flash Client
Post by rbarreira on Jul 10th, 2011, 3:31pm
This is a pretty silly argument, but let me just say that Firefox 4 shows the same behavior (under Windows in this case). But it came out 4 months ago so I guess it's a dinosaur already :P

Title: Re: Javascript vs. Flash Client
Post by dree12 on Jul 10th, 2011, 4:04pm
Yeah, not working here either. Probably a firefox bug since document.getElementById("boardspan").style.MozUserSelect is "none".

Title: Re: Javascript vs. Flash Client
Post by Nazgand on Jul 10th, 2011, 7:59pm
It does not work in Firefox 5.0 either. Aparrently, it is not an inherited property in Firefox. Try changing the mozilla part:

Code:
function makeUnselectable(node) {
   if (node.style) {
       node.style.MozUserSelect = "none";
   }
   var child = node.firstChild;
   while (child) {
       makeUnselectable(child);
       child = child.nextSibling;
   }
}
makeUnselectable(document.getElementById("boardspan"))

I tested it, and it works.
Edit: any other browsers having problems?

Title: Re: Javascript vs. Flash Client
Post by dree12 on Jul 10th, 2011, 8:42pm

Code:
function makeUnselectable(node) {
   node.style.MozUserSelect = "none";
   var child = node.childNodes;
   for (i=0;i<child.length;i++) {
       if (child[i].style) makeUnselectable(child[i]);
   }
}
if (document.body.style.MozUserSelect) {
   makeUnselectable(document.getElementById("boardspan"))
}

A small improvement for other browsers' sake, and slight optimization. Untested, but should work.
[Edit: grammer]
[Edit2: maybe this will be better:
(in external stylesheet)
Code:
.moznoselect {-moz-user-select: none}

(in script)
Code:
[code]
function makeUnselectable(node) {
   node.className += node.className ? " moznoselect" : "moznoselect";
   var child = node.childNodes;
   for (i=0;i<child.length;i++) {
       if (child[i].style) makeUnselectable(child[i]);
   }
}
if (document.body.style.MozUserSelect) {
   makeUnselectable(document.getElementById("boardspan"))
}
]

Title: Re: Javascript vs. Flash Client
Post by Nazgand on Jul 11th, 2011, 1:05am
Looks Good. Looks Great!

Title: Re: Javascript vs. Flash Client
Post by omar on Jul 17th, 2011, 12:35pm
Using FF 5.0 on Windows 7, I can't get the squares to be selected.

Title: Re: Javascript vs. Flash Client
Post by Nazgand on Jul 18th, 2011, 8:38am
I cleared my entire firefox(5.0) history, and it still looks like this:
http://img191.imageshack.us/img191/9067/ff5before.png
After pressing Ctrl+Shift+K and entering the code I posted, I get this:http://img853.imageshack.us/img853/9576/ff5after.png
I am curious as to why it is working in firefox for you,(perhaps you coded it to work correctly in both firefox and chrome, but after it got stuck in cache you accidentally changed it to a chrome-only fix), but it is not working for everyone. I suppose we could just tell them all to use chrome though.

Edit: I also tested IE9.0, and it doesn't work there either.

Title: Re: Javascript vs. Flash Client
Post by dree12 on Jul 18th, 2011, 5:37pm
It should work fine in IE9, except for the fact that the gameroom window is pushed to quirks mode. Fixing this issue may be a even bigger issue, since it would require doing a lot of modifications. First, <center> is no longer a tag. Second, a <!DOCTYPE > is needed. There are no doubt countless other problems, which arguably could be a problem either with IE9 or the page itself.

Title: Re: Javascript vs. Flash Client
Post by Swynndla on Jul 18th, 2011, 6:29pm
For what it's worth, google-chrome (12.0) on linux works fine (no blue squares) ... but you probably already know that.



Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.