Tagged Questions
5
votes
4answers
447 views
Is there a way to increase the collision check efficiency of a system of n objects?
I'm making a game that consists of many onscreen objects, one of which is the player. I need to know which objects are colliding every iteration.
I made something like this:
for (o in objects)
{
...
2
votes
2answers
63 views
Deactivate keyboard input on collision
I'm creating an online-canvas-game with a tank as player object.
Now I have several structures in my canvas, that shouldn't be able to be overdriven by the tank...
My solution is to detect the ...
2
votes
2answers
216 views
Collision Detection doesnt work because some things move more than 1px at a time
I'm writing a 2d scrolling game in javascript using canvas and since I'm limited to setInterval running at minimum once every ms, I need to have some objects moving at greater than 1 pixel a second. I ...
2
votes
2answers
383 views
Canvas Rotation collision detection on a sprite
I am using this code to detect collisions between two rectangular sprites.
intersect: function(other) {
return this.x < other.x + other.width && other.x < this.x + this.width ...
2
votes
1answer
668 views
Collision detection between a sprite and rectangle in canvas
I'm building a Javascript + canvas game which is essentially a platformer. I have the player all set up and he's running, jumping and falling, but I'm having trouble with the collision detection ...
1
vote
1answer
145 views
Collision within a poly
For an html5 engine I'm making, for speed I'm using a path poly. I'm having trouble trying to find ways to get collision with the walls of the poly. To make it simple I just have a vector for the ...
1
vote
2answers
424 views
HTML5 collision with images
Can anyone please help me out with a small test game I'm creating. I'm basically creating this game to learn a few things about HTML5 and so far it's all been good. I've been able to create a canvas ...