Summary
The game we've created here is by far the most complex we've written in this book so far. It could of course be enhanced a lot by adding PvP combat, a chat system, and so on, but this chapter has covered all the basics to allow you to implement those!
However, calling a bunch of files asynchronously is not a very elegant solution, and if you target very recent browsers, you may want to take a look at the WebSocket API that allows you to establish and maintain a bi-directional communication channel between the browser and the server.
Another way to maintain a permanent connection to the server is by using long polling methods.
In the next chapter, we will modify our platformer to integrate with Facebook and Twitter as well as keep a list of high scores!