A new feature of HTML5, allowing Javascript apps to have a drawing surface in the browser.
-2
votes
1answer
42 views
Moving Character Based on background
I want to know how can i move the following character just in predefined areas as shown in the bg.jpg file
character
http://s7.postimg.org/ezyaclrrb/walking.gif
bg
...
0
votes
0answers
18 views
How can I draw a small bitmap on a larger bitmap at a particular position? (Canvas / SurfaceView)
I'm building a game that requires additive blending of colours for certain bitmaps.
Say I have 4 different types object, there are maybe ten of each type on the screen with each type having a ...
0
votes
1answer
391 views
Android: Improving surfaceView?
I'm using Surfaceview in my Android app. I have two threads, one for UI and another for rendering and updading the UI.
I am limiting my frames per second to 30 fps and have employed frame-skipping ...
-2
votes
0answers
23 views
Rotate object to face player touch [duplicate]
I need to make my sprite to face where the player have touched.
I tried like this:
public static double FaceObject(RectF position, RectF target)
{
return ...
-1
votes
1answer
77 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 ...
3
votes
4answers
453 views
Why wouldn't one use Canvas for HTML 5 game development?
I'm just getting into the HTML 5 game development. I've discovered that some games seem to be created using just JS/CSS/HTML instead of the canvas.
Since canvas seems to enjoy good browser ...
2
votes
1answer
111 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 ...
2
votes
1answer
69 views
Low FPS on Java drawing in BufferStrategy
I ran into a very strange problem while using BufferStrategy, I've tried searching for an answer but all I have found are non-relevant threads and discussions. So here is my query.
for (int i = 0; i ...
0
votes
0answers
46 views
Listview on Canvas. Nullexception error
I'm developing a game app. I use a MVC that updates and renders animations/text in a canvas.
I need to show/hide a listView like I've done with this appTest:
...
0
votes
0answers
58 views
Android - Rendering HUD View to SurfaceView
I have developed a relatively simple game in android, to get my head around it all, and on the back of it developed a crude game engine (in the loosest sense!). I use a SurfaceView and canvas (no ...
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 ...
6
votes
5answers
352 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
vote
1answer
96 views
Canvas isometric translations to integer coordinates
I'm creating a canvas based game with an isometric playing board. I use the following transformations to get my square tiles to render on the screen:
'applyViewportTransformation' : function() {
...
14
votes
6answers
4k views
Are there any alternative JS ports of Box2D?
I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library.
I ...
-1
votes
2answers
165 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 ...
1
vote
1answer
396 views
How to initialize a BitmapDrawable Android
I have been using a shapeDrawable object for my android games player but now that i want to add some graphics in I have to use something different I was thinking of a BitmapDrawable but as I am new to ...
0
votes
1answer
380 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 ...
0
votes
1answer
197 views
Implementing a camera on HTML5 canvas?
I am trying to work out the best way of implementing a camera in my simple 2d game.
The way it is structured at the moment is my game objects all have draw functions, which are passed a canvas ...
19
votes
7answers
7k views
HTML5 Game (Canvas) - UI Techniques?
I'm in the process of building a JavaScript / HTML5 game (using Canvas) for mobile (Android / iPhone/ WebOS) with PhoneGap. I'm currently trying to design out how the UI and playing board should be ...
2
votes
2answers
199 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');
...
3
votes
2answers
202 views
Client Side Logic vs Server Side Logic for HTML5 Game
I'm writing an HTML5 game that takes place in a single screen and does not have any data that would need to be saved (except for a score). I am writing all of my canvas logic on the front end. because ...
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 ...
0
votes
0answers
174 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 ...
0
votes
1answer
185 views
Game development for android using JQueryMobile or any OpenSource alternative for absolute beginners [closed]
I hope it doesn't really sound odd as this questions is for Game-development for Android Devices for absolute beginers. The reason for me asking is currently I am learning the Native App Development ...
1
vote
1answer
114 views
How to create an array of images on a canvas
I am developing a game that uses different images.When am image is swiped to the bottom of the screen it disappears and a new image appears at the top.Seeing as you can't delete an individual image I ...
6
votes
3answers
405 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 ...
0
votes
2answers
349 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 ...
2
votes
1answer
167 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 ...
0
votes
1answer
159 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
1answer
290 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 ...
2
votes
1answer
116 views
Difference between rotation methods?
My question is in about rotate methods in android.graphics.Camera. In Docs, I saw these comments:
public void rotateX (float deg) Since: API Level 1
Applies a rotation
transform around the X ...
-1
votes
2answers
218 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 ...
-5
votes
4answers
366 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 ...
0
votes
0answers
235 views
Transformation Matrix in Android Canvas?
This question is following up my previous question that I asked it in stackoverflow: Hide a face of a 3D shape behind another,Android canvas?
I have a canvas and I have to get the normal vector of a ...
21
votes
3answers
5k views
Double buffering on HTML5 Canvas game?
My simple canvas game seems to work fine on Chrome and FF on Mac/Linux. I haven't had chance to test it on smart phones or Windows environments yet. It doesn't use double buffering but I have seen ...
6
votes
1answer
305 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
vote
3answers
561 views
Need Guidance Making HTML5 Canvas Game Engine
So I have some free time this winter break and want to build a simple 2d HTML5 canvas game engine. Mostly a physics engine that will dictate the way objects move and interact(collisions, etc). I made ...
-1
votes
1answer
188 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
1answer
452 views
Animating DOM elements vs refreshing a single Canvas
A few years ago, when the HTML Canvas element was still kinda fresh, I wrote a small game in a rather "unusual" way: each game element had its own canvas, and frequently animated elements even had ...
2
votes
0answers
438 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 ...
3
votes
3answers
698 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 ...
0
votes
1answer
192 views
Box2dWeb positioning relative to HTML5 Canvas
I'm new with HTML5 canvas and Box2DWeb and I'm trying to make an Asteroids game. So far I think I'm doing okay, but one thing I'm struggling to comprehend is how positioning works in relation to the ...
-1
votes
1answer
394 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 ...
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();
...
3
votes
4answers
627 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 ...
1
vote
2answers
122 views
Which structures to use for maintaining 2D objects on canvas? How to map clicks to objects?
I need to draw some 2D objects on a canvas. And I need to map the 2D coordinates of clicks to objects.
What is the usual way to maintain a 2D object's size and position (which data structures, ...
1
vote
0answers
166 views
Drawing two orthogonal strings in 3d space in Android Canvas?
I want to draw two strings in canvas. The first string must be rotated around the Y axis, for example 45 degrees. The second string must start at the end of the first string and also it must be ...
1
vote
3answers
315 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 ...
0
votes
0answers
803 views
How To Scale Canvas In Android
I am writing a android game using Canvas as the way to draw everything, the problem is that when i run it on different android phones the canvas dosn't change size i tried using canvas.scale() but ...
2
votes
1answer
166 views
How to shift a vector based on the rotation of another vector?
I’m learning 2D programming, so excuse my approximations, and please, don’t hesitate to correct me. I am just trying to fire a bullet from a player. I’m using HTML canvas (top left origin).
Here is a ...


