"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. ...

learn more… | top users | synonyms

0
votes
0answers
23 views

How to rotate an object on a rectangular circle shaped track in unity5?

Actually I have 10 objects and these all are automatically run on playing game as its a betting game which is going to play on browser but I don't know that how to rotate that objects on curve on a ...
0
votes
0answers
15 views

How do I save and perform the commands at client side in unity5? [on hold]

I have been scripting for a web player game for that server sends few commands to client machine But I don't know how to save and perform the operations as per the commands. If anyone knows please ...
0
votes
0answers
16 views

How do I handle or manage commands which are sent by server in unity?

In my game there are 10 objects which are just started running on play as this is a web player game and betting as well and it requires some socket programming. At run time the commands are sent by ...
0
votes
0answers
13 views

Web Player build is not playing on web. Why? [closed]

I have been developing a web player game and after completing the build process in build settings I clicked on that build file then I found that the build was not playing on web and was showing some ...
0
votes
1answer
24 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 ...
1
vote
0answers
20 views

Why does interactive cloth not appear in game view in unity5 Pro?

I used interactive cloth fir flags in unity5 Pro version and it appears in scene view but does not appear in game view while playing. What can I do for that please somebody help me out?
0
votes
1answer
40 views

How do I use threads in unity c#? [closed]

I have been developing a Web Player game in unity using c# but its not running smoother as I wanted. For that I took Unity5 Pro and then used profiler for optimizing the project but still not getting ...
0
votes
0answers
33 views

Javascript Game Engine for Isometric “Final Fantasy Tactics” like game [on hold]

I want to start developing a game and i have been doing some research these days to know how to start. The base idea is to build a game with a Final Fantasy Tactics style (isometric, turn based), i ...
0
votes
1answer
14 views

three.js objects disappear

I haven't got a lot of experience with 3D Frameworks - but was playing around with three.js and came across something that (to me) is a bit odd and I wondered why this happened. I am rendering the ...
0
votes
1answer
49 views

A* Pathfinding math for 2D, oblique style game

I'm making a 2D, oblique-styled RPG game and am implementing A* pathfinding for NPCs. The game is on canvas, using melonJS engine and sprites not confined to a 'grid'. I'm having a hard time ...
0
votes
1answer
40 views

TypeError: R[o5R.F6s] is not a function in changing states in phaser box2d

i build my game using phaser.2.4.3.min.js and phaser.2.2.2.box2d.min.js When trying to change states this error is being raised TypeError: R[o5R.F6s] is not a function and i can't seem to figure out ...
1
vote
0answers
20 views

Creating a perspective camera from scratch [closed]

I am trying to develop a 2.5D game similar to the original SNES F-Zero from scratch without using any other sources such as opengl and unity (sample view: https://www.youtube.com/watch?v=2T5u9nD_I0I) ...
2
votes
1answer
81 views

How to remove a component of an object in a script?

I want to remove a Sphere Mesh Renderer component from a certain gameobject. I want to do this in a script. How do I do it? I do not want to destroy the sphere itself, just the component
0
votes
2answers
36 views

I need an object to move towards an moving object in Unity2D (javascript)

I am trying to make an AI that tries to move towards the player but I don't know how. I tried using Vector2.MoveTowards() but it just mimics my movements instead of moving towards the player. I tried ...
0
votes
1answer
35 views

How to get a Vector2 location of an object? (Unity2D javascript)

I need to make an "AI" that makes a ball try to touch the player. But Vector2.MoveTowards()needs a Vector2 variable but how do i get the location of an object?
0
votes
1answer
12 views

How to use rigitbody2d.AddTorque() in JavaScript? (unity2D)

I just want to know how to use rigitbody2d.AddTorque() and an example script would be great :D. I am trying to rotate a cube forever using it as a test.
0
votes
1answer
23 views

How should I store dynamic game entities for efficient area-based selection?

In my 2d block-based game I'm trying to implement a data structure that would store entities entities in a way that's capable of: Direct selection based on coordinate. Iteration Iteration limited ...
1
vote
1answer
83 views

Calculate the slope of a 3D triangle?

I have lots of triangles in 3D space. How do I determine the slope/angle of these triangles with respect to a fixed ground plane? I need pseudo code examples at the very least. Thanks! [edit] Based ...
1
vote
1answer
94 views

JS Canvas - Creating 2D Game lighting effect like Terraria

I just started working with canvas in HTML5 and with javascript. I'm pretty satisfied with my game so far: http://xenopal.dk/game-v1.1/. But I'd like to implement lighting as well in the style of ...
0
votes
1answer
27 views

How can I create a parabola that does not use negative X coordinates

I am currently devloping my first javascript program ever which is a table tennis game. I am trying to create trajectory for the ball to follow when hit - just a very basic parabola. However im not ...
0
votes
1answer
35 views

How do I make the background color fade into a different color after hovering it? [on hold]

I was trying to make the starter inputs for my text rpg change the background color in a fade effect with JQuery, but I cant figure out what i did wrong. Heres the part im focusing on: ...
1
vote
1answer
26 views

Animations with individual images in Phaser.js

So I have this game that I made a while back and I want to port it using Phaser. The game is made using individual PNG files for all the animation frames, and there are over 100 of them. From ...
1
vote
2answers
82 views

Using hard coded values for Items?

Is it a bad idea to use hard coded values for things like items (static data) that would change infrequently in an online game? I'm designing an online game in node js, and I'm trying to decide if it ...
0
votes
1answer
43 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 ...
0
votes
0answers
16 views

Using EaselJS, my spritesheet-based map is not showing up

I have a random map that generates based on a level and a set of Tile ID's, constructed using a Height Map generator I wrote using the BitmapData extension. I've confirmed that the Tile IDs are ...
0
votes
1answer
39 views

How do I combine two HTML levels? [closed]

If I have two levels that I have made separate in HTML5 how may I combine them so one comes after another?.
3
votes
1answer
71 views

Creating HTML5 Canvas Objects in Javascript [closed]

I'm currently trying to learn how to make HTML5 Canvas games with JavaScript. I would like to use object oriented JavaScript to manage the elements of the game, but i'm having trouble. I've done a lot ...
0
votes
1answer
47 views

What is the best way to manage 'state' in Phaser?

I have heard that this is not the best way to manage state in phaser var game = new Phaser.Game(800, 600, Phaser.CANVAS,'YourGameName'); game.state.add("Boot", Boot); game.state.add("Preload", ...
-2
votes
1answer
48 views

How do I clear the previous frames of a canvas animation?

I am trying to rotate an object, but all the previous frames still show up on the canvas. Here is my code. This didn't work: this.ctx.clearRect(0, 0, this.canvas.canvasWidth, ...
0
votes
1answer
19 views

How do I store game data with cookies?

Im working on a game right now, but I was wondering how I would store the game data in cookies(in javascript) where you can load it up, and resume the last spot you were at. I was looking at some ...
2
votes
3answers
93 views

Collectible card game, cards and effects

Based on Design of a turn-based game where actions have side-effects I am building a card-game where cards can have side-effects be triggered under different circumstances. I was given a good idea ...
0
votes
1answer
43 views

How can zoom into my object when that object is being clicked?

Suppose that I have the three game(cube,Quard,sphere) object. When I click on a particular game object suppose think I have clicked on the cube,the cube object should get zoomed in on the screen. how ...
0
votes
1answer
41 views

How to use custom font in Phaser ?

I am trying to load webfont in Phaser, I have seen the Phaser example but I cant understand, what asset do I need,what function I have to call....,what exactly look like the javascript file?. I am new ...
0
votes
2answers
38 views

Calculating pitch angle to hit a target using a projectile that has fixed speed

I am trying to calculate a vertical angle needed to hit a target at [distance, elevation] 2D coordinates relative to shooter given a fixed projectile velocity, air drag and gravitational ...
0
votes
2answers
95 views

Why does player still leave map?

I'm making a simple HTML5 RPG in pure JavaScript likened after Nox, Diablo or Titan Quest, with the character centered on the screen and the map moving around it. TL;DR: My character, when colliding ...
0
votes
0answers
14 views

How To Make ModPE Perform Function The First Time Mod Opened

I am making a Minecraft PE mod and I want to set a variable only on the first launch of the mod. So, how do I make it it set the variable and then not set it again until I import the mod again. ...
0
votes
2answers
40 views

Rotate coordinates back after rotating game context (geometry)

To achieve something similar to the image below using HTML5 canvas one can simply write the following: var TO_RADIANS = 0.0174532925; context.translate(30, 20); context.rotate(30 * TO_RADIANS); ...
-3
votes
1answer
81 views

handling wars in multiplayer browser game [closed]

I'm building a browser game about countries, cities, the user control his city, building it upgrading it, can fight other cities in the same country, elections and war between countries, peace, trade ...
0
votes
0answers
9 views

How to play the falling animation while using a Twoway component?

I am new to crafty and I was trying to write a simple platformer using Crafty.js. Here's what I've got var player = Crafty.e("2D, DOM, SpriteAnimation, PlayerSprite, Gravity, Collision,Twoway") ...
0
votes
0answers
23 views

UV texture mapping with perspective correction works for 50%

So, I've been trying to get the UV texture mapping down with perspective correction. The triangle rasterization seems to work. The interpolation seems to work too. It's just the perspective ...
0
votes
1answer
19 views

Error BCE0043,BCE0044 and UCE001 [closed]

I got my code right here: #pragma strict var hSliderValue : float = 0.0; function OnGUI(){ hSliderValue = GUI.HorizontalSlider (Rect (25, 25, 100, 30),hSliderValue, 00, 1.0); ...
-1
votes
2answers
64 views

How do i make an idle-styled counter in Javascript & HTML

I just started making a basic game in HTML, CSS, Javascript, and JQuery, but I want to have the money add up after a certain amount of time (if you have ever played an idle game, you'd know what i ...
1
vote
2answers
82 views

Applicaton.ExternalEval(String script)

I was wondering, if Application.ExternalEval(String script); in Unity3D can return something. Like:String playerName = Application.ExternalEval("prompt("Please enter your name", "player1")"); Thank ...
1
vote
0answers
39 views

Implementing Separating Axis Theorem to Detect and Handle Sliding Collisions

I am having a bit of difficulty detecting collisions properly with separating axis theorem. My code seems to be giving a lot of false alarms. Also, I've looked into implementing sliding collisions ...
0
votes
1answer
48 views

2D movement issues

So I'm making a isometric game in javascript, so far it goes well. But I have some problems when a object it suppose to walk from point A to B. Item.prototype.update = function(delta){ var speed ...
0
votes
0answers
44 views

touch mouseOver in createjs - DispatchEvent() not working in iPhone/iOS

I have recently developed an html5 game using createjs and I am currently in the testing phase. The game seems to work fine in all the devices except for the iPhone. After careful analysis I have come ...
1
vote
0answers
49 views

Diagonal movement behaving strangely when other key is pressed

I'm following the tutorial at http://blog.sklambert.com/html5-canvas-game-the-player-ship/. I'm at the part where bullets get added to the game. Prior to this in the section about movement where I ...
2
votes
1answer
72 views

Client interpolation for 100% serverside game

I'm developing an online browser MMO 2d war game. And I'm having some issues with the interpolation. The server sends updated positions to the clients every 90 ms. I've managed to make it smooth, ...
2
votes
1answer
43 views

Platformer Collision in javascript

Hi im making a platformer in javascript and this is the collision function that I have if(obj2.y > obj1.y + obj1.height || obj2.y + obj2.height < obj1.y|| obj2.x > obj1.x + obj1.width ...
1
vote
1answer
53 views

Javascript 2D top down handling player direction graphics

In my top down game I can move the character around and the character will even face the direction he is moving however there is some weird behavior I'm having when you hold down one direction and ...