Tagged Questions
2
votes
2answers
103 views
Testing HTML5 canvas games on low resource computers
I've made a game in HTML5 & JS and want to test it on varying types of user setups as I've heard it doesn't perform too well on older MacBooks.
How can I accomplish this? I'm thinking of ...
0
votes
0answers
62 views
Aw, Snap! in Google Chrome [closed]
Just wondering if anyone else's experiencing the "Aw, Snap!" bug in Google Chrome.
I'm developing a brand new engine which occasionaly triggers this bug and as far as I know, there's nothing one can ...
1
vote
2answers
145 views
Best way to do “cutscenes” [closed]
I'm curious about the best way to display cutscenes in canvas. When I say cutscene I mean something like a static image fading from one to the other. Would it be best to use a timeout for a certain ...
0
votes
1answer
98 views
Why does my goblin only choose a walk direction once? [closed]
I'm working on a simpe 2d canvas game that has a small goblin sprite who I want to get pathing around the screen.
What I originally tried was a random roll that would choose a direction, the goblin ...
0
votes
2answers
89 views
HTML5 Canvas Parsing image into tileset while preserving transparency
I'm trying to import a Tiled Map Editor JSON file into my HTML5 canvas game but I'm having trouble with separating out the tileset image into separate images while preserving the transparency.
...
0
votes
0answers
54 views
Bouncing objects against the side of the screen
I want to have certain circular objects bounce against all four sides of the screen. After searching a lot on the internet, I found the following formula:
Vout = Vin - ((1+e) *dot(Vnormal, Vin) * ...
0
votes
1answer
138 views
“Painting” elements in html5 canvas
I'm making a game in coffeescript (although for the sake of this problem that's probably not all that relevant) and html5's canvas. It's a game that involves a paint cannon, that fires circular ...
1
vote
2answers
149 views
Bullet entry Point around Player Object
I have a player rotating by the mouse and want the bullets line up with the player's gun. Right now they simply come from the point of the player and shoot in the direction of mouse. I just need the ...
1
vote
2answers
257 views
How can I create and animate 2D skeletons for HTML5 Javascript games? [closed]
I'm trying to make a 2D fighting game in HTML5(somewhat like street fighter). So basically there are two players, one AI and one Human. The players need to have animations for the body movements. ...
1
vote
2answers
129 views
Make perfect constant game animation using javascript
I tried different ways to make constant animations using JavaScript and HTML. The problem is that they are never perfect.
If I want to move a square exactly 5 pixels every 50 miliseconds I would use ...
2
votes
1answer
189 views
Multilayer game HTML5 canvas
I've have a problem with HTML5 canvas and using multiple layers.
I'm using 3 layers. The first layer is where the player and the collision base objects are. And the second and the third layer have ...
5
votes
2answers
231 views
Is using multiple canvas objects a good practice?
We're developing a jump and run game with HTML5 and JavaScript and have to build an own game framework for this. Here we have some difficulties and would like to ask you for some advice:
We have a ...
1
vote
3answers
87 views
Move from point a, to point b, and determine the accuracy
Let's say I have a circle at point a (0,0), and I wish to move it to point b (23,58), whatever, how can I accurately do this with a speed variation if I wanted. (I'm doing this in javascript).
Every ...
0
votes
0answers
57 views
Game not checking for keyboard input?
I have tried to explain as much as I can with commented code also.
Working example: http://www.taffatech.com/Source.js -Code is organised by commenting
html game: ...
-2
votes
1answer
53 views
Error returning a value from a function? [closed]
It tells me the error is on this line:
this.srcX = ShipSrcXPicker(type);
However I cannot see it? I am returning the values from these methods that are being called? Is there something I am missing? ...
0
votes
2answers
116 views
Physics for space game [duplicate]
I am making a space game where you fly a ship.
I am trying to work out the physics for such a game and so far came up with:
var thrust; //between 1 & 100 how much the engines are pushing
var ...
-1
votes
1answer
168 views
View port for my canvas game
I am developing a canvas game, and im struggling to get my head around how i can make a view port so when the character moves the world moves with it.
Unlike traditional 2d maps built with arrays i ...
2
votes
1answer
280 views
JavaScript - 2D Top-down Tile Collision Detection
I am developing a small Top-down Game (Much like the old Zelda Games) and I'm having an issue in terms of Collision detection (The actual theory itself rather than assigning Tiles as solid, etc.)
I ...
6
votes
5answers
607 views
Good technological solutions to build an ascii map and moving characters in a browser (like dwarf fortress)?
I'd like to build a webapp for my game website that involves using text characters to represent animals and people, and have them move around on map squares with independent (server driven) AI.
So ...
-1
votes
2answers
421 views
Moving a sprite towards an x and y coordinate
Given a sprite with an x and y coordinate, how would I move it toward another sprite with an x and y coordinate?
I've already made it face towards the other sprite, and I've made it move towards the ...
0
votes
1answer
648 views
Simple javascript HTML5 canvas start menu
I'm currently looking for a simple and basic start screen for a game using javascript, so basically its the first function that is called and then press play which then goes into the game.
Looked ...
2
votes
2answers
449 views
Receiving keyboard events on a canvas in Javascript
I need to receive keyboard events in a canvas element. Click events are received but key presses aren't.
Here is my code which doesn't handle key events:
var canvasElm = $('canvas');
...
6
votes
3answers
559 views
Basic isometric projection in Javascript
I've been working on porting an old closed source game to Javascript with Canvas and I've come to a slight problem.
Right now, to display the land, I just have a pretty basic loop that just draws the ...
5
votes
1answer
460 views
Canvas animation drops to 30fps every 3-4 seconds
Ok! I solved the problem.
Chapter One - Multiple Canvases
I started to make pong utilizing requestAnimationFrame and I noticed that the ball was stuttering and slowing down every 3-4 seconds. So I ...
0
votes
1answer
218 views
Player movement behind objects
I was playing around on RPG JS and Browser Quest, and the player, when moving, can give the effect of walking behind the trees or houses etc, so the player effectively disappears while it is "behind" ...
-5
votes
2answers
423 views
A* mouse movement javascript top-down game
Im trying to implement a* path finding for my character movement in my game.
The game is written in javaScript along with jQuery in a canvas.
I have read up on A* so i believe i understand what it ...
9
votes
1answer
616 views
How to create 2D shadows
I'd like to create lights and shadows in a 2D environment, like in the image below:
I did several searches but got no results. Do you have any hint?
-1
votes
1answer
228 views
Drawing polygons in 3D
I have recently been working on a 3D engine from scratch, using JavaScript and HTML5. I've successfully created lines (although slightly buggy) and points, but I can't figure out faces. My current ...
3
votes
2answers
750 views
HTML5/JS - Choppy Game Loop
I have been experimenting with HTML5/JS, trying to create a simple game when I hit a wall. My choice of game loop is too choppy to be actually of any use in a game.
I'm trying for a fixed time step ...
-1
votes
2answers
256 views
Remove enemy when bullet hits enemy
For my education I have to make a basic game in HTML5 canvas. The game is a shooter game. When you can move left -> right and space is shoot. When I shoot the bullets will move up. The enemy moves ...