
Who needs Flash? Build Flash-like game with scripty2 - milesf
http://mir.aculo.us/tutorials/scripty2-memory/
======
benologist
Eh, as games go I'm not impressed. If you want to impress the guys using Flash
to produce games (like me) you're going to have to make something much better
than that.

Show me something that fits in at Kongregate or ArmorGames, not something that
was probably done in Flash a dozen years ago.

~~~
milesf
Whoops. It seems you missed the point.

~~~
benologist
Half of the point seemed to be to build Flash-like games. That's not a Flash-
like game it's a one page tutorial that's probably been written for every
language in the last 30 years.

The other half was who needs Flash? Until you can show games comparable to
these - <http://www.kongregate.com/top-rated-games> \- with no omissions or
compromises or exceptions, the answer is people who are serious about
producing casual games need Flash.

JavaScript is improving in a lot of areas but "not Flash" is a horribly weak
argument especially when backed by examples such as this. "Not Flash" implies
the platform's actually a problem itself ... consumers, developers and an
enormous portion of the internet don't share that mindset. If you want to win
marketshare against Flash you need to be better in most or all areas, not
almost equivalent in some.

~~~
milesf
It's not about the game. You're still missing the point.

~~~
benologist
If your point isn't the title of your submission then what is it?

~~~
milesf
I'll give you boys a hint. It has something to do with LOC.

~~~
reitzensteinm
How about instead of giving us 'boys' 'a hint', you drop the condescending
bullshit and explain exactly what you mean.

I'm an experienced and successful game developer. Hundreds of millions of
plays. Done very well financially. People sometimes recognize my game on the
street when I'm wearing a company shirt. I think that entitles me to have an
opinion without being treated like an idiot.

~~~
milesf
Sorry guys. I messed up today. I was being condescending. Hope you can forgive
me.

~~~
reitzensteinm
Hey, no hard feelings. I think we're all guilty of that from time to time. I'm
sorry I hit back so hard (I'd erase it now you've appologized but
unfortunately the edit window has lapsed).

------
chime
Keep up the good work guys. I'm loving all the JS/HTML5/CSS games coming out
these days. I made another game this week:

<http://games.zetabee.com/chains>

I hope to make tons more over the next month. I use Raphaeljs and JQuery. The
best part about making games in JS/HTML is that you can pick and choose the
good parts from each platform. It is easier to do rotations in Raphael so I
use its .rotate() function. It is easier to make a navigation menu using ul,
li tags in HTML/CSS so I use that and overlay it on top of the Raphael canvas.
You can even use JQuery to bind events to nodes created by Raphael.

I can easily include images and backgrounds natively and monitor mouse events.
The best part is that the games work in all browsers and iPad/iPhone natively.
Also I don't have to worry about loading native fonts etc. because I can just
use the default browser fonts for most everything. Testing is also very easy
because it's just a single JS file that I work with. I want to create a simple
library for others to use but I don't have much idea on how to go about it. I
don't expect to create something as complex as
<http://www.kesiev.com/akihabara/> but I think having a good framework for
creating browser-based games would help.

~~~
kingsley_20
the mechanic in chains has a lot of potential. the implementation feels solid
too!

------
andybak
If you're going to put 'Who needs Flash' in the title then this is low hanging
fruit. :-)

Has anyone got any examples of more complex games in HTML/JS? I'd be
interested to see how far people can push performance. The only benchmarks I
remember seeing currently put Canvas+JS at a significant disadvantage over
Flash but I'd love to be corrected on that.

~~~
nihilocrat
This is a much better example of games you might actually see on flash
portals, done in HTML5:

<http://www.kesiev.com/akihabara/>

~~~
mcantelon
Impressive how fast and smooth his games are.

~~~
bd
The key to Akihabara performance is small number of actual pixels being
drawn/computed.

Resolution of game's <canvas> is just 320x240 (check "view image" in Firefox)
which is then blown up by browser renderer to 640x480 (in a same way how you
can resize image in CSS).

Thus you get 4x as many pixels and cool retro 8-bit look with a lot of work
done by browser's C++ code instead of much slower JavaScript.

Till we don't have hardware acceleration for <canvas> tag, unfortunately demos
and games are going to be quite limited.

~~~
mcantelon
Thanks for the info!

------
Sindisil
Very nice.

I love the idea of "native" browser games. Sadly, even with the neat new
things coming in HTML5 & CSS3, there will be big things missing.

Highest on my list is decent sound support. Needing to provide both mp3 & ogg
(since different browsers support different sound file formats), suboptimal
support for mixing, and lack of decent programmatic control of panning or
channel volume all stand out as significant deficiencies, especially as
compared to Flash.

Still and all, it's obvious that it's worth pursuing native browser games.
Even without the sound support, there are a fair number of compelling games
that could be done. Users often don't _want_ the sound on in the browser
games, anyway. Still, it makes the split between browser games and stand alone
games wider than it needs to be, IMHO.

------
kd5bjo
When made a game for Ludum Dare last weekend, I decided to see what I could do
with Javascript. It was actually much nicer to work with than the flash work
I've done. You can play it at
<http://labs.haleret.com/ludumdare/ld17/ld17.html> .

~~~
samps
This game is actually fun! Great work and an interesting take of platforming.

------
sshumaker
I think the real news here is the release of Scripty2, the successor to
scriptaculous. Check out this demo: <http://scripty2.com/demos/cards/>

All in 70 lines of Javascript.

------
antidaily
Nice work. Could do without the fancy animation at the end of the game.

~~~
milesf
There's the source :) Remove it and re-release it. Which is, I suppose, the
whole point.

------
doki_pen
Looks like it doesn't use canvas. I would expect that performance will suck
and it won't get any better in the future. Am I wrong?

------
ph0rque
Is there a jQuery-based framework that's similar? I'm aware of GameQuery, is
there anything else?

~~~
madrobby
Disclaimer: I'm the author of the tutorial (and core team member of Prototype,
and the author of scripty2)

You can probably port the ideas and basic functionality very easily to other
frameworks. Prototype or scripty2 don't contain anything specific to games,
however. It's easy to write the interactions required in plain old
JavaScript...

I do like to use Prototype for stuff like this, because it helps clean up the
"logic" code a lot (for example the "avoiding stuck cards bit", section 17 in
the tutorial.

Note that if you like this style of coding, but prefer jQuery, you can use the
Underscore.js library, you might want to look into that.

------
lhorie
Linkbait title much? Comparing a js framework w/ the Flash platform is apples
and oranges. Any decent web dev could port the API over to actionscript.

Also, re: LOC, fwiw, you can do position/dimension .morph()'s w/ zero lines of
code in Flash.

------
kingsley_20
for the real story on why non-flash web games matter, you have to look at ease
of porting to mobile/smartphone/social network platforms. If you could write a
game that had 50% of the richness of a flash game, but worked quite nicely on
(highly monetizable) facebook and could be easily ported to the (highly
monetizable) iphone, is that worth more to you than the richness and
playability on IE?

------
milesf
Here's my version (shameless self-promotion) <http://coderpath.com/game>

~~~
veemjeem
So you're using prototype & scriptaculous to make a game. How is that easier
than flash? How do I do particle effects using scriptaculous? How do I pair it
with background music & sound effects? What if I wanted box2d style physics
and collision detection? What's the proper way to animate a sprite?

jQuery, scriptaculous, prototype, mootools -- all great javascript libraries,
but not very good at game development.

------
tzury
When I read the tittle I thought there is going to be a library built on
canvas with vector graphics capabilities.

thank you, but no.

------
chaostheory
akihabara (<http://www.kesiev.com/akihabara/>) is better.

