- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
We decided to have some fun and implemented Pong in Service-Now. Yes we cheated a little by using someone else's code. It is also one player. But still fun.
Here is the tutorial we used: http://cssdeck.com/labs/ping-pong-game-tutorial-with-html5-canvas-and-sounds
He conveniently already has the code broken out to make it easy to put into a UI Page.
Steps
- In the left-nav filter, type "ui pages"
- Click on UI Pages, then click New
- For the name, type "pong"
- Copy the HTML from the blog referenced above and paste it into the HTML on the UI Page
- We skipped the CSS he put on the body
- Copy the Javascript from the blog and paste it into the Client Script section of the UI Page
- [Optional] We also changed line 26 and line 27 to a set width and height
- Line 26 was changed to: W = 800,
- Line 27 was changed to: H = 600,
- Save the page and click Try It
- Try going to https://{instance}/service-now.com/nav_to.do?uri=pong.do
We also made some other modifications to the Client Script section to track high scores. We query the user record and write their score to a scores table, then present it at the end of the game.
Maybe someday we'll write a version that let's two help desk techs play against each other
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.