Search Results
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 |
HTML 5 refers to new web technologies such as high performance JavaScript engines, canvas 2D and WebGL, video and audio tags.
2
votes
Instantiate objects that share same variable
You can use Object.create instead of new to explicitly set the object's prototype. This lets you easily implement the flyweight pattern. You can also set the prototype property of the constructor, t …
8
votes
How do you make money from html5 games (i.e sponsorships)?
As someone who is currently working on a commercial HTML5 game, I can give some possibly helpful insights.
First, HTML5 and gaming is brand new. … One problem is that HTML5/JavaScript is still not quite ready for games. …
4
votes
Accepted
What's the current preferred method for serving/storing game data on html5 games
No browser supports an unlimited amount of storage space (or anywhere close to your 800MB) for arbitrary web apps out of the box, and most are limited to 5MB to 10MB.
The easiest way to explicitly ca …
1
vote
How can I increase framerate, when drawing tiles to a HTML canvas?
Determine the frustrum (range) of your viewport, then use that to only iterate over visible tiles.
For instance, if your viewport can only see rows 14 - 27 and columns 33 - 89, then your rendering lo …
2
votes
Accepted
How to handle animations?
The specific answer depends a lot on your specific needs. Your approach will in general work quite fine. It can potentially be made faster using a texture atlas (aka sprite sheet) depending on how y …
2
votes
Detect mouse click on a bezier curve's neighborhood
https://stackoverflow.com/questions/2742610/closest-point-on-a-cubic-bezier-curve
In particular, The last answer on the page gives this link, which I thought explained it fairly clearly:
http://jazz …
12
votes
Accepted
How to implement AI for fighting game
N-grams are popular here. The basic idea is to keep a list of moves the player has made. You can then, given the last N moves of the player, figure out percentage likelihood of what his next move mi …
1
vote
Architectural advice - websockets javascript/php integration
It is entirely possible to have nodejs and CodeIgniter (or any other web server framework) running at the same time. They do need to be running on different ports, or they need to have a reverse prox …
4
votes
Accepted
Get timing correct with client side prediction
Use a fixed time step to start. Fix Your Timestep
The server/client need to estimate the RTT (round-trip time) of the connection to correct times. The server is receiving commands from the (very re …
2
votes
How do I represent walls in a 2D tile based map?
You can make your grid store the areas between walkable areas. You don't need to store your hero into the map itself, so that doesn't require you to have positions for walkable areas where the hero i …
2
votes
Is there a way to create multi-resolution graphics for game with createjs?
If you're deadset on this approach, though, maybe try the technique at https://stackoverflow.com/questions/2303690/resizing-an-image-in-an-html5-canvas, which involves rendering the image in a smaller …
4
votes
Box2D: Asteroids-Like Spaceship Physics
Box2D is massive overkill for Asteroids.
Without Box2D, assuming you're forcing yourself to use that for some reason, you just need some basic Newtonian physics.
Velocity is your speed in a particul …