This is a box2d tutorial.
- Create a dir. Any dir.
- run
git init
in it
git submodule add git://github.com/thinkpixellab/box2d.git box2d
You should now have a box2d
directory with a bunch of fun javascript. Right?
git submodule add git://github.com/thinkpixellab/google-closure-tools.git tools
This adds the python scripts and compiler jar needed to build.mat
svn checkout http://closure-library.googlecode.com/svn/trunk/ closure-library
You'll want to add a .gitignore
file to closure-library
to remove a bunch of stuff you don't want.
.svn
*.html
closure/goog/demos
Let's get a simple html + js file together.
<html>
<head>
<title>Demo!</title>
<script src="code.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
</body>
</html>
alert("Hello, code!");
Do you see an alert? We're good to go!
- We built an HTML5 game -- Agent 8 Ball. We wanted it to have cool physics.
- We took an existing javascript library - Box2d - and made it our own. http://github.com/thinkpixellab/box2d
- We created a demo site - http://box2d.heroku.com/ - and opened the source to it here - http://github.com/thinkpixellab/box2dWeb
- Now we're going to give you a walk through of how to build your own app using Box2d.