Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 17859

"JavaScript (sometimes abbreviated JS) is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles." From Wikipedia. http://en.wikipedia.org/wiki/JavaScript

10 votes

HTML5 game obfuscation

If you want to protect your source, don't write it in HTML/Javascript? Part of the really nice things about the web as it's all human-readable. This makes it an excellent learning resource. … If you use a cipher or translate it somehow, at some point you have to translate it back into javascript (and the code to translate it back needs to be in your source too!). …
Matt Kemp's user avatar
  • 1,483
1 vote
Accepted

Tilting a platform on its axis?

I'm assuming here you're using <canvas>: You can use the rotate function on the context to rotate any drawing functions. Draw the tiles with offsets around the centre, then post-translate them. Confu …
Matt Kemp's user avatar
  • 1,483
3 votes

Managing text-maps in a 2D array on to be painted on HTML5 Canvas

This page shows you how to do it with a simple javascript function: var renderToCanvas = function (width, height, renderFunction) { var buffer = document.createElement('canvas'); buffer.width = width …
Matt Kemp's user avatar
  • 1,483
7 votes
Accepted

How do I calculate consistent frame timings at 60fps?

var ms = 17 // this frame's step var step = (1/60) * 1000 // this is your desired step var dt = ((ms / step)|0)*step // calculate number of 'steps' in ms, truncate it to an int, multiply by step Thi …
Matt Kemp's user avatar
  • 1,483