Questions tagged [html-canvas]
A new feature of HTML5, allowing Javascript apps to have a drawing surface in the browser.
395 questions
0
votes
0
answers
60
views
Android canvas clipping rectangle showing on canvas draw call with paint object that has blurmaskfilter and shadowlayer
I created a game using xml and views on Android. Yes, I know it was not the best choice of development for a 2d game. But, my game is turn based, so mostly static. You can test the game out here: ...
1
vote
1
answer
89
views
2D Square Collision Correction issue detecting which direction
I've just started getting into 2D game development and have been experimenting with some 2D collision and correction logic in canvas. I'm trying to debug this block of code and understand why it is ...
1
vote
0
answers
59
views
Develop a dialogue system for a game in html 5 canvas
similar to rpgs with a popup window and text options. like stardew valley. Are there any common approaches to implement this?
0
votes
0
answers
104
views
`textSubImage2D` inconsistent performance
I have a problem when creating a texture with WebGL. The thing that I do not understand is that the first call with texSubImage2D with a canvas leads to the ...
0
votes
1
answer
243
views
Camera movement with player
I'm developing a game using the html5 canvas, but I've never used it before and I'm having difficulty creating a camera. The intention is that it is the same as agar.io, where the player is centered ...
1
vote
1
answer
224
views
Would it be possible to make a Game Genie like program in Javascript?
Game Genie was a tool for the NES that allowed users to input codes that were able to drastically able to change the mechanics of a game by getting CPU reads and replacing the game's response with its ...
0
votes
0
answers
84
views
Handle roads following in a javascript game
In a browser game made in HTML5/Javascript, I would like to handle the move of units in real-time. But units would have to follow some predefined roads...
Canvas seems better than svg to handle ...
0
votes
2
answers
376
views
What is the best way to store level data in HTML5
I am currently making a game in HTML5 using canvas, and it is currently just 1 js script and HTML file with references to png files for assets. Right now, I have the level data baked into the script, ...
0
votes
0
answers
182
views
Unity WebGL Game's Canvas UI scale changes with windows scale
So this is the setting that is affecting my game. My game is a webgl build from unity running in chrome, hosted on itch.io.
At 100% windows scaling setting, the UI elements have expected size,...
0
votes
1
answer
75
views
Adding requestAnimationFrame in isometric Tile grid Code is not working
Hi There this is my first Post on gamedev, and i hope everyone understand what i want :)
First of all my Code is an very Personal Version from one Github Isometric Map.
I Tryd now 2 Days to Add the ...
0
votes
1
answer
93
views
Why is this code keeping the listener which should be removed instead?
I am having some issues figuring out why this code still lets btn_1 call the function setstate3().
There is a function ...
0
votes
1
answer
39
views
why does my button lose the changed cursor and mouseover behaviour as soon as I attach a class to my file?
Using adobe animate cc - exporting to HTML5 and coding in JS (or at least trying to)
If I just hit cntrl+enter in adobe animate the button works as expected.
If I run the app from a web server using ...
1
vote
1
answer
1k
views
How to fit game to screen size?
I create a WebGL game. After building project I discovered that the game doesn't fit the screen size
How you can see the canvas is perfectly scaled but the game didn't
I don't know what I changed but ...
0
votes
1
answer
873
views
How to pan and zoom an isometric map on a canvas
I'm new to html canvas.
So far I am following this code as base for simple isometric tiles.
I made an empty isometric grid map that only shows the grid.
I want to offset the position of my isometric ...
0
votes
1
answer
200
views
How to spread circles evenly around a point?
In my game there's a part where a bunch of circles need to evenly spread around a point. Like in this demo below:
...