"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
5 views

cocos2d-x : set search path not working

im using cocos2d-x javascript and i tried to set search path or asset for multi resolution devices like so in main.js file if (cc.sys.isNative) { // if game is native assetsPath = ...
1
vote
0answers
5 views

Intellisense with PhaserJS Library in Visual Studio Code

I am trying to use Visual Studio code along with PhaserJS but am confused about why the isn't working. I've read through http://www.johnpapa.net/intellisense-witha-visual-studio-code/ am think I ...
0
votes
0answers
16 views

Advanced branching dialogue system in javascript [on hold]

I'm creating 2D RPG game and I want to implement branching dialogue system which can also change player stats, add items and so on. Also I want to implement conditions for some answers so player ...
0
votes
1answer
29 views

How do I make a web browser game front end? [on hold]

I am currently trying to develop a web browser game front end. I understand how to do all of the back end code in PHP, I just need to learn how to make a graphical front end. For example, black jack: ...
0
votes
0answers
21 views

Looking for inspiration for a Mafia Wars type game [on hold]

I'm creating a game that is browser based and without 3D graphics. Basically its going to just be a text-based game. I'm at the very begging of this process, I want to write down a flow chart before I ...
0
votes
1answer
45 views

is this approach correct to make my game framerate indipendent in javascript?

this is what i did my game loop is run every REFRESH milliseconds loop = setInterval(tick,REFRESH); in the loop i calculate how much time is passed since last tick and subdivide that for how much ...
2
votes
0answers
33 views

how to detect if a line is crossing another shape in javascript?

given the situation here http://jsfiddle.net/h902cLpy/ is it possible to detect that a line going from A to B does cross another shape while A to C doesn't?
0
votes
1answer
25 views

Sprite Size For A Top Down RPG-Shooter

I am creating a Top-Down RPG-style Shooter in Javascript with Canvas, based on Sci-Fi Events I have written. Now I have ran into a conundrum: I have nice looking square tiles - that don't look like ...
1
vote
0answers
13 views

Need help in getting sequential impulse method working

i have made a very very simple physics system based on sequential impulse method - with single contacts only and no angular rotation at all. Contact points are calculated using separating axis ...
0
votes
1answer
40 views

svg spaceship game movement 2d

I've been searching for a way to make an svg box move to all directions using js. I have seen many tutorials on how to do it grid like, but I want it so have a square that can turn, move forward, ...
0
votes
1answer
57 views

Unity 5: Accessing a C# variable from Javascript

I've set up a SQLite database with Unity. Into this I would like to add the current CPU Utilisation. The SQLite scripts are in Javascript and the method for finding the CPU utilisation is in a C# ...
0
votes
0answers
33 views

Saving a c# script in a javascript variable(unityscript) [closed]

i am modifying the inventory system made by brackeys. https://www.assetstore.unity3d.com/en/#!/content/10384 Now i want to define a c# script into a variable inside the character.js file. It looks ...
0
votes
0answers
25 views

JavaScript; Chunking an Array/Map

I'm creating a game using Pixi.js and have decided that the best way to present a map is to "chunk" it in to 16x16 tile sections and render each when needed - I'm having a bit of trouble parsing an ...
0
votes
0answers
11 views

Phaserjs, filters, save to image cache

I've tried to apply a Pixi filter to a image and save it to cache but the image doesn't get saved with the filter. colorMatrix = new PIXI.ColorMatrixFilter(); colorMatrix.matrix = [0,0.0,0.5,-0.2, ...
0
votes
1answer
23 views

Rectangles clear each other when moving on canvas

I am having this problem after moving rectangles, they seem to delete one another. Most probably it is a problem with clearRect(...) method. This is the clean function I am using: clean: ...
0
votes
0answers
27 views

Convert Cocos2d-x JS Sprite to PhysicsSprite?

I have a Cocos Studio project that has a node that contain multiple sprites. I am loading this node and iterating through the children (each are a cc.Sprite object); I'd like to convert each ...
3
votes
4answers
257 views

How to enter a level when touching an object

I am working on a project in Unity 4.6.1f1 and I was wondering how can I make a cube touch another cube to go to the next level (the image below)? ! EDIT: I made a script and put it on the purple ...
0
votes
1answer
17 views

Image drawing then blackscreen on AVD using cordova

I have an issue on my android JS based game, the game displays well for 1 second then total blackscreen. window.requestAnimFrame = (function(){ return window.requestAnimationFrame || ...
0
votes
1answer
62 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 ( ...
0
votes
0answers
59 views

Implementing wall-sliding physics in THREE.js

Yo, Basically I want to make a 3D environment where the player can walk around a 3D world, and collides with objects / terrain like any other 3rd person / 1st person game. The world can contain any ...
1
vote
0answers
30 views

Collision callbacks in a javascript engine [closed]

I'm making a game engine in javascript for Educational purpose. I already have the collision detection and collision response parts and are working fine, but i want to let the user define his action ...
0
votes
1answer
76 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 ...
1
vote
1answer
34 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 ...
-2
votes
1answer
50 views

Unity skips menu screen and goes to next scene

I am using Unity 4.6.1 and I am working on a game project. I created a JS script with Application.LoadLevel to go to the next scene. Here is my code for OnGUI: function OnGUI () { { ...
0
votes
1answer
39 views

Randomised Path from A to B for cursor movement simulation

I'm trying to simulate the movement of the mousecursor, by creating a path from point A to B that has random variation. The algorithm I'm using at the moment is very basic, and is limited in that ...
1
vote
1answer
485 views

Is there a javascript physics engine that does not require canvas? [closed]

I just need a really simple and small physics engine for squares or circles that moves images using javascript. For the project that I am working on, I can't use canvas, so I will be moving the images ...
-1
votes
1answer
68 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 ...
0
votes
0answers
29 views

Fix latency when sending state

I have a multiplayer game done with Phaser, which runs in the browser and on a node.js server. The server is authoritative, every 50ms or so it sends the game state object to all clients. The clients ...
0
votes
0answers
81 views

making Circle button in phaser

im trying to make a circle button with tap event i used hitArea property from sprite class and using pixi Circle class i did that this.sprite = game.add.sprite(50,50,"cursors"); ...
1
vote
1answer
123 views

Cocos2D-JS Windows App in fullscreen mode (Win32)

I've been looking for a way to make my Cocos2D-JS app go into fullscreen mode, but there doesn't seem to be much documentation on Cocos2D-JS (or Cocos2D-x-js as some seem to call it.) This app is to ...
0
votes
0answers
90 views

Insert 3d text to the front face of a cube GameObject

I want to add a text to a cube in Unity. I have a cube which has a 3d text as a child. I am using the below javascript to write on the 3d text: #pragma strict function Start () { } var countdown : ...
0
votes
1answer
79 views

Help with scoring system and score multiplier

I am new to the scripting world and I am currently trying to add a score multiplier to the game code I am working on. Right now the score is set to increase as the player runs across the level however ...
0
votes
1answer
58 views

Simulate popularity

I'm working on a music game. It has genres like pop and rock. Different centuries have different music popularities. (Influences the sales) I thought about building an object like this: var rock = { ...
1
vote
0answers
105 views

In Phaser, how should I be managing state? [closed]

I'm quite new to Phaser and JavaScript really confused about state management. Phaser has lots of documentation and info on the net, but everyone seems to be doing it a different way. An example: ...
2
votes
1answer
120 views

How to do monster AI movement and attacks server side?

I have my web based rpg game already created. Inventory management, equipment system, character stats, skill tree, and etc. It's almost complete. For the game world, I am creating a top-down rpg ...
0
votes
0answers
46 views

How can you merge the geometries of cloned objects in Three.JS?

So I'm testing the best non-voxel way to display a lot of objects at once and so I found how to merge geometries. Now, I can easily merge most geometries, but I can't seem to merge the geometries of ...
-1
votes
2answers
125 views

Where to start developing a 2D puzzle game [closed]

I would like to start developing a 2D puzzle games, much like sudoku for example. I would like to publish it on Facebook and on gaming websites, like miniclip, agame, kongregate. The game should have ...
0
votes
1answer
74 views

which state to add main menu for simple browser game with phaser

In which state should I add the main menu, or should i make it into another separate state? My main confusion here is how I manipulate states properly. Im a phaser/gamedev noob and I dont know how to ...
1
vote
0answers
36 views

Unity Javascript GUI.Button shows up twice

Hi I have created a simple menu in Unity but I wanted to create my own style for colour/fonts. However for some reason it prints each button twice to the screen, once with my custom style, and once ...
1
vote
2answers
123 views

How can I scale sprites and maintain visual quality?

I currently have an isometric grid. This grid contains tiles. Some of these tiles have 'tree' sprites sitting upon them. If I have my tree sprite loaded from a texture with a fixed resolution, when I ...
1
vote
3answers
72 views

How to handle transparent pixels in a spritesheet

I am trying to correctly handle transparent pixels. I have a spritesheet that gave me the following: The green body is the ground physics body and the gray body around the sprite is the sprite's ...
0
votes
2answers
103 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
1answer
35 views

How to trim a sprite?

I have a spritesheet: var spriteSheet = new createjs.SpriteSheet({ // ... frames: { width:520, height:600, regX: 260, regY:300 } // ... }); I am computing it's physics body as follows: ...
0
votes
0answers
65 views

Collision detection in JavaScript Canvas game - Issue with 'if' statements [duplicate]

I am currently developing a simple browser-based game and seem to be on the cusp of collision detection that doesn't just return the player to where they were before, but actually will slide them ...
0
votes
2answers
78 views

Cube goes through objects

I have Unity Pro 4.6.1 and I am trying to make a cube move with the arrow keys. Here are the barriers before I move the cube: And here's when I move the cube (the problem): I don't want the ...
0
votes
1answer
79 views

JavaScript THREE.js webgl spotlight rendering

I'm playing with webgl/JavaScript/THREE and a spotlight. And I see unexpected results. And I don't understand what's going on, and I'm hoping you can point me in the right direction. In my particular ...
1
vote
1answer
101 views

How to deal with two different axes on isometric game?

Hi! Above is a visual of the problem I am having. My game has two different coordinate systems. You have the client, or the canvas, where the game is rendered - a standard coordinate plane; however, ...
1
vote
2answers
82 views

Simplify paths when a user builds

I am looking for some guidance on how to simplify my nodes on a path when a user builds on the fly. Imagine a path like this with a gap: Logically 3 nodes are required 2 connected one isolated. ...
0
votes
1answer
58 views

Cross-platform multiplayer game in JavaScript [closed]

I want to start creating a simple multiplayer, JavaScript based, cross-platform game. Think about it as a two player mario where players can shoot each other. My question is what is the best way (or ...
0
votes
0answers
63 views

Google Developer Console Error message

i received my first crash report of on Google Developer Console yesterday and im completely lost. Did anyone receive this error before and how can i go about fixing it? Any help would be greatly ...