HTML5 Game Development
   
  • HOME
  • News
  • Tutorials
  • Engines
  • Demos
  • Tools
  • Partners
  • Mobile HTML Game
  • Guess The Celebrity
  • About us

Pong Game with SVG.js

We were recently introduced to SVG.js, a library for manipulating and animating SVG (Scalable Vector Graphics). The library boasts of having no dependencies and aims to be the leanest of its kind, doing the same things that Snap.svg and Raphael can do, but with half the amount of code.

To highlight some aspects of the  SVG.js library, its creators have given us a neat tutorial on how to make a Pong game within their framework. Look how short the code is for drawing two paddles with different colors:

Pong with SVGjs - coding the paddles

This version of the classic arcade game has some cool effects.

For example, the ball changes its color into that of the opponent while moving towards the other side.

Pong with SVGjs - color blast

Also, there is a huge color blast when the opponent fails to hit the ball back.

You can try the game yourself here.

Check out the tutorial here.

Share List

You might also find this interesting:


  1. HTML5 Game Development Facebook, Twitter and G+ The official HTML5GameDevelopment.org Facebook page up at: http://www.facebook.com/Html5GameDevelopment The official HTML5GameDevelopment.org Twitter account is at: https://twitter.com/#!/gamedevhtml5 The Google Plus page is up at: https://plus.google.com/b/106608051085232600929/ All are updated automatically via the...

  2. Atari Opens up Development Kit for HTML5 Atari Arcade Atari arcade, the Microsoft sponsored HTML5 re-imagining of Atari’s classic catalog, is opening up it’s development platform: Supported by Internet Explorer and Atari, the new Atari Arcade is a browser-based...

  3. CodePlayer Tutorial: Make a snake game using HTML5 and jQuery The folks over at TheCodePlayer.com have written an interactive coding tutorial that walks you through the code for making a snake-game in HTML5. The tutorial walks you through the code...

  4. Ascii Fluid Designer Nick Kwiatek posted a innovative combination of Fluid Dynamics and Ascii Art. Creative JS has some more notes. Share List...

  5. Funky Microsoft Sponsored Japanese SVG Animation A wacky SVG animation created to show off the SVG animation capabilities of IE9 (but works fine in Chrome as well) – cool, rescalable stuff Share List...

Pong, SVG, SVG.js
HTML5 Demos, HTML5 Game Dev Tutorials, HTML5 Tools

License HTML5 Games

Are you a company looking to license HTML5 games? We recommend MarketJS.com, a B2B platform for licensing games.

MarketJS has over 300 HTML5 games for licensing. They also provide additional services such as game reskin, custom development, and white label portals.

Html5 Game Development


Follow @GameDevHTML5



WHAT’S NEW

  • GPT3 Voting Board

  • Game Localization For Food Delivery App

  • HTML5 Games in Guest Room Tablets

  • What’s New in Phaser 3.50

  • Particle and Sprite Editors in Babylon.js 4.2



NEW DEMOS

  • Vertical Platformer Games Using GDevelop

  • HTML5 Games for HR Technology

  • Building Vertical Platformer Games using Kaboom

  • Vertical Endless Runner Prototype

  • Particle and Sprite Editors in Babylon.js 4.2


ENGINES

  • Modd.io – User-Friendly HTML5 Game Engine

    Here is another user-friendly HTML5 game engine for your next gaming project. Modd.io game editor uses a sandbox approach in building HTML5 games. No coding is required. Choose from several …Read more

  • Vertical Platformer Games Using GDevelop

    Last time, we introduced GDevelop as a viable option for no-code game engines. Now, let’s try building vertical platformer games using GDevelop. GDevelop comes with two behaviors to build platformer …Read more

  • Best Practices in Building HTML5 Games

    As the saying goes, “Quality is always the result of intelligent effort.” This timeless quote by John Ruskin summarizes most of the best practices in building HTML5 games by today’s …Read more

SEARCH OUR ARCHIVES

CONNECT

rss twitter

HTML5 Game Development is proudly run by 3P Solutions Inc

GOT NEWS?

Send new engines, demos, information and tips to hello@html5gamedevelopment.com

MONTHLY MEETUP

In boston? Join us for the Monthly HTML5 Game Development meetup.

BOOKS

We're in the process of writing a few books about game development. Coming soon!

Copyright HTML5gamedevelopment.com