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

  • 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

  • Healthcare Industry HTML5 Games



NEW DEMOS

  • Vertical Endless Runner Prototype

  • Particle and Sprite Editors in Babylon.js 4.2

  • Song Maker in Google Experiment

  • Phaser 3 Experiment for Drawing Cards

  • HTML5 Game for a Recycling Campaign


ENGINES

  • GDevelop – Free and Easy HTML5 Game Engine

    If you are looking for a free and easy HTML5 game engine, check out GDevelop. This game creator is designed to be used by everyone, with its no-code, open-source, free, …Read more

  • Phaser 3 Game Object Pools Tutorial

    Memory allocation inside update loops often causes framerate problems in real-time gaming. One of the best solutions to this is to use Object Pools in Phaser 3. An Object Pool …Read more

  • Games During The COVID-19 Pandemic

    There so many effective ways to engage your audience with HTML5 games. Here is an example of how to run a game campaign to keep users motivated during difficult times. …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