"JavaScript (sometimes abbreviated JS) is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles." From Wikipedia. http://en.wikipedia.org/wiki/...

learn more… | top users | synonyms

0
votes
0answers
7 views

Jerky mouse follow JS/HTML5/canvas

Can someone please advise. I am trying to create a simple mouse follow program, all is fine aside from when the mouse is moved too frequently, the movement is really jerky. Can anyone help? I am ...
0
votes
0answers
16 views

Creating new browser multiplayer game

I decided to make an browser-based multiplayer game with huge armies. So far in a year i have created an army editor, where you can create armies, place then anywhere, set several moving targets and ...
0
votes
1answer
48 views

Make a person walk faster when standing on plane/panel in Unity?

Is it possible to make a person walk faster when standing on plane/panel in Unity without writing a lot of code? If so how? I am using the standard asset first person movement prefab.
0
votes
1answer
104 views

How do I sync the gameobjects to server in C# unity?

I have been working on Game that consists of 10 Game Objects that have to be sync by the server values. The server decides that which game object will win and then sends command to my side(Client side)...
1
vote
1answer
62 views

Hybrid App - Game Encyclopedia Image Asset

An in-game encyclopedia usually consists of entries and images for things related to the game. For example, pokemon's pokedex. Image of Pokemon, text description and so on. I've happen to encounter a ...
1
vote
1answer
71 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 ...
1
vote
1answer
83 views

Targeting logic for 100.000 units army

I am making an army fight for my website armyfight. There can be fights of hundreds of thousands units. I am looking for better unit targeting. in jsfiddle is an example. var enemy = { 2: { ...
0
votes
0answers
23 views

p2 collision not working after state change

i have 2 objects GAME.ball Game.stick both have two bodies and i have two scene first scene GAME.ball = game.add.sprite(x,y,key) game.physics.p2.enable(GAME.ball, true); GAME.ball.body.dynamic = ...
0
votes
1answer
735 views

How to use Cocos2dJS to connect to a Socket.IO server?

How can I connect to a nodejs socket.io server from a cocos2djs game? I've google all the way to no avail. I tried this but it does not work: socket = io.connect('http://192.168.254.102:7714'); if ( ...
1
vote
1answer
56 views

What's wrong with my animation trigger script?

So I am making an RPG and I am setting up the player. I am trying to trigger an attack animation by pressing a button. I wrote this down and I get an error that says "Expressions in statements must ...
0
votes
2answers
288 views

Saving data in the local computer with cocos2d-js

Making a game with cocos2d-js, is there a reliable way to create saved data in my local computer? I see that there is cc.sys.localStorage but it is removed if the user clears the browser's cache or ...
1
vote
2answers
79 views

Help with Javascript touch button

I tried many buttons but I can't connect them with the (Java)Script. So I made 2 gui buttons: one for jump which was easy because I have an if statement and if it's true then jump. But I have ...
2
votes
1answer
160 views

Centering camera on player div

I've been making a roguelike-style game in HTML5 without using canvas (only divs) with pure JS (fiddle!). I've been trying to enlarge the tile size (font size) while keeping the player centered within ...
1
vote
0answers
23 views

how to replace vertex buffer in webGL

I want to replace a vertex buffer with another completely different vertex buffer, different size and values, it will not get replaced every frame. gl.deleteBuffer(vertexBuffer); vertexBuffer = gl....
-7
votes
0answers
67 views

How to jump straight into 3D game development without any prior knowledge [closed]

I want to know how can i directly get into the game development world. Currently I've exactly "no" knowledge of developing games. I've never even built a 2D game; and I wanna jump start right into 3d ...
-1
votes
1answer
46 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 ...
1
vote
2answers
70 views

How to make Pong ai paddle?

I'm trying to make an ai so the paddles will move to position before the ball reaches it. I'm currently using RobotJS to move the mouse. I'm not sure how to extrapolate the position so that the mouse ...
-4
votes
1answer
31 views

Stuck with matching problem

i am making a game in Javascript called bubble shooting and this is a time based game the bubbles will spawn on the top of screen and will travel to bottom and i am stuck in bubble spawning because i ...
0
votes
0answers
21 views

Jumping on meshes in Babylon.js

So I want to make it possible for players to jump on objects (meshes) that are somewhat lower than the players camera. I have set the checkCollisions to true but i can't seem to jump on any objects (...
3
votes
4answers
475 views

In PHP, how do I implement multiplayer “rooms” for a turn-based game?

I'm working on a multiplayer checkers game. I want to let players choose another connected player and invite him to play. I have a working game engine and rendering, but I'm stuck on the multiplayer ...
0
votes
1answer
36 views

How to go about making a stock market game? [closed]

Id like if anyone could point me in a direction of how the javascript portion of a stock market game would work, making a website is easy but putting in the game part with javascript is where i ...
0
votes
1answer
50 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
31 views

Drawing strings with a fabric texture in Javascript - possible?

Am exploring ways to programmatically generate string arts (sort of like these physical examples: https://goo.gl/d2Gyeg) in the browser. Any gurus out there that can help guide this exploration down a ...
2
votes
2answers
35 views

Handling input through callbacks or through game loop?

I've tried to figure out how to handle player input properly, but without luck so far. As far as I have figured out, I can either: Call the respective methods directly through the callback fired ...
0
votes
1answer
35 views

Sync bullets node.js phaser.io

i am currently having a struggle thinking about syncing bullets. I am using node js and phaser.io and I am creating top-down shooter. I would do it like this: Player shoots a bullet. Player ...
1
vote
1answer
77 views

Color Based Collision Javascript (Cocos2d-js)

Im looking to make an isometric game...so my partner designed the isometric map (jpg image) along with the map objects (png) on adobe ilustrator... so the thing is i would like to set the player path ...
0
votes
2answers
887 views

How to move an image back and forth with javascript

I currently am trying to make a baseball game and have this code here: http://jsfiddle.net/769BK/ I have the baseballX set to a decrement, and then I try increasing the value using baseballX++; but it ...
0
votes
1answer
23 views

How to draw and give functions to multiple things at once?

I'm using plain JavaScript and I've bee coding a hardcore platformer game. I want there to be multiple enemies at once and before I write up the code I have a question. How do i approach that? Do I ...
0
votes
0answers
22 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
0answers
9 views

ThreeJs camera angles

I'm trying to build a 3D editor for my game. What I'm trying to achieve is an IDE similar to the most part of 3D modeling softwares (Blender, 3D Max, Maya, etc) where you can choose the camera angle ...
0
votes
1answer
31 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". ...
0
votes
0answers
40 views

Multiplayer game server sync

I am building a 2d multiplayer game with no physics and my own authoritative server. Already have all players getting synced each with other but their movement isn't so smooth yet. Here is the ...
3
votes
2answers
488 views

Collision detection between draggable object and world objects?

I have a game I'm making in Javascript that will involve combining items by dragging and dropping them onto each other. Think Alchemy or similar. So far, so good, but I hit a snag while trying to ...
0
votes
2answers
2k views

Simple javascript HTML5 canvas start menu

I'm currently looking for a simple and basic start screen for a game using javascript, so basically its the first function that is called and then press play which then goes into the game. Looked ...
0
votes
1answer
30 views

How to make Pong Ball Control?

I want to know how can I make the control of the Pong Ball in Plain Javascript. I would like to know how to make the ball faster when it hits the edges just like the original pong game, or how if the ...
0
votes
0answers
23 views

In JavaScript, Should every object have its own draw method? [duplicate]

Up until now, whenever i make a game in JavaScript I had been giving each prototype its own draw Method. I used this paradigm because giving every method a draw method allows for simple interaction ...
0
votes
2answers
99 views

How to make the character cannot pass through other randomly moving objects when they are collided?

As the title above, how can i make my random wallImg solid enough so that my birdImg cannot pass through it from any sides of the wallImg? Here's the code of Processing's Crappy Bird that i've altered ...
3
votes
2answers
410 views

Shadows in html5 canvas game

I'd like to ask for reference. I met an article about how to cast shadows in games. I'm using html5 canvas (currently without webgl) with javascript for my projects. The article mentioned above is ...
9
votes
1answer
2k views

Implement Fast Inverse Square Root in Javascript?

The Fast Inverse Square Root from Quake III seems to use a floating-point trick. As I understand, floating-point representation can have some different implementations. So is it possible to ...
0
votes
1answer
81 views

Why does the player jump every time it touches the ground in my JavaScript game?

I am making a javascript game where the player jumps over oncoming cars, but after the first jump every time the player hits the ground they jump again automatically. I believe the problem is because ...
0
votes
0answers
51 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
38 views

How to calculate a simple swivel rotation? (no physics engine)

Assuming i know the geometry and the rotation angle of a cart, how can i calculate the rotation angle of a swiveling wheel? To get the rotation angle of the wheel, i tried by calculating the ...
1
vote
1answer
169 views

Drawing/adding shape objects with the mouse on html canvas

I've started with the canvas paint tutorial from link which worked fine with a few problems that can be fixed later. I've been checking a lot of posts on drawing shapes on the canvas but they all use ...
3
votes
1answer
99 views

Call a native mobile API in Construct 2?

It is possible to use mobile api features in a Construct 2 game (html 5 / js engine) ? I didn't find anything about that on the net, unlike anothers game frameworks like Corona Entreprise or Cocos2d....
1
vote
1answer
490 views

Create a WebGL native plugin

I am trying to create a WebGL plugin and I read in the docs here: http://docs.unity3d.com/Manual/webgl-interactingwithbrowserscripting.html But I'm not sure I understand. I created a file in Assets/...
0
votes
1answer
83 views

Game loop with fixed timestep gives strange result

So I've read the famous article at http://www.koonsolo.com/news/dewitters-gameloop/comment-page-2/#comments which describes different methods of implementing a game loop. I've tried to implement the ...
0
votes
1answer
35 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
1answer
15 views

How to include a new file js in a project cocos2d js?

I'm trying to include a new js file containing a new scene on a cocos2d js project, but every time try occurs the following error: Uncaught ReferenceError: GameScene is not defined. I included ...
3
votes
1answer
99 views

PhysicsJS on mobile devices: how to optimize for speed

I'm (physics n00b) developing a small animation (gamification) in a mobile HTML5 app (PhysicsJS, HTML5, Cordova, Ionic, JavaScript). This animation is derived from Basket of verlet constraints. This ...