A new feature of HTML5, allowing Javascript apps to have a drawing surface in the browser.
0
votes
0answers
65 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
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 ...
1
vote
3answers
481 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
526 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
235 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
474 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
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 ...
2
votes
3answers
683 views
Text fields in a java canvas
So I'm trying to have some form of input in my game and I understand all the keyPresses and whatnot but the only issue is I have no idea of adding a textfield to the game. JTextfield doesnt seem to ...
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 ...
1
vote
1answer
411 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
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 ...
0
votes
0answers
389 views
Android Canvas problems with drawing background
I'm trying to make an android and i have got to the stage where im adding in some simple graphics and it gets drawn to the screen fine but it is drawn over the top of everything else here is the code
...
0
votes
3answers
641 views
2D maps, how to structure?
I'm new to this. And I don't really understand 2D tile maps.
The tutorials I've read use arrays, but doesn't this get really difficult to manage when they get big?
And what if I want different ...
1
vote
3answers
2k views
Huge performance difference when using drawImage with IMG vs CANVAS
I put together a couple of simple tests that render an image to a canvas. One renders from an IMG, while the other renders from an offscreen CANVAS. You can see the code and results here: ...
0
votes
1answer
380 views
Z axis in isometric tilemap
I'm experimenting with isometric tile maps in JavaScript and HTML5 Canvas.
I'm storing tile map data in JavaScript 2D array.
// 0 - Grass
// 1 - Dirt
// ...
var mapData = [
[0, 0, 0, 0, 0],
...
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
220 views
How to select an image on the J2ME Canvas
I am working on J2ME. I have got a canvas, with a layout of a Checkers board. At the position of pieces, I have placed images. The point at which I got stuck is, how to select/highlite a piece's image ...
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 ...
5
votes
4answers
939 views
Defining the track in a 2D racing game
I am designing a top-down racing game using canvas (html5) which takes a lot of inspiration from Micro Machines. In MM, cars can move off the track, but they are reset/destroyed if they go too far.
...
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 ...
2
votes
1answer
295 views
HTML5 Canvas fillStyle as numbers not text
When drawing vector graphics in the canvas you set the fillStyle using an rgba string like this...
context.fillStyle = "rgba(255, 223, 191, 1)";
Is it possible to feed in a javascript object ...
-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 ...
5
votes
1answer
718 views
HTML5 Canvas Converting between cartesian and isometric coordinates
I'm having issues wrapping my head around the Cartesian to Isometric coordinate conversion in HTML5 canvas. As I understand it, the process is two fold:
(1) Scale down the y-axis by 0.5, i.e. ...
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 ...
1
vote
2answers
695 views
Is it possible to convert file from Blender 3d to svg?
I want to build web game in html5 with canvas/svg.
Can I convert/export file from blender to canvas/svg?
Maybe via unity3d?
3
votes
1answer
789 views
Canvas tile grid, hover effects, single tilesheet, etc
I'm currently in the process of building both the client and server side of an HTML5, canvas, and WebSocket game.
This is what I have thus far for the client: http://jsfiddle.net/dDmTf/20/
Current ...
1
vote
2answers
563 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 ...
1
vote
2answers
427 views
Creating several instances of the same object, and selecting only one
I'm playing around with making a puzzle game, haven't done that much before I run into my first problem. I want to create a certain amount of the same object/function. But without hardcoding the ...
10
votes
2answers
494 views
Dirty 2D map rendering
I keep hearing people talk about "dirty rendering" when it comes to map rendering for HTML5. I've Googled and searched the GameDev about it but there isn't much about it.
What exactly is it?
How to ...
3
votes
0answers
219 views
Choosing a (browser) game environment [closed]
I apologise in advance if this post is something you've heard a million times already or seems like a trolling attempt. I just want some advice and I'm coming up short with my own Google searches.
...
4
votes
4answers
806 views
Making a startscreen for an HTML5 game?
How would I make a start screen for a game using HTML5 canvas?
I'm not looking for something advanced, just the new game button and highscore link etc. The question might be stupid, but I've never ...
2
votes
2answers
618 views
HTML5 clicking objects in canvas
I have a function in my JS that gets the user's mouse click on the canvas.
Now lets say I have a random shape on my canvas (really its a PNG image which is rectangular) but i don't want to include ...
18
votes
2answers
791 views
My game is just about finished! What do I do now?
I have an HTML5/canvas game just about finished and ready to launch. It's a 2d game in which you explore and disrupt a procedurally-generated landscape, crafting items and structures to survive. I ...
2
votes
2answers
800 views
Drawing isometric map in canvas / javascript
I have a problem with my map design for my tiles.
I set player position which is meant to be the middle tile that the canvas is looking at.
How ever the calculation to put them in x:y pixel location ...