A new feature of HTML5, allowing Javascript apps to have a drawing surface in the browser.
0
votes
0answers
16 views
Open source engine for strategy / empire building (Nords-like) [on hold]
I would like to create a game similar to "Nords : heroes of the north".
It's a very popular kind of game (browser and smartphones) where you have a city and a hero.
You then spend "real time" as ...
-1
votes
0answers
22 views
How do I detect collisions between two enemies of the same array [closed]
I understand how to detect collisions of enemies in two different arrays, but what do I do if they are both in the same array?
2
votes
1answer
23 views
Unity: UI following scene object lags or jumps
I have a 3D plane with "enemies", each one has it's canvas with a health bar, that follows the enemy position. When the enemy rotates, the health bar position gets laggy and jittery (you see no ...
1
vote
2answers
35 views
MobileSingleStickControl Elements Disabled Unity
I cloned my Unity project on other system. Elements attached to canvas(a prefab) are disabled and when I select an element in inspector, for example Background (shown in screenshot) it is showing ...
-1
votes
1answer
27 views
How to detect collisions of objects in two different arrays?(html canvas)
I am making a canvas game where you shoot at an endless amount of enemies. My problem is that the I am not sure how to make the objects from the bullets array collide with those of the enemy array. ...
-2
votes
2answers
49 views
Center of Image whose height, width and position are known
I have been struggling to find the center of an image(rectangle). I have following data with me:
width: w,
height: h,
position: (x,y)
My image is an object on canvas. I am using KonvaJS framework. ...
3
votes
1answer
17 views
Javascript canvas rotating single sprite instead of entire context
I am trying to recreate asteroids, but I need the ship to rotate based on user input. I have w,a,s,d keys set to change the [pos] of the ship by 1 in the corresponding direction, but now, I need to ...
0
votes
0answers
18 views
How Do I Create A Ga Sprite From An HTML5 Canvas?
I am attempting to develop a method of procedurally generating images for a game that I am making with Ga. The actual generation is not relevant here; my question is how do I turn an image on an HTML5 ...
0
votes
0answers
32 views
Move UI element towards direction it is facing
I have a text element which is rotated by some degrees. I want to move that towards the direction it is facing by some units in code.
This is what it looks like:
I want to move it a few units ...
1
vote
2answers
60 views
Object have the same “speed” all time JavaScript
I try to create a 2D game with a big map and multiple objects. The player is always in the middle of the screen and all the other objects is moving around so it feels like a big map.
I want the ...
2
votes
1answer
68 views
Dealing With Multiple requestAnimationFrame Calls
I am having issues with requestAnimationFrame calls stacking on top of each other. I am developing a platformer game, which has three separate functions that need animating (main menu, cutscene, in ...
2
votes
0answers
27 views
FillRecatangle set Opacity?
I have a game with "hud" which is drawn by fillrectangle.
How would I fade these fillrectangles when the player is on the "hud"?
0
votes
0answers
73 views
How to maximum height and body to move in projectile motion( on Canvas)
**Really.anybody Know't this question's Answer? **
I asked this question before, but I think I worded it badly and thus did not get any response. I am trying to use an projectile motion in my game. ...
0
votes
1answer
83 views
canvas screen space camera rotation issue
I have a canvas on a camera set to it's screen space (not as a child of the camera)
I have my camera rotate on the y and x axises but whenever I move it on the x axis (up and down) the canvas doesn't ...
1
vote
3answers
101 views
Limit access to socket end point
I'm developing a multiplayer canvas game based on socket.io and box2d physics engine. Is there a way to limit connections to my socket endpoint and only allow connections from a specific domain?
...
0
votes
0answers
41 views
Detecting collision of multiple moving objects
I have wrote a simple game that has a 100 balls bouncing off the borders of the canvas. Each ball is an instance of ball class function that has the following definition:
var cnv = document....
1
vote
1answer
46 views
World Space canvas rendering in front of line mesh
I'm attempting to attach a pointer to my steamvr controller to simplify world interactions. I'm very new to unity, but found a nice volumetric line asset (VolumetricLines) that aesthetically is ...
0
votes
1answer
61 views
js canvas tiled map - for loop, while, or matrix
I am making a top-down view tiled map in canvas, where player is always in the middle of the screen, and map scrolls depending on where you go, like in moba games. I also want it to loop infinitely in ...
-1
votes
1answer
81 views
How to fill a canvas with triangles that are seemingly random?
Given a canvas say, 1000 X 1000 unit. I would like to fill the canvas with triangles. The triangles can be of any type right angle, equilateral...etc. To avoid big chunks of triangles lets say all ...
1
vote
1answer
59 views
Simulating elastic ball collisions quickly escalates to disaster
I'm trying to learn HTML canvas and was working on a basic physical simulation, where a number of balls are drawn and set in motion, and the program simulates them colliding and bouncing off the walls ...
1
vote
0answers
83 views
Pixel by pixel collision detection pinball
I'm currently working on a Pinball game using the HTML5 Canvas and JavaScript. Right now I'm getting a hard time with the pixel by pixel collision, which is fundamental because of the flippers.
Right ...
3
votes
1answer
77 views
SDD Inverse Kinematics with constraints
I have a question regarding my quest on onderstanding IK solvers.
After viewing this movie on YouTube: https://www.youtube.com/watch?v=MvuO9ZHGr6k I started recreating it with JavaScript. Just 2d on ...
1
vote
2answers
70 views
Cannot overlay text?
I'm trying to make text have a fixed position in world space and be overlayed in screen space at the same time.
I have text in canvas with "Screen Space - Overlay" which covers my text located in ...
1
vote
2answers
107 views
Canvas slowly degrades in performance after a while
I was creating a simple game and was shocked to see how the performance started to degrade. It never happened to me before, most probably because I use images and not the context drawings. So I used ...
1
vote
0answers
33 views
How to fix my physics functions so they perform at the same speed across different FPS's
My jump function looks like -
self.jump = function(){
//do the initial jump
if (self.pressingUp && self.onGround) {
//this just gets it off the ...
1
vote
1answer
98 views
Fastest way to render isometric world with moving entities?
I've got an isometric diamond-shaped world.
The world consists of isometric planes like rooms. The walls and floors of the rooms and all obstacles and items in the rooms are isometric entities.
So I ...
0
votes
1answer
27 views
Canvas/Paint Mechanic
I am currently working on an idea for a unity game app with a canvas mechanic. I understand I may have to use particles for the brush/paint f/x however I can not think of a way to add collision ...
0
votes
0answers
11 views
Clicking an entity with transformation
I am trying to understand how best to implement a click detection function in a 2d JavaScript game.
I can demonstrate using a simple example of two square 'entities' which can be selected when ...
0
votes
1answer
75 views
Unity3d multiplayer canvas
so I am making multiplayer game and I stuck on one thing, I have blood overlay canvas in my scene(you know, in fps games if somebody shoots you your screen becomes red and this stuff), and when I ...
0
votes
2answers
98 views
How to improve my graphics on HTML5 canvas?
I am making my own army fighting simulator. Designer have made an 3D model with Blender and textured it, made animations. I have made sprites from that model and did programming. But the result is not ...
0
votes
0answers
14 views
Move ball through a direction angle in android canvas [duplicate]
I am building a simple game in android.
I am successful in first step where I draw a ball in canvas in touch point.
Now I am trying to move it from an initial point A (center) through the touch point ...
1
vote
2answers
57 views
Updating code to include states
The Problem
I am having a problem in that I am finding it hard to understand how to update my current code so that it uses states. I am creating a game, the game has a menu, each page in the game ...
0
votes
0answers
55 views
Chrome Canvas bug on Mac OS X when switching spaces?
I have a simple Breakout clone created using the <canvas> element and the 2d context.
Whilst playing the game in Google Chrome (version: 49.0.2623.87 (64-bit)) if I switch spaces within Mac OS ...
0
votes
2answers
280 views
How can I move an object around a canvas in a random direction at random times?
I am currently trying to move an object (circle ball) around the canvas in a random direction.
I have already written the code for the wall collisions so the ball bounces back into canvas when the ...
1
vote
1answer
100 views
How should I efficiently clear and redraw my canvas with lots of animated sprites?
My current solution is to clear the entire canvas and redraw all sprites on every requestFrame(). This works but feels inefficient:
I only need to clear the part of the canvas made invalid by ...
0
votes
1answer
15 views
Mousedown event not performing drawImage
I've been working on the basic gameplay. I'm to a point where I think it should draw a card in the quadrant clicked/tapped, but nothing is happening. I can't see what's wrong. Please help. My only ...
0
votes
1answer
47 views
Why are my canvas drawings larger than the actual image?
For the following page source, I've finally gotten a grip on rendering the cards. I'm puzzled why they appear about 2.5x larger on the canvas.
<html>
<head>
<style>
...
0
votes
1answer
58 views
How to display a lot of small objects using WebGL?
Introduction
The game scene contains a lot of 10x10 pixel elements: for 1980x1200 px. screen the number of elements on the scene can vary from 0 to 23760 (elements cannot intersect).
The live ...
0
votes
1answer
33 views
HTML Canvas Makes Everything Bolder On Right Side
For some strange and sudden reason, my canvas seems to make lines thicker and darker on the right ~1/4-ish. I have tried multiple browsers and different computers and they all have the same rendering ...
1
vote
1answer
45 views
how to follow(center) a box inside canvas element
If inside a canvas I draw a box, and the I add arrows to move it, the box will eventually be out of my reach since it goes out the border and I cant see it. How could I follow the box so that it is ...
4
votes
1answer
121 views
Fixed Time Step Flutter
I've seen a lot of questions about this problem, but really no solution. Hopefully I can explain the issue well enough that I can get some sort of closure on this problem.
I'm using a Fixed Time ...
0
votes
0answers
105 views
Using canvas graphics instead of traditional sprites in phaser
I'm trying to learn Phaser (total beginner with mild JS experience) and I'm following tutorials and such where everything is using sprites. I'm trying to get by with basic canvas shapes instead of ...
0
votes
0answers
89 views
How to get the angle an object is travelling at
I'm trying to figure out how to get the angle an object is moving at, but have ran into a few problems. My player object is moved by rotating the entity left and right by using the left and right ...
3
votes
0answers
79 views
Check if a point is touching a user drawn curve in HTML5 canvas
I am having trouble detecting whether a ball is colliding with a red curve. The curve below is an example of what a user may draw on to the canvas. I can't think of any fast ways to detect collision ...
1
vote
0answers
93 views
Drawing a hexgrid on a canvas, yet making it zoom/scrollable?
I'm developing a game in JS / PHP. The game is basically a 2D plane (hexgrid) where each hex represents a location in space.
In total, I'm drawing 25 * 25 hexes on a 1000x1000 canvas. I also draw ...
2
votes
1answer
56 views
Best practice/way for client to speak with server
I'm making a multiplayer game in HTML5 Canvas and Node using Express and Socket.io. It's a platformer style game and so far the players are able to see each other and move around on the screen. It ...
1
vote
1answer
59 views
Javascript canvas check if all recs on the screen overlap a new one
So I know the AABB collision detection formula, however, this code does not work. Whenever I press space, a new square pops up. But this new square can spawn inside another, something that I do not ...
1
vote
0answers
57 views
Facebook Canvas (web) Game for Desktop & Mobile Browsers
as the title suggests - I am about to develop a game for FB canvas.
Will the game support mobile and desktop or do I have to create two different project/game setups for this?
thanks
1
vote
1answer
167 views
How do I check if one square is overlapping another in HTML5 canvas
I have a little program that goes like this:
Whenever somebody presses space, a blue square appears. The blue square shouldn't overlap with any other blue square.
But the function that is checking ...
5
votes
2answers
143 views
Create.js CPU High load
I'm new in Create.js and I'm trying to make countdown progress bar.
I have this simple code:
var stage = new createjs.Stage("timerCanvas");
stage.canvas.width = document.getElementById('...