HTML 5 refers to new web technologies such as high performance JavaScript engines, canvas 2D and WebGL, video and audio tags.
-1
votes
0answers
35 views
incremental game using arrays to add new lemonade stand
Hello i am having an issue loading a new building in the incremental game code.i want to add new buildings but i can not figure it out.
i want to add new buildings and load them threw dom events
//...
0
votes
1answer
45 views
HTML5 Multiplayer movement
I'm making a 2d multiplayer html5 game that needs client-side movement, collision etc.
Client sends active cursors to the server (w,a,s,d), server updates cursors on all clients and clients handles ...
0
votes
0answers
8 views
Quintus blank screen no errors
I am currently developing a game using the Quintus HTML5 game engine, and I am currently trying to get a basic level to load up. Every time I load into the page the screen is completely blank with no ...
5
votes
1answer
109 views
Security concerns related to HTML 5 games
I would like to know if people could modify an HTML 5 game's code to harm either the server or other players whom visit the page.
More specifically, whether someone could modify a simple game that ...
0
votes
0answers
24 views
How to have the car follow the created path?
I have developed a game where I move a car towards a human in a diagonal path. Now I want the car to follow a route, that is, by taking some turns and move towards the target instead of going directly ...
0
votes
1answer
13 views
How to make the image move forward properly when rotated in my HTML5 game?
I am just trying to make a simple 2D racing game using canvas. It uses the W,S,A, D keys to move the car. The W key should take me forward and the A and D keys will turn each way. I want the car to ...
1
vote
1answer
49 views
Checking if bullet collides with enemy when I know the start X & Y, the angle, the speed and dist traveled of the bullets
This is the bullet I create when a player clicks to attack
var angInRadians = Math.atan2(data.y - playerArr[i].y, data.x - playerArr[i].x);//data.y & data.x is mouseY and mouseX
var temp = ...
1
vote
1answer
25 views
requestAnimationFrame handles game ticks weird when tab isn't viewed
So i have the game logic and render in the callback for requestAnimationFrame, and somehow the ticks run very weird.
In fact, the rendering happens alright.
But the ticks seem to skip an if, to be ...
0
votes
0answers
26 views
How to make the car move in my path in canvas
I have developed a game where currently I move a car towards a human in a diagonal path.Now I wanted the car to follow a route.So I followed some tutorials on pathfinding.So my initial step is to ...
1
vote
1answer
101 views
How to automate the game
I am new to game development and I have a game where the car moves and picks the monster.But now I want to automate the game so it looks like it is played automatically.
The control keys are given by ...
2
votes
0answers
49 views
Implementing an efficient method of server-side checking
I'm making a web-based action RPG game. I don't want players to cheat, but I also don't want the game to constantly pause to wait for the server to respond. I made it so the game is played on the ...
0
votes
1answer
14 views
How to change the color of an image when getting points
Currently I have a car game which I give points when a car touches the monster.Now extra to that I also wanted to change the color of the car or replace the car image with a different color car image ...
0
votes
1answer
58 views
How to turn the car when pressing left or right key
I am new to canvas and developing a game where a car moves straight and now I want to turn the car to anti clockwise when the left key is pressed and clockwise when right key is pressed.
Currently I ...
2
votes
4answers
257 views
What is the best approach for networking a basic HTML5 pong game?
I'm working on the design of a basic multiplayer HTML5 pong game, and I have a very basic question about architecture.
The implied physics is very basic, and the movements are not a problem. The ...
-1
votes
1answer
134 views
How can i make monsters drop items when they are being killed [closed]
I am making HTML 5 game with Javascript i am really new to programming,want to know how to make the enemies drop items after they are killed when the enemy dies i want the rectangle to represent an ...
-2
votes
1answer
73 views
0
votes
1answer
30 views
GameMaker project works fine when targeting Windows but not when targeting HTML5
As mentionned in the title, my GameMaker project works fine when targeting Windows.
However, when I build it for HTML5, I got those errors in the Chrome developer console:
Destructive Dark.js?VYNZB=...
0
votes
0answers
21 views
Create angle when moving object
Create angle when moving object. I want to pretend like I'm throwing some object in real life.
example:
CODE:
new TWEEN.Tween(start).to(end, duration, {bezier:[{x:100, y:100}, {x:0, y:200}, {x:-100,...
0
votes
0answers
24 views
Line following the camera
How can I make a line that follows a camera view? See the example in the image:
(The red line is the one I want to generate, and the blue dot is the camera.)
I have this code that generates the line,...
0
votes
0answers
31 views
Multiplayer Phaser sprite
Currently using socket.io to connect additional players to my game, however on connect I add each new sprite to a group and manipulate the sprite x and y values when the connecting player moves his/...
1
vote
1answer
49 views
Phaser Tiled map importing
How can I be sure that the tileset used in making a Tiled map remains as a multiple of 2, since this is a requirement of phaser when loading JSON tiled maps? I have tileset images which I got for free ...
1
vote
1answer
146 views
2d game with 3d js. game engine
I'm trying to understand if it's possible to create a game where the player can switch between 2d (strategic/bird view) and 3d (actual gameplay) using only the 3d supported JS/HTML5 game engine, like ...
0
votes
1answer
113 views
Missile collision detection
I'm trying to get a missile sprite to stack on top of one another after it is projected forward. I have included the collision code I am working with from the book: Foundation Game Design with HTML5 ...
0
votes
2answers
132 views
Is it possible to write a game with a HTML5+REST service architecture?
As a side project I'd like to program a board game similar to Twilight Struggle. For this pet project I'd like to satisfy several non functional requirements:
The core logic must be written in ...
0
votes
0answers
71 views
Accuracy timer for html5 gaming (even with inactive tab) how?
I've implemented Timer class for high accuracy timing (for example for update logic/game-loop, sending ping each 15 seconds by WebRTC etc.)
setTimeout/setInterval fires once per second when tab is ...
0
votes
0answers
41 views
Choosing a data structure for a group of static (almost) thousands of objects on HTML5 canvas
I have this requirement to implement a data structure for a group of thousands of displayable objects, on HTML5 canvas. Something like a particle system. The objects are randomly spread on the map. ...
0
votes
0answers
97 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
156 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
138 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 ...
1
vote
0answers
40 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 ...
0
votes
1answer
62 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
78 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
36 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
187 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
1answer
172 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
101 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
57 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
251 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
83 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
171 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,
...
1
vote
2answers
105 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 ...
1
vote
0answers
115 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
81 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
60 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
180 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
28 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
60 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
1answer
113 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
78 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
1answer
176 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 ...