A new feature of HTML5, allowing Javascript apps to have a drawing surface in the browser.
2
votes
1answer
167 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 ...
5
votes
1answer
275 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 ...
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],
...
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 ...
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 ...
3
votes
2answers
148 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 ...
-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.
...
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?
-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 ...
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 ...
3
votes
2answers
2k views
Smooth animation on a persistently refreshing canvas
Yo everyone!
I have been working on an Isometric Tile Game Engine in HTML5/Canvas for a little while now and I have a complete working game. Earlier today I looked back over my code and thought: ...
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, ...
8
votes
2answers
2k 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 ...
4
votes
1answer
590 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, ...
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 ...
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
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 ...
1
vote
2answers
2k views
Rotate canvas along its center based on user touch - Android
I want to rotate the canvas circularly on its center axis based on user touch.
i want to rotate based on center but its rotating based on top left corner .
so i am able to see only 1/4 for rotation ...
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 ...
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 ...
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
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 ...
2
votes
2answers
685 views
Javascript Isometric draw optimization
I'm having trouble with isometric tiles drawing.
At the moment I got an array with the tiles i want to draw.
And it all works fine until i increase the size of the array.
Since I draw ALL tiles on ...
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
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: ...
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. ...
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 ...
13
votes
8answers
4k views
How should I sort images in an isometric game so that they appear in the correct order?
This seems like a rather simple problem but I am having a lot of difficulty with it.
What should I do to properly sort images in an isometric game?
In a normal 2d top-down game one could use the ...
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.
...
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 ...
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 ...
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 ...
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 ...
-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();
...
11
votes
2answers
8k views
Multiplayer HTML5, Node.js, Socket.IO
I trying create simple Multi-player with HTML5 Canvas, JavaScript(too using John Resig simple Inheritance library) and Node.js with Socket.IO.
My client code:
var canvas = ...
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 ...

