Fast and Furious: JavaScript

Fast and Furious: JavaScript

A collection of tips and tricks relating to game development on the web.

The companion code base to the talk can be found here:

http://github.com/KrofDrakula/tomcat

Check out my other game, too:

http://github.com/KrofDrakula/squirts

A9b044960d076e43d18e07f09f7a15c6?s=128

Klemen Slavič

March 06, 2014
Tweet

Transcript

  1. 2.
  2. 6.

  3. 9.
  4. 10.

    • • • ′ = ⋅ ; ′ = ⋅

    • ′ = ⋅ ; h′ = ℎ⋅ •
  5. 11.
  6. 12.
  7. 13.
  8. 16.
  9. 17.
  10. 18.
  11. 19.
  12. 20.
  13. 21.
  14. 24.
  15. 25.
  16. 26.
  17. 27.
  18. 29.
  19. 30.

  20. 31.
  21. 32.
  22. 33.
  23. 34.
  24. 37.

    function Vec2(x, y) { this.x = x; this.y = y;

    } Vec2.prototype.add = function(x, y) { if (x instanceof Vec2) return this.add(x.x, x.y); return new Vec2(this.x + x, this.y + y); };
  25. 38.

    function Vec2(x, y) { this.x = x; this.y = y;

    } Vec2.prototype.add = function(x, y) { if (x instanceof Vec2) return this.add(x.x, x.y); this.x += x; this.y += y; return this; };
  26. 39.
  27. 40.
  28. 41.
  29. 42.
  30. 46.
  31. 47.
  32. 48.
  33. 50.
  34. 51.
  35. 52.
  36. 53.
  37. 54.
  38. 55.
  39. 56.
  40. 57.
  41. 58.
  42. 59.