Tagged Questions
0
votes
2answers
45 views
Converting hexagon grid coordinate system
As I have been building on a RTS game based on hexagon grid built in javascript. I stumbled across a problem regarding the coordinate system. Have been trying to implement a A-star system to find ...
4
votes
5answers
180 views
Implementing vector based movement in a 2d environment
Good evening.
I apologize if the title is a bit vague, I really could not come up with anything better.
I am currently reading a book called the nature of code and as a side project, I am working on ...
0
votes
0answers
50 views
Collision detection issue on 2D game engine with isometric game graphics [duplicate]
Let me first show you an example of issue so you'll see the problem.
http://i.imgur.com/dTxJIN7.jpg
The player object has red colored collision borders. Since I'm using an 2D engine, his head ...
1
vote
1answer
120 views
Mega Man screen scrolling in JavaScript
I'm trying to create screen transitions similar to those found in Mega Man or Legend of Zelda (i.e. the active elements of the first screen are stopped as the screen scrolls in the direction of the ...
1
vote
1answer
189 views
2D js physics engine for HTML4
Is there any engine for Javascript like box2dweb that does not use Canvas? I need to build a game that works in HTML4 browsers.
1
vote
1answer
336 views
PNG image as a level map for 2d game
I've been using a tilemap editor for making levels, but I was wondering if there was a way to use PNG images as the level map, as maps created in tiled editor are graphically uninteresting.
...
6
votes
1answer
307 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 ...
2
votes
2answers
300 views
Making an interactive 2D map
So recently I have been working on a Legend of Zelda: A Link to the Past clone, and I am wondering how I could handle certain map interactions (like cutting grass, lifting rocks, etc).
The way I am ...
3
votes
5answers
515 views
2D Collision detection for Pinball Game
So far in previous games I have used simple 2D collision with boxes then checking at pixel level for a collision.
If making a pinball game in nearly a lot of frames the ball will be in contact with a ...
-1
votes
1answer
575 views
2D Game Dev Resources/Tutorials for Windows (Phone) 8 Development? [closed]
I am really exited about the launch of windows 8, windows phone 8 so I decided to start learning how to develop games for them. I was even more exited when I found out that html, css, javascript can ...
0
votes
3answers
338 views
Can these game be fully coded in html5/javascript?
I mean the mechanics of the game. Would it be possible?
-Pokemon GBA series, rendering the world would be easy, but what about battle mechanics?
-MapleStory, after seen dragonbound.net which is an ...
1
vote
3answers
477 views
What is a currently a good game stack for simple Javascript 2D multiplatform game?
I'm looking for advice from someone can help me avoid common pitfalls in developing light weight, quick-to-market games. Yeah, I've heard of Google ;-), but a trip down Google lane does not beat solid ...
7
votes
2answers
646 views
What is the best way to handle simultaneous collisions in a physics engine?
I'm writing a 2d physics engine in javascript so that I can learn more about physics in video games. I have it working correctly for rigid body collisions, except for if any body collides with two or ...
4
votes
1answer
157 views
What is the optimal way for updating different entities in an engine?
EDIT: half of my question seemed to disappear, but thankfully, it was still in the clipboard.
When I say entities, I mean instantiations of various classes in my engine (example class: ...
5
votes
3answers
607 views
Split a 2D scene in layers or have a z coordinate
I am in the process of writing a 2D game engine, and a dilemma emerged. Let me explain the situation...
I have a Scene class, to which various objects can be added (Drawable, ParticleEmitter, ...
1
vote
1answer
196 views
How to perform efficient 2D picking in HTML5?
I'm currently using an R-Tree for both picking and collision testing. Each entity on screen has a bounding box for collisions and a separate one for picking. Since entities may change position very ...
0
votes
2answers
447 views
Essential 2D engine features
I have decided to make a simple engine for a new game I'm working on, and now, I'm wondering: what are the essential features of a 2D game engine? Or, a game engine in general?
0
votes
1answer
405 views
How to handle animations?
I am coding a simple 2D engine to be used with HTML5. I already have classes such as Picture, Scene, Camera and Renderer, but now I need to work on Animations.
Picture is basocally a wrapper for a ...
-1
votes
0answers
63 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
522 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
282 views
How can I render player movement on a 2d plane efficiently?
I'm prototyping a 2d HTML5 game with similar interaction to Diablo II. (See an older post of mine describing the interaction here: How can I imitate interaction and movement in Diablo II?)
I just got ...
1
vote
2answers
557 views
Matrix rotation of a rectangle to “face” a given point in 2d
Suppose you have a rectangle centered at point (0, 0) and now I want to rotate it such that it is facing the point (100, 100), how would I do this purely with matrix math?
To give some more specifics ...
2
votes
2answers
385 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 ...
0
votes
1answer
237 views
throw a 2D ball facing the target to simulate a 3D like effect
How would you update the state of a 2D object that is thrown forward(with an arc) facing a target to simulate a 3D(depth) like effect?
var ball; //2D ball from a sprite sheet
ball.x = 0;
ball.y = 0;
...
3
votes
1answer
1k views
Optimizing HTML5 canvas transformed drawing in Javascript
I am trying to optimize my HTML5 game engine and have noticed that currently a majority of the time taken in the game loop can be taken when drawing transformed tiles. I think this is because each ...
2
votes
2answers
696 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 ...
7
votes
1answer
574 views
2d, Top-down map with different levels
So, I'm creating a 2d, top down, sprite based (tiled) game, and right now I'm working on maps (well, a map editor at the moment, but it will be creating my maps, so basically the same thing).
The ...
4
votes
2answers
689 views
Calculating the angular direction from velocity
I'm trying to calculate the angular direction of a projectile, knowing it's X and Y velocity I can find the magnitude of its movement, but I'm having a hard time wrapping my mind around getting the ...
7
votes
4answers
793 views
Is a multiplayer game in JavaScript a good idea?
I wanted to make a multiplayer game that runs in the browser, and a friend of mine suggested that I should choose JavaScript as the main language. I already made a lot (registering, logging in, half ...