"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. ...
0
votes
0answers
4 views
How can I give rotation angle to an object running on iTween Unity5?
I have to rotate an object around a circular track which is a rectangular circle so for that I am using iTween and it is running perfect but the object does not change its own rotation just only runs ...
0
votes
1answer
44 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 ...
-1
votes
1answer
61 views
How to make a stab function?
I've looked around everywhere, and I can't find an example script for a stab. What I have so far is a top down 2D scene, with a player at the bottom (static). I would like to have the sword/tongue to ...
0
votes
1answer
74 views
Align SpriteText position
i have this function which aligns text.
static function AlignTxt(obj : GameObject, txtAnchor : SpriteText.Anchor_Pos,
txtAlign : SpriteText.Alignment_Type)
{
...
-1
votes
0answers
30 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 ...
1
vote
1answer
48 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 ...
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
1answer
42 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 ...
6
votes
2answers
976 views
Arrays for a heightmap tile-based map
I'm making a game using in C# and Javascript that uses a map which has tiles, corners and borders. Here's a graphical representation:
I've managed to store tiles and corners in memory but I'm ...
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 ...
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
26 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
23 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
65 views
Unity3D WWW get HTML displayed in browser
I currently have in a web page, on a localhost server, some information that I want to use in Unity. My problem is that this information are stored in some js variables.
I tried to use the WWW class ...
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
1answer
15 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
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
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 ...
5
votes
4answers
4k views
2D Collision in Canvas - Balls Overlapping When Velocity is High
I am doing a simple experiment in canvas using Javascript in which some balls will be thrown on the screen with some initial velocity and then they will bounce on colliding with each other or with the ...
0
votes
1answer
44 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
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 ...
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 ...
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 ...
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 ...
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)
...
0
votes
1answer
313 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 ( ...
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
1answer
123 views
Resizing a tiledmap when using phaser
var cw = window.innerWidth;
var ch = window.innerHeight;
var game = new Phaser.Game(cw, ch, Phaser.AUTO, 'game', { preload: preload, create: create, update: update });
...
0
votes
2answers
38 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
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 ...
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
2answers
39 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 ...
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 ...
1
vote
1answer
98 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
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:
...
0
votes
2answers
107 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 ...
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 ...
2
votes
3answers
194 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
1answer
177 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
2answers
83 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 ...
1
vote
1answer
127 views
cocos2d-js displays only one type of tile from a tmx file
I am using Tiled to produce a tmx which I use in my code using cocos2d-js.
The problem is that when I run it on the browser, a wrong tile gets displayed, the first one of the image (0,0) and repeats ...
1
vote
1answer
174 views
Separation of axis theorem implementation at normals
This might be more of a math question, but it relates to the development of a simple physics engine I am trying to create.
I have been stumped on this for about a week now, and have been unable to ...
1
vote
3answers
205 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
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);
...
4
votes
2answers
2k views
How can I apply a glow filter in Phaser?
I'm trying to get the following effect, but as far as I know, a filter is the only sensible way.
Imagine some objects and background, and a fire ball passing through. The fireball glows. All objects ...
5
votes
3answers
398 views
How to do a genetic algorithm's chromosome which controls movements
First I would like to inform you that I'm french and 15 so my english is not very good.
I've read some articles about genetic algorithms (GA) and since I discovered the HTML5's canvas element, I can ...
0
votes
0answers
17 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
49 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", ...