HTML 5 refers to new web technologies such as high performance JavaScript engines, canvas 2D and WebGL, video and audio tags.
0
votes
0answers
23 views
Adding multiple animated sprites on canvas make the game FPS drop sharply
I am using PIXI.js to build a html5 canvas game. Although this is PIXI.js specific question I think this may happen very often in HTML5 canvas games.
I have placed hundreds of static sprites in my ...
0
votes
1answer
25 views
How can I scale/zoom to a point in canvas in the game?
I am using html5 canvas to build a MMO game. When I scale my background by default it scales to (0, 0) which is the top left corner of the background. If I have other sprites on the screen they all ...
1
vote
3answers
73 views
Is it alright to have hundreds of canvas object on screen?
I am using html5 to build a game and it is based on Canvas not webGL. I am trying to build sprites from canvas object not from images. Because there will be many sprites on the screen and each of them ...
0
votes
0answers
16 views
Javascript Development issues in sound functions; game development; phaser library
I am making a game, but this error keeps popping up(look in attachments). What can I do? By the way, I am using the Phaser library.
1
vote
0answers
26 views
Where to put Tweening effect codes in HTML5 Canvas game?
I am building a javascript HTML5 canvas game and I need to scale the map. However whenever I scale my map the screen stutters very obviously. To scale smoothly without player noticing I add Tween ...
-1
votes
0answers
22 views
Cursor Lock in WebGL - html requests
The manual page (link below) mentions the following Html5 API requests
Element.requestPointerLock
and
Element.requestFullscreen
What are those, and how can I access them in my scripts?
-Should ...
0
votes
1answer
25 views
pixi.js - PIXI undefined
I am using pixi.js to learn about HTML5 game development. When using this line of code
var bunny = new PIXI
I get an undefined error saying that PIXI isn't defined.
Here is my HTML
<!doctype ...
1
vote
2answers
60 views
How can I increase framerate, when drawing tiles to a HTML canvas?
I am using the HTML 5 canvas to make a simple platformer game. I am currently drawing the tiles using a for loop that runs through a list of tiles and checks if they will be drawn to the screen.
for (...
0
votes
0answers
23 views
How to scale the screen in HTML5 canvas like “Circle Push”?
I would like to implement a scaling feature in my game like that of the game Circle Push which scales the map smoothly and I can hardly notice the changes when it scales. In Circle Push it works like ...
1
vote
1answer
86 views
HTML5 realtime MMO games, should I do server side physics update or client side?
I am using socket.io and HTML 5 canvas to build a MMO game as a practice. I finished the client side first and currently I am working on server side. Apparently the position/physics update is on ...
0
votes
0answers
38 views
Adding Sound effect for tween in Phaser
I want to build a game which will have bubble effect same as this but the twist is I want sound effect of bubble pop for buble when comes up as like in real its poping ot from base line. I searched ...
0
votes
1answer
62 views
Structure game database to store player info and items
Recently I started developing my tiny html5 multiplayer game made in Node.js, Express.js, MongoDB(Mongoose), Socket.io and using Phaser.js.
I am quite new to these frameworks and especially new to ...
0
votes
2answers
67 views
How to draw an image on canvas without html
I'm trying to add a sprite to the canvas of my game. However, I don't want to use an image tag. However, I haven't found a way to do this no matter how hard I searched. Something like:
var image = '...
0
votes
1answer
40 views
Character movement resetting x & y position in HTML5 game
I have an HTML5 game I'm working on and I'm at the point where I'm trying to make the character move. For the most part, the character(A rectangular square) is moving, but it's not moving from its ...
1
vote
0answers
110 views
Creating an Isometric tile map with HTML5
I'm trying to create an isometric tile map using HTML5 Canvas. Everything I've found online points me towards using a pre-built engine. I'd like to learn how to do this without using an engine. Is ...
0
votes
1answer
57 views
How do I make an HTML5 canvas tiled map with tiles which have other than squared edges?
I'm creating an HTML canvas map and I'm trying to have the edges of the tiles not appear square, as in the tiles merge in to each other. I've scoured the internet for hours but can't seem to find ...
0
votes
1answer
59 views
2d animation on html5 canvas using a vector and speed
Im moving a starship from one location to the other. In creating a vector, normalize and magnitude it.
Lets assume my vector looks like this
Vector
x: 156,
y: -90,
m: 180.0000000546,
...
0
votes
1answer
92 views
HTML5 Javascript Multipleplayer game without canvas [closed]
I hope its is fine if I can ask some basic question here. I am new to javascript/jquery and HTML5 developement.
I have created a small Snake and ladder game. Its not yet 100% complete.
What I want ...
1
vote
2answers
89 views
Loading maps on HTML5 Games
I was wondering if my 2D Pixel Art platformer HTML5 game(a lot of words there..) should have loading screens for maps.
My game has different maps and I don't know if a loading screen should be ...
0
votes
0answers
25 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 ...
1
vote
0answers
80 views
Resizing the map in HTML5 canvas
Say I have a big map for my HTML5 game. And it is drawn with an image repeatedly.
I want my map to be able to resize and respond to player's behaviors.
Now I can resize my map, I just multiply a ...
1
vote
1answer
55 views
How to FIX Phaser Idle Clicker Game Images?
I'm new in game development Phaser.. I'm trying out a code tutorial for a clicker game I browsed from Zenva and did a few adjustments with the images (along with the codes) but I can't help to notice ...
1
vote
2answers
50 views
Updating bots/AI behavior after a fixed elapsed timestamp in game loop?
I am developing a HTML5 game in javascript. Now I have created a few bots and they should be able to change their orientation after a few seconds/a fixed timestamp in the game loop.
Suppose my game ...
1
vote
1answer
97 views
How to communicate with LibGDX HTML5 app?
I'd like to have a HTML form send data to a LibGDX game deployed as HTML5. Ideally as a form in HTML as part of the same page that contains the LibGDX div/canvas, and use the form to set up some data ...
1
vote
1answer
21 views
Detecting collision between browser window middle point and other sprites visible in the window
In HTML5 canvas, I have an object which is always in the middle point. On the big map there are other moving objects. I want to detect if the middle point of the window hit any shape we see on the ...
-1
votes
1answer
59 views
What does this code mean? [closed]
I got some code from here http://www.williammalone.com/articles/create-html5-canvas-javascript-game-character/1/
Everything is quite understandable, everything working well. However, I don't ...
0
votes
0answers
134 views
Floor casting in a Raycasting engine
I'm trying to create a pseudo 3D, raycasting engine with plain JavaScript rendered on the HTML5 canvas. In short: a Wolfenstein 3D clone.
So far I have gained inspiration from the following guides:
...
0
votes
1answer
100 views
How to avoid 2d enemy using trigonometry?
I'm making a game in Javascript & HTML5.
I have a "bullet" (let's call it so) that needs to reach the enemy (at fixed position) and that need to avoid the enemy's "bullet".
To make the bullet ...
0
votes
1answer
58 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....
0
votes
0answers
72 views
Collision detection not working for JavaScript Game
I'm working on a JavaScript game called Spacecraft which is minecraft 2d
style. The problem is that my collision detection is not working. It works for a all the divs but the ones with the class of ...
0
votes
1answer
111 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 ...
0
votes
0answers
53 views
libGDX GWT compile with “-style DETAILED”
So basicly my libgdx HTML5-gradle build doesn't work.
When switching from state it gives the following error:
__gwt$exception: <skipped>: Cannot read property 'tM' of null
Of course I want to ...
0
votes
0answers
53 views
HTML5 game - Difference in layouts in webview of app and webpage
I have created a working prototype of an HTML5 game and tried to convert it into an android app using PhoneGap. My issue is that the layout of the screen is bigger in case of the webview of the app. ...
1
vote
1answer
173 views
Bouncing from any object after collision JavaScript
I'm trying to make a ball bounce off some obstacles after a bounding box + pixel by pixel collision. Somehow, sometimes the ball is not going in the direction it is supposed to be.
If the ball is ...
0
votes
0answers
69 views
Errors in code examples from the book “Advanced Game Design with HTML5 and JavaScript”
I have purchased Advanced Game Design with HTML5 and JavaScript and have started going through the chapters. I notice that after chapter 2 I get code errors and the source code from the downloads ...
1
vote
0answers
95 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 ...
1
vote
1answer
103 views
How add a PIXI container into a Phaser Game?
How add a PIXI container into a Phaser Game?
I have a game made ONLY with PIXI. but now i would like to port it to a Phaser.
All my game content happens inside a pixi container "screenContainer". ...
1
vote
2answers
71 views
Maths ? coordinates rotating around coordinates
could you geave me a tip please, a redirection to what is the "simple" math I need to learn and understand for the rotation of an object (its coordinate x, y) around an other object (an other x, y), I ...
1
vote
1answer
126 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 ...
2
votes
1answer
168 views
How to implement map scrolling inertia formulae
I'm looking for a mathematical formulae to calculate map scrolling inertia. Basically I have an HTML5 Canvas displaying part of a map and I capture the mousedown / mousemove / mouseup to calculate my ...
1
vote
0answers
41 views
Using GLFX.js on a full HTML page
I have a friend who is developing a game for HTML, and wants me to implement GLFX into the site page.
The problem is GLFX was designed specifically for use with the HTML5 Canvas, which he isn't using, ...
1
vote
2answers
75 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
78 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
0answers
176 views
UE4 -> HTML packaging not working
In the UE4 editor, if I try to package a project via File -> Package Project -> HTML5 option it creates the package, but doesn't work. A black screen shows up when I try to run the project's HTML file ...
0
votes
0answers
267 views
Unreal Engine - Why is the size of even the most minimal HTML5 project ~ 155 MB?
I created a new project in UE4 (ver 4.10.4) with "no starter content" and "scalable to 2D/3D" settings. Essentially, there are a total of 5 assets in the project 1) floor, 2) light source, 3) sky ...
1
vote
1answer
48 views
Does pausing the canvas draw restores the FPS to higher value in a HTML5 game?
I set Frame Per Second of 60 for my game. But after 1 minute it gets to a significantly lower value - around 8 FPS.
Does pausing the canvas drawing restores the FPS to higher value? If it does, how ...
1
vote
1answer
136 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
0answers
41 views
Adding rhythmic combat in Construct 2?
Just a simple question here: Is there any way to integrate counter-attacking, stun and punch rhythmic combat mechanics seen in the Batman: Arkham franchise and Shadow of Mordor? I know that Construct ...
-1
votes
1answer
82 views
What JavaScript and or Html should engine I should use? [closed]
I took some classes on JavaScript and I know some html5. I took these classes so I can Learn Game Development!! I want to use JavaScript and not C# or C++ because I want easy cross platform with the ...
0
votes
1answer
56 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>
...