Tagged Questions
-1
votes
1answer
83 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
123 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
356 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
176 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
403 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
204 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');
...
0
votes
0answers
180 views
What are pros and cons using easelJS library? [closed]
I am new to browser-based game development.I want to build a game that would be hosted on local server or on a system.Not to be on internet..currently..
I am completely new to field of game ...
6
votes
3answers
421 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
297 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
160 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
4answers
368 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 ...
6
votes
1answer
310 views
How to create 2D shadows
Could help about creating lighting and shadows in a 2D environment, like the image below.
http://i.stack.imgur.com/0FEQz.gif
I did several searches but got no results
( ps: sorry my bad english i'm ...
-1
votes
1answer
193 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 ...
2
votes
0answers
456 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
219 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 ...
2
votes
1answer
171 views
Collision detection problems - Javascript/Canvas game
What I want to do:
I simply want the have a 2D array to represent my game map.
I want a player sprite and I want that sprite to be able to move around my map freely using the keyboard and also have ...
-1
votes
1answer
404 views
HTML5 platformer collision detection problem
I'm working on a 2D platformer game, and I'm having a lot of trouble with collision detection. I've looked trough some tutorials, questions asked here and Stackoverflow, but I guess I'm just too dumb ...
0
votes
2answers
355 views
Animating sprites in HTML5 canvas
I'm creating a 2D platformer game with HTML5 canvas and javascript. I'm having a bit of a struggle with animations. Currently I animate by getting preloaded images from an array, and the code is ...
1
vote
3answers
319 views
Issues with shooting in a HTML5 platformer game
I'm coding a 2D sidescroller using only JavaScript and HTML5 canvas, and in my game I have two problems with shooting:
1) Player shoots continous stream of bullets. I want that player can shoot only ...
5
votes
1answer
274 views
Jump handling and gravity
I'm new to game development and am looking for some help on improving my jump handling for a simple side scrolling game I've made. I would like to make the jump last longer if the key is held down ...
3
votes
4answers
643 views
What would be a good way to implement/render a 2D tiled map for a browser game?
I've made this little RPG Ruby game I did while learning and now I'd like to make it into a browser game. I've already set up Sinatra framework to serve it, so what I am looking for, before everything ...
3
votes
3answers
588 views
HTML5 game programming style [closed]
I am currently trying learn javascript in form of HTML5 games. Stuff that I've done so far isn't too fancy since I'm still a beginner. My biggest concern so far has been that I don't really know what ...
-4
votes
1answer
306 views
Smooth scrolling a staggered iso map [closed]
I got a staggered iso map that I want to be able to drag scroll with the mouse. I have it almost working but it is a bit glitchy, especially near the borders. Maybe you have an idea how to fix that.
...
-2
votes
2answers
72 views
canvas graphic output doesn't work [closed]
at the moment i'm developing a 3D-Vector-Coordinates-to-2D-Canvas-Calculation.
the code is ready, the canvas too,
but something doesn't work right...
You can find my code at ...
2
votes
1answer
120 views
Repeat a part of spritesheet as background
So I'm trying to repeat a part of my spritesheet as a background (js, canvas).
My code so far:
var canvas = $("#board")[0],
ctx = canvas.getContext("2d"),
sprite = new Image();
...
-2
votes
1answer
342 views
How do I make a simple level system? [closed]
I've been learning programming for a while and things are slow but steady. I only have a couple experiments that look something like a game (JavaScript,HTML5,CANVAS). One of the things I would like to ...
1
vote
3answers
1k views
Slow Firefox Javascript Canvas Performance?
As a followup from a previous post, I have been trying to track down some slowdown I am having when drawing a scene using Javascript and the canvas element. I decided to narrow down my focus to a ...
5
votes
1answer
441 views
Javascript Canvas Drawing Efficiency
I have just recently started some experiments with game development in Javascript/HTML5, and so far it has been going pretty well. I have a simple test scene running with some basic input handling, ...
1
vote
0answers
56 views
How to work with edge Texture
Im not sure if i use the right terms, but im not able to find something to start with.
Im trying to develop a little HTML5 game. I have a ground with a texture and now I want to make a surrounding ...
-2
votes
1answer
225 views
Direction of the bullet - how to have something else than left, right, top, bottom
I'm making a simple shooter game using canvas and javascript. The current code can be seen here.
To know which way I want the bullet to be shot, I simply have a direction property that can have 4 ...
0
votes
2answers
479 views
Calculating angle between two vectors to steer towards a target
I have been trying to implement a path following steering behaviour for AI in a 2D racing game.
I have two vectors:
futurePosition represents the predicted future position given the car's current ...
1
vote
1answer
222 views
Recreating Doodle Jump in Canvas - Platforms spawning out of reach
I have started to recreate Doodle Jump in HTML using Canvas. Here's my current progress. As you can see, if you play it for a few seconds, some platforms will be out of the player's reach. I don't ...
0
votes
1answer
691 views
JavaScript rendering: Canvas or DIV?
I am planning on developing a multiplayer RPG (kinda like RuneScape, but don't worry, with a different gameplay) and i want to do this in the browser. Now before saying things like "A MMORPG is hard ...
0
votes
2answers
360 views
Platformer movement and collisions
I'm working on a platformer but I'm stuck at the player movement and collisions.
Right now I'm not including the grid at all in the movement, but it's time I do it. I've read this article on how to ...
1
vote
1answer
426 views
HTML5 Canvas Depth Sorting
I'm have problem with Isometric. I'm don't know how to name this "problem", but I'm show you some sceen what I get and what I'm need to get.
My code now drawing something like: ...
1
vote
1answer
479 views
Easy way to do gravity in a simple game?
I'm looking for an easy, beginner friendly way to do gravity in a platformer.
I've looked into Box2D tutorials, but they all seem very complicated.
All I want is a class that takes into account if my ...
33
votes
7answers
1k views
Managing text-maps in a 2D array on to be painted on HTML5 Canvas
So, I'm making a HTML5 RPG just for fun. The map is a <canvas> (512px width, 352px height | 16 tiles across, 11 tiles top to bottom). I want to know if there's a more efficient way to paint the ...
2
votes
4answers
2k views
2D Collision in Canvas - Balls Overlapping When Velocity is High
I am doing a simple experiment in canvas using Javascript in which some balls will be thrown on the screen with some initial velocity and then they will bounce on colliding with each other or with the ...
1
vote
2answers
427 views
Multiple setInterval in a HTML5 Canvas game
I'm trying to achieve multiple animations in a game that I am creating using Canvas (it is a simple ping-pong game). This is my first game and I am new to canvas but have created a few experiments ...
0
votes
0answers
119 views
Existent js libs for tileset / map loading and rendering? [closed]
I'm building an rts style overhead tileset game with JavaScript (particularly using Ember.js framework as a base). The map is so large that I'd very much like to be able to load and render the board ...
2
votes
2answers
199 views
how to transform child elements position into a world position
I'm making a 2d space game in Javascript with canvas. In this game there's a bunch of spaceships, positioned in world space, with turrets, positioned relative to their parent ships. These objects also ...
0
votes
1answer
734 views
HTML5 Canvas Tileset Animation
How to do in HTML5 canvas Image animating?
I am have this code now: http://jsfiddle.net/WnjB6/1/
In here I am can add animations something like -> Animation.add('stand', [0, 1, 2, 3, 4, 5]);
But ...
3
votes
3answers
702 views
HTML5 Canvas Game Timer
How to create good timer for HTML5 Canvas games?
I am using RequestAnimationFrame( http://paulirish.com/2011/requestanimationframe-for-smart-animating/ )
But object's move too fast.
Something like ...
7
votes
5answers
378 views
What implications does JIT (javascript/canvas) vs. AOT (Flash) have in terms of browser based game performance?
In my experience, even till this day, I still see more of a visual lag in entity movement / animation in JavaScript (Canvas) based games than I do in Flash based games.
Why is this - what exactly is ...
1
vote
2answers
259 views
Frustum Culling/Only rendering what's viewed by the Camera in HTML5 Canvas?
I coded up a simple 2D Camera for my HTML5 Canvas-Based Game Engine but I noticed the performance wasn't very good. So a lot of people suggested only rendering things that are shown by the camera but ...
3
votes
2answers
145 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 ...
-1
votes
0answers
64 views
ball 2d animation [duplicate]
Possible Duplicate:
canvas ball physics animation
I want to animate ball in html canvas like this.
ctx.beginPath();
ctx.arc(75, 75, 10, 0, Math.PI*2, true);
ctx.closePath();
ctx.fill();
...
3
votes
2answers
530 views
canvas ball physics animation
I want to animate ball in html canvas like this.
ctx.beginPath();
ctx.arc(75, 75, 10, 0, Math.PI*2, true);
ctx.closePath();
ctx.fill();
start position is left top corner and ball's maximum ...
0
votes
1answer
462 views
Converting coordinate systems to/from an isometric game world
I have tried searching and reading for an answer, but the information I could dig up either didn't fit what I need or was in the form akin to "Just multiply the vectors with the inverse matrix of.." ...
0
votes
1answer
470 views
How to display a tile map from a 2D array in JavaScript?
I have stored my map, but the problem I am having is displaying it. My map is 100x100 tiles which are 40x40px.
I have my loop running through the array but I'm having difficulty selecting the portion ...
