A new feature of HTML5, allowing Javascript apps to have a drawing surface in the browser.
-1
votes
2answers
88 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
130 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
90 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 ...
2
votes
2answers
125 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
132 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 ...
0
votes
0answers
98 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
107 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 ...
0
votes
1answer
231 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 ...
1
vote
1answer
84 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
333 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 ...
4
votes
1answer
239 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
105 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 ...
0
votes
1answer
122 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
304 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
162 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 ...
6
votes
1answer
262 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
409 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 ...
3
votes
0answers
124 views
Android - Force Close - Null Pointer on Canvas? [closed]
Please bear with me. I have a very odd problem. Basically, my app so far, has 3 activities (a main splash screen, an 'options/menu' screen and the main app).
If I follow the very specific steps ...
-1
votes
1answer
154 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
315 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
200 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
149 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
299 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
320 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
0answers
138 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
2answers
106 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
3answers
264 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
530 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
146 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 ...
4
votes
1answer
206 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 ...
2
votes
4answers
465 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
492 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 ...
2
votes
2answers
117 views
Android Array Lag?
I am making a platform game for Android. It is sort of a tile based game. I added bullets and enemies with AI and a bunch of tile types.
I created a simple map with no Enemies. Everything was running ...
-3
votes
1answer
269 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.
...
0
votes
1answer
175 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 ...
-2
votes
2answers
69 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
108 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();
...
4
votes
1answer
369 views
What's the difference between Canvas and WebGL?
I'm thinking about using CAAT as a part of a HTML5 game engine. One of it's features is the ability to render to Canvas and WebGL without changing anything in the client code. That is a good thing, ...
7
votes
2answers
1k views
Free movement in a tile-based isometric game
Is there a reasonable easy way to implement free movement in a tile-based isometric game? Meaning that the player wouldn't just instantly jump from one tile to another or not be "snapped" to the grid ...
0
votes
0answers
54 views
Faking Display tree (Sprite) parent child relationships with rasters (BitmapData) in ActionScript 3
I am working with Rasters (bitmapData) and blliting (copypixels) in a 2d-game in actionscript 3. I like how you can move a sprite and it moves all it's children, and you can simultaneously move the ...
-2
votes
1answer
278 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 ...
4
votes
1answer
362 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
48 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 ...
1
vote
3answers
405 views
Android, how important is deltaTime?
Im making a game that is getting pretty big and sometimes my thread has to skip a frame, so far I'm not using deltaTime for setting the speed of my different objects in the game because it's still not ...
5
votes
2answers
420 views
android multitouch problem
Im aware that there a a couple of posts on this matter, but Ive tried all of them and none of them gets rid of my problem.
Im starting to get close to the end of my game so I bought a cabel to try it ...
0
votes
1answer
203 views
Why does my health bar disappear whenever my character takes amage?
Im making health bar for my game that looks like this:
public void healthBar(Canvas canvas)
{
float healthScale = happy.getHP() / happy.getMaxHP();
Rect rect = new Rect(20, 20,(120 * ...
3
votes
2answers
369 views
how to solve ArrayList outOfBoundsExeption?
Im getting:
09-02 17:15:39.140: E/AndroidRuntime(533): java.lang.IndexOutOfBoundsException: Invalid index 1, size is 1
09-02 17:15:39.140: E/AndroidRuntime(533): at ...
-2
votes
1answer
199 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
428 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 ...