

2D gaming using Processing.js - jwco
http://processingjs.nihongoresources.com/test/PjsGameEngine/docs/tutorial/mario.html

======
silveira
Really good tutorial. I'm saving it before Nintendo takes it down. It would be
nice a version of this tutorial using friendly licensed game assets.

~~~
TheRealPomax
Nintendo generally doesn't care in the slightest if their assets are used for
things like this. In the US and many other jurisdictions Nintendo might care
about this is simply fair use. It's an educational resource without even a
pretense of monetization, and has been up for years. I don't expect to ever
receive a C&D for it.

------
Picard
I started using Respond.js and SignalR to create a little multiplayer game
about a year ago, but lost my steam because there doesn't seem to be much to
go on if you're just casually learning. Maybe I could give this a try, thanks.

------
zwieback
This is very nice. I started teaching my daughter some programming and
although I have mixed feelings about JS this is the kind of tutorial that's at
the right level and everyone loves Mario.

~~~
TheRealPomax
This isn't actually JS, it's Processing, so the idea is that this will work in
the browser by virtue of a library that will run Processing source code in the
browser. If you want to do the programming offline, just hit up
processing.org, download the IDE, download the codebase.pde file on the same
dir as the tutorial's page, and off you go.

~~~
zwieback
Ah, thanks for the clarification. I didn't look at the source closely enough
but now that I look at it again it's becoming clear.

------
ertdfgcb
I noticed that if you walk into a level boundary and hold jump Mario jumps
again before he lands on the ground, allowing him to jump up the wall

------
muhuk
Where do these things come from? LevelLayer, Player, etc... They're not in
Processing.js reference.

~~~
TheRealPomax
there's a codebase this builds on, simply called codebase.pde, in the same dir
as the tutorial.

~~~
muhuk
Got it. Thanks.

It says:

    
    
        For our game, we're going to use a library for writing 2D sprite-based games, using Processing.js.
    

So I got confused.

------
torkable
object oriented JS, gross

~~~
shangxiao
Better not define any functions or arrays then, they're objects and that would
be "gross"

~~~
krick
Actually functions or array being objects internally has nothing to do with
"object-oriented" as style of writing code. Here it is about style, which is
obviously dictated by Processing (and thus Proseccing.js) being ideologically
object-oriented. So, well, yeah, it is quite more object-oriented than
"proper" code in js, although I don't see why it is such a problem for the
person you relply to.

~~~
shangxiao
Well actually it does. Every time you do an someArray.push(val), that's
"object oriented as a style of writing code".

If you're referring to the style in the article (ie the Java code), well
that's classical object oriented.

