PDA

View Full Version : Apple's Puzzler Game and Sample Code




MacRumors
Jul 18, 2007, 10:15 PM
http://www.macrumors.com/images/macrumorsthreadlogo.gif (http://www.macrumors.com)

Last week, Apple released (http://developer.apple.com/samplecode/Puzzler/index.html) a sample Web 2.0 game for the iPhone called Puzzler.
"Puzzler" is a fun and interactive game that illustrates the use of web standards and JavaScript for the iPhone.

This application makes advanced usage of mouse-handlers for user-input.

To play the game simply double-click or double-tap on any set of 2 or more balls of the same color that are touching. The balls will disappear and any balls above or to the left of the balls you just eliminated will shift into new positions. The goal is to clear all the balls from the screen.
We've installed it at http://www.macrumors.com/iphone/puzzler/

Article Link (http://www.macrumors.com/iphone/2007/07/18/apples-puzzler-game-and-sample-code/)



psycoswimmer
Jul 18, 2007, 10:28 PM
I just tried it.. it's pretty fun. Can't see it having last appeal for more than 5 minutes at a time though.

WildPalms
Jul 18, 2007, 10:29 PM
I used to play this on an old Motorola phone. Damn addictive!! :D

yayaba
Jul 18, 2007, 10:37 PM
That's an example of "advanced usage"? Really?

Doctor Q
Jul 18, 2007, 11:01 PM
Are there four different colors?

ecks618
Jul 18, 2007, 11:08 PM
So far my best is 4 left..

Wish it was a little faster on edge

Edit: best is now 1 left :-)

tobefirst
Jul 18, 2007, 11:10 PM
Are there four different colors?

Five. Red, Orange, Purple, Teal, and Green.

I just got down to one. Not bad.

mackensteff
Jul 18, 2007, 11:23 PM
I used to be addicted (probably still am) to this game. Still am trying to figure out a system to always win. Do I start left or right, top bottom or middle. Anyway try the original at http://webcenters.netscape.compuserve.com/atplay/block.jsp

Capn_Moho
Jul 18, 2007, 11:32 PM
Nothing cool happens when you win. I'm totally disappointed.

Capn_Moho
Jul 18, 2007, 11:35 PM
I used to be addicted (probably still am) to this game. Still am trying to figure out a system to always win. Do I start left or right, top bottom or middle. Anyway try the original at http://webcenters.netscape.compuserve.com/atplay/block.jsp

I vote for random clicking in the bottom right until the problem is sufficiently reduced that you can discern the best click.

Not every combination has a valid solution.

I wish there was an undo.

Doctor Q
Jul 18, 2007, 11:38 PM
Five. Red, Orange, Purple, Teal, and Green.Bah! I see only four colors, which I'd say were red, dark blue, light blue, and green. That means that what I think is red is red, what I think are dark and light blue are actually purple and teal (or teal and purple), and I think both the orange and green dots are green.

So this game isn't for me! Although even without being able tell orange and green apart, I got it down to 3.

But I'd still like to hear what people's strategies are.

wakka092
Jul 19, 2007, 12:04 AM
The balls turned gray and then dissapeared erratically.. I know JavaScript is capable of much more.. :(

mrat93
Jul 19, 2007, 12:20 AM
Nothing happens at all when you when, nothing.

tobefirst
Jul 19, 2007, 08:15 AM
Nothing happens at all when you when, nothing.

To be fair, this isn't exactly meant to be the best of games...it is just for illustration purposes.

Yankees 4 Life
Jul 19, 2007, 08:55 AM
Nothing happens at all when you when, nothing.

what do you mean?

defeated
Jul 19, 2007, 09:04 AM
web games. lol There were web games, I know, I know, there is no need to "illustrate", just release as much as they can, I bet they will be all the same type.

For iPhone's hardware, its outrageous apple doesn't allow real game to be run at OS level. People, go ahead do some petitions. User's demand is the biggest motivation.

stagi
Jul 19, 2007, 10:29 AM
dosn't work for me for some reason, when i click on the balls they turn gray and just stay there.??

Doctor Q
Jul 19, 2007, 10:56 AM
dosn't work for me for some reason, when i click on the balls they turn gray and just stay there.??Click again. For some reason, it requires two clicks, not one, to remove an adjacent range.

The Stig
Jul 19, 2007, 01:08 PM
is it just me or does that game screw anybody elses fonts up on their PC (I'm at work... not on my mac :'( ahhh) for a couple of minutes? It makes them looks kinda 8 bit.

jTm

Manatee
Jul 19, 2007, 01:37 PM
That's one of my favorite games on my HP iPaq hx4700. I have a more primative version of it on my Treo 700p.

This web-based one seems to work the same way, but geez... wouldn't it make more sense for it to be a stand-alone app on the iPhone, so you don't need a good wireless connection to use it?

matthutch
Jul 19, 2007, 03:09 PM
when i get down to the last few the blocks change colour :(

addictive game though

Edit: I can get down to 1 :(
EDIT 2: OMG I won w000000000t :)

DrMoray
Jul 19, 2007, 03:44 PM
Fun game. Interesting to see Apple's method for the HTML code. Basically what others have said with the line:

<meta name="viewport" content="width=320, user-scalable=no">

Interesting to see that's the right way of doing it.

Bob Knob
Jul 19, 2007, 03:56 PM
I changed it into a black background for my niece's site... looks much better in black. BTW anyone else notice that it is a tad too big for the iPhone, the reset button is partially off the screen when the page loads.

mikeinternet
Jul 19, 2007, 05:18 PM
Nothing cool happens when you win. I'm totally disappointed.

I was just coming on here to whine about the same thing.

Where are the real games?

Doctor Q
Jul 19, 2007, 05:34 PM
I finally beat the game! ... or so I thought. By carefullly thinking ahead, I got it down to a single pair of green dots. :)

But when I clicked them, they didn't turn gray. One must have been orange! :mad:

momo411176
Jul 20, 2007, 01:37 AM
Enjoy guys!

http://idotg.com/iphone/index.php :apple:

KD7IWP
Jul 20, 2007, 04:22 PM
Hmmmm me wonders how many different web sites there will be now. Regular for computers, mobile for cell phones, and now version for iPhone...

SPG
Jul 22, 2007, 12:53 PM
Nothing cool happens when you win. I'm totally disappointed.

Glad I didn't read your post, but I'm still dissappointed.
Fun game for a few minutes. But now I'm done.