PDA

View Full Version : [Feedback] Javascript Solitaire Game



Sembiance
08-06-2007, 01:50 PM
Hello everyone!

I've been working on my first game ever over the past few months. (I don't count the text adventure games I wrote on the Commodore as a kid.)

It's basically just Solitaire, but I wrote it in Javascript.
I know that Solitaire isn't a very original game concept, but I've tried to make the game work in as many browsers as I can and be fun to play with lots of features.

The game is NOT DONE YET, but I would love it if you could take a look at let me know you encounter any bugs
I'd also love any feedback at all that you might have.

The URL is: http://worldofsolitaire.com

Comments are very appreciated! Thanks!

EDIT:
Thought I would post a screenshot:

http://worldofsolitaire.com/screenshot.png

WaveRider
08-06-2007, 03:40 PM
Wow. I'm really impressed by that. I had no idea you could do something like that with javascript.

Nice work.

barrygamer
08-06-2007, 03:53 PM
Works nicely, pretty nifty! Am also amazed javascript can do something like that, but perhaps thats just my preconceived notion of the language (I recall playing a DHTML/javascript version of Lemmings recently).

[Tested on: Mac mini intel, 10.4.8, Opera 9.21]

Sembiance
08-06-2007, 03:57 PM
Thanks both of you for testing it out, and the comments!
I'm glad it worked for both of you.

Some of my friends have mentioned that they wish it loaded faster. I haven't spent any time optimizing speed yet, as it's still in development. However I'm sure there are some places I can improve speed once I decide to tackle that banana.

walkal
08-08-2007, 06:10 PM
Worked well for me in Firefox 2.0, on both Windows XP and Mac OSX. Loading was annoyingly slow, so it's probably good that you're planning to look at it.

In Safari 1.3 on OSX 10.3.9, the game failed to start. The JavaScript console reported the error:


Value undefined (result of expression _stats.hasOwnProperty) is not object.
http://worldofsolitaire.com/js/Stats.js Line: 26

It's not so surprising - Safari seems to have a few quirks in its handling of JavaScript. I had a lot of trouble getting my JS game Chihuahua to work in Safari.

Sembiance
08-08-2007, 06:23 PM
Worked well for me in Firefox 2.0, on both Windows XP and Mac OSX. Loading was annoyingly slow, so it's probably good that you're planning to look at it.

In Safari 1.3 on OSX 10.3.9, the game failed to start. The JavaScript console reported the error:

It's not so surprising - Safari seems to have a few quirks in its handling of JavaScript. I had a lot of trouble getting my JS game Chihuahua to work in Safari.

Thank you very much for the error report. I don't have OS X here at home yet.
I'll be looking at the error message some time tomorrow night. It sounds like an easy one to fix :)

Mr. Sanity
08-09-2007, 08:17 AM
It ran well for me on FireFox 2.x (Win XP), and Firebug didn't report any errors. I've gotta say, you did a good implementation there. Having a modifiable animation speed was a nice touch. :)

So, did you roll this all by hand, or are there any libraries that you used?

stanchat
08-09-2007, 11:38 AM
Pretty nice. It ran in IE 6.0 with no problem. I see you used the Yahoo UI SDK. How was that using. Also how long did it take to make this game?

Sembiance
08-09-2007, 11:41 AM
It ran well for me on FireFox 2.x (Win XP), and Firebug didn't report any errors. I've gotta say, you did a good implementation there. Having a modifiable animation speed was a nice touch. :)

So, did you roll this all by hand, or are there any libraries that you used?


Thanks for the comment!

I used the Yahoo UI library for some of the base Javascript stuff like dragging, animation, etc.
If you look at Solitaire->About World of Solitaire you'll see all the things that made it a possibility :)

matibee
08-09-2007, 02:23 PM
Very slick, looks like a pretty good job to me :) I played quite a few games of klondike turn 3 and was able to break it (see below)!

Comments:

Upon first following your link I was presented with what looked like some badly laid-out html page, it was only when I hit refresh did I see it as you intended (IE6).

Breaking it... after going through the pack and clicking the empty deck space to turn the cards back, if you double click the deck while the animation is playing it's impossible to click the deck again. This was down to my impatience at watching the animation for the millionth time (even though it's pretty quick).

Hope that helps
- Matt

lennard
08-09-2007, 07:59 PM
Solitaire must be one of the original casual games. I don't know why I keep playing it, any monkey can do it, but I just feel compelled to keep going until I beat the darn thing.

Anyhow, it was fun. My chief complaint would be that it was slow to load but otherwise it worked and was fun to play. Nice job.

kay.altos
08-09-2007, 11:49 PM
This is just amazing. I can't believe it's just java script!

After good PR this could be a very popular site!

samnova
08-10-2007, 02:49 AM
A friend of mine have been talking a lot about how fantastic Javascript is and that it can be used to lots of things (games). I have often been 'yeah, sure...'.
He did show me a few examples and also a turn based multi-player game but this Solitaire blows it all away. Maybe not in game play but in over all presentation.

The game worked as it should, the UI is great done with the menus and so forth.

Great work.

-Sam

PS. Checked on XP SP2 with FF 2.0 and with IE 6, no issues at all. Will do a few tests with OSX later.

Sembiance
08-10-2007, 04:33 AM
Very slick, looks like a pretty good job to me :) I played quite a few games of klondike turn 3 and was able to break it (see below)!

Comments:

Upon first following your link I was presented with what looked like some badly laid-out html page, it was only when I hit refresh did I see it as you intended (IE6).

Breaking it... after going through the pack and clicking the empty deck space to turn the cards back, if you double click the deck while the animation is playing it's impossible to click the deck again. This was down to my impatience at watching the animation for the millionth time (even though it's pretty quick).

Hope that helps
- Matt

Thanks for the comments and the bug report :)

The problem with the badly laid-out HTML page should be fixed now (I had a bug attempting to minify the Javascript for quicker loading)

I've put the 'breaking it' report near the top of my to-do list :)

Sembiance
08-10-2007, 04:37 AM
Thanks samnova, lennard and kay.altos for the good comments!

I've been working on improving the speed in which it loads and have already shaved off a few seconds.
Before when you first went to the page it was taking about 8 to 12 seconds to load (if the images are already cached that is).

I've shaved that down quite a bit and now it loads in under 2 seconds up to 6 seconds.
It should also be much faster starting new deals, cutting off about a second there.

I still have more optimization to do, but I wanted to let you all know and thank you again for the comments!!

Comments really help me to keep going :)

walkal
08-10-2007, 06:07 PM
This is just amazing. I can't believe it's just java script!

To find some other ambitious games using JavaScript, check out the links at http://www.ajaxgames.blogspot.com/ and http://mashable.com/2007/08/08/online-games/

Pyabo
08-13-2007, 12:45 PM
The Yahoo UI library is pretty good. I use it myself at the ole day job. Definitely take a look at it if you intend to do anything web-based.

Escapee
08-13-2007, 09:40 PM
It works nicely with IE 7.0. Great work with javascript :)

Game Producer
08-13-2007, 11:09 PM
Hello everyone!

I've been working on my first game ever over the past few months. (I don't count the text adventure games I wrote on the Commodore as a kid.)

It's basically just Solitaire, but I wrote it in Javascript.
I know that Solitaire isn't a very original game concept, but I've tried to make the game work in as many browsers as I can and be fun to play with lots of features.

The game is NOT DONE YET, but I would love it if you could take a look at let me know you encounter any bugs
I'd also love any feedback at all that you might have.

The URL is: http://worldofsolitaire.com

Comments are very appreciated! Thanks!

EDIT:
Thought I would post a screenshot:

http://worldofsolitaire.com/screenshot.png

Amazing! Really good job.

Sembiance
08-15-2007, 01:58 PM
Amazing! Really good job.

Thanks! :)

Sembiance
08-19-2007, 09:00 AM
Just wanted to give everyone an update.
I've added some new things to the game:

A new Card Deck
More satisfying 'You Win!' screen
Enhanced Statistics including pie and line charts:
http://worldofsolitaire.com/newstats.png


I've also improved performance and fixed several bugs in different browsers.
I went through and tested it and found it works great in the following:

Internet Explorer 6
Internet Explorer 7
Firefox 2.x (Linux and Win32)
Opera 9 (Linux and Win32)
Seamonkey 1.14 (Linux)
Safari 3.0.2 (Win32)
Konqueror 3.5.7 (Statistic Charts don't work)


Anyways, just wanted to give everyone an update.

Bernard François
08-20-2007, 04:10 AM
Wow, I didn't know stuff like this was possible using javascript... Is the code to resize the graphics when the window is resized included in that yahoo library, or did you have to write that from scratch?


The game worked fine in opera 9.21 (win32), but there is a scroll bar at the bottom of the options menu.

Do you know how many of your visitors don't have javascript enabled in their browser?


I'm also curious about how long it took to code this...

Sembiance
08-20-2007, 04:13 AM
Wow, I didn't know stuff like this was possible using javascript... Is the code to resize the graphics when the window is resized included in that yahoo library, or did you have to write that from scratch?

I'm also curious about how long it took to code this...

The code to resize the graphics I had to write myself. I gave it a lot of thought before the project started so I wouldn't stumble too much when the coding began.

I have been working on the site for almost 2 months now.