"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

1
vote
2answers
544 views

What is some game development literature purely in javascript? [closed]

I'm mainly interested in the videogames development in pure javascript, since nowadays there's so many books about htm5 and javascript I couldn't find any book about game development with javascript ...
2
votes
4answers
2k views

Unity: Assigning a key to perform an action in the inspector

I am trying to write a simple piece of code in JavaScript where a button toggles the activation of a shield, by dragging a prefab with Resources.load("ActivateShieldPreFab") and destroying it again ...
7
votes
2answers
906 views

How to scroll hex tiles?

I don't seem to be able to find an answer to this one. I have a map of hex tiles. I wish to implement scrolling. Code at present: drawTilemap = function() { actualX = Math.floor(viewportX / ...
1
vote
1answer
588 views

Performing simple network call to retreive JSON in Unity?

I have looked at the network documentation for Unity and most examples seem to be related to networking your game for multiplayer. I am just looking to grab a JSON response from an API for dynamically ...
1
vote
1answer
432 views

Setting the values of a struct array from JS to GLSL

I've been trying to make a structure that will contain all the lights of my WebGL app, and I'm having troubles setting up it's values from JS. The structure is as follows: struct Light { vec4 ...
1
vote
0answers
382 views

Stuck with A* implementation [closed]

I have implemented some A* code in C# using this JavaScript code. My C# implementation is the same as the above javascript code. But I'm unable to get it to work properly, e.g pathfinder blocks ...
11
votes
8answers
3k views

HTML5 mobile game development vs. native game apps

What is the current state of game engines, frameworks, libraries and conversions related to the HTML5 set of technologies (including CSS3 and JavaScript libraries such as RaphaelJS, Impact, ...
3
votes
1answer
167 views

Make an object slide around an obstacle

I have path areas set up in a game I'm making for canvas/html5 and have got it working to keep the player within these areas. I have a function isOut(boundary, x, y) that returns true if the point is ...
0
votes
2answers
613 views

Check if an object is facing another based on angles

I already have something that calculates the bearing angle to get one object to face another. You give it the positions and it returns the angle to get one to face the other. Now I need to figure out ...
0
votes
1answer
556 views

Calculating bullet travel knowing coordinates and radian

I have a player sprite that has a x and y coordinate and also a radian. The radian determines which way the sprite faces in a top-down game interface. In this case, the radian points from the player ...
-1
votes
1answer
2k views

HTML Javascript Hidden Object or Photo Hunt Game

Is anyone aware of any example photo hunt/hidden object games either in HTML and Javascript or flash if necessary? I am having trouble finding one, I may be using the wrong words to search. Photo ...
2
votes
1answer
2k views

Collision detection between a sprite and rectangle in canvas

I'm building a Javascript + canvas game which is essentially a platformer. I have the player all set up and he's running, jumping and falling, but I'm having trouble with the collision detection ...
8
votes
3answers
625 views

How often to update a Game Client about the World?

Using socket.io, I have a communication similar to that of other MMORPGs, a steady connection with messages. In my design so far, the client sends the player's position and animation frame with every ...
31
votes
2answers
2k views

In a browser, is it best to use one huge spritesheet or many (10000) different PNG's?

I'm creating a game in jQuery, where I use about 10000 32x32 tiles. Until now, I have been using them all separately (no sprite sheet). An average map uses about 2000 tiles (sometimes re-used PNG's ...
6
votes
1answer
502 views

What structure is best used to model maps for games like Bard's Tale / Dungeon Hack?

I would like to create or use an existing JavaScript engine to build a game in the spirit of Dungeon Hack, Eye of the Beholder and older Might & Magic games. Going off my memory playing these ...
4
votes
5answers
5k views

Which free HTML5-based game engine meets these requirements? [closed]

I am experienced with traditional JS and HTML but new to HTML5. I want to develop games in HTML5 so that it can work on all devices and browsers, including IE. Additionally, I require the following ...
2
votes
2answers
354 views

How to draw objects that have a smaller Y axis first?

In my game there is a large 2D map of various objects. Example. As you see, upon creation objects of the same type (trees for example) are placed correctly, but objects of another type (enemies) are ...
2
votes
2answers
536 views

Animating sprites at different speed than what the game runs at

I am building a Javascript/canvas platformer game, and it's coming along nicely. The only problem I've really run into where I can think of any solution at all is the animation of my player sprite. ...
5
votes
1answer
2k views

How do I implement side scrolling in a javascript platformer?

I'm building a side scrolling platformer with Javascript and the canvas element for a school project. I have the character all sorted out. He runs left and right, and has a different sprite set for ...
1
vote
1answer
165 views

How do I draw a multi-object mesh at once?

This is a very elementary question. At the moment I am drawing lots of faces separately by setting a location uniform separately for each one of them. This is very slow. As I understand it, the ...
7
votes
4answers
6k views

How do I play audio with Javascript?

I want to add a short audio track to a game of concentration I'm coding. I want the sound to occur when the user has won the game. How do I go about doing this? I would really appreciate the help, ...
3
votes
2answers
454 views

Is there any reason for doing back face culling in software?

I, a newbie, have been doing back face culling in javascript for my WebGL app because I didn't know gl.cullFace() existed. Is there any reason to use software-based culling instead of just passing all ...
8
votes
2answers
4k views

How to handle multiplayer in JavaScript?

I'm just doing a bit of research into tech to use for a mobile multi-player game. It's more an experiment at present so for the moment, the only thing that Players need to be aware of is the other ...
5
votes
2answers
619 views

Is it sound to use javascript for cross platform game scripting instead of lua? I might need web clients for my game

I have been looking around for clues on the subject but I'm not convinced to commit to javascript as my primary scripting language. Currently I have started with lua. But I fear it will be a limiting ...
1
vote
2answers
244 views

How can I center a circle around a point on an HTML canvas?

I've got a job to make an engine and light game for canvas in HTML5. I like the things I make to be centered on the x,y positions I give it, I don't know why, it just helps me think about them ...
1
vote
1answer
1k views

Has anyone used PhoneGap to make 2D games for the iPhone? [closed]

I love simple casual games. I've been riding the bus a lot recently and so simple, no-brainer games are great fun and well worth the small price I pay on the App Store. It got me thinking... I know ...
4
votes
2answers
1k views

Calculating the angular direction from velocity

I'm trying to calculate the angular direction of a projectile, knowing it's X and Y velocity I can find the magnitude of its movement, but I'm having a hard time wrapping my mind around getting the ...
0
votes
1answer
625 views

Tile Map Coordinates

I am have now this code: http://jsfiddle.net/DK67k/2/ In here is 2D tile map and when you click on tile you get coordinates on alert. But for get precises coordinate you need click on top left ...
7
votes
4answers
997 views

Is a multiplayer game in JavaScript a good idea?

I wanted to make a multiplayer game that runs in the browser, and a friend of mine suggested that I should choose JavaScript as the main language. I already made a lot (registering, logging in, half ...
-2
votes
1answer
553 views

Dungeon map generator not working in javascript

I am trying to convert this dungeon algorithm from java into javascript, however, my script works 70% of the time. When it works, the rooms are missing a wall on one side, and when it does not work, ...
1
vote
2answers
654 views

HTML5 collision with images

Can anyone please help me out with a small test game I'm creating. I'm basically creating this game to learn a few things about HTML5 and so far it's all been good. I've been able to create a canvas ...
0
votes
1answer
667 views

Need help making a semi-simple javascript game [closed]

I'm currently trying to make a fairly simple game in JavaScript and it isn't going too well. Before I started, I thought I'd only need to know three things (on top of what I already know) which were: ...
10
votes
9answers
17k views

What are some good jquery/javascript game engines? [closed]

So I have decided to try a bit of javascript/html5 game development (worked with XNA/Unity so far). Wondering if anyone had any suggestions. I am currently looking at impact, gameQuery and Jaws. ...
0
votes
1answer
563 views

Minimalistic JavaScript sprite manipulation libraries

Are there (or can someone recommend) any minimalistic JavaScript based libraries for sprite(s) manipulation? Preferably DOM oriented.
1
vote
2answers
4k views

Find all Game Objects with an Input string name (not Tag)

I'm trying to mimic FindGameObjectsWithTag with FindGameObjectswithName. I know using tags is faster, but I'm trying create a way to search for objects I spawn with a child object I name on ...
7
votes
3answers
840 views

Are commercial javascript games sensible?

So I love javascript as a language and how it is able to be run anywhere. I'm gonna enumerate my concerns: Does it make sense to make money from javascript? I mean, the second I publish my game ...
3
votes
2answers
3k views

HTML5 canvas screen to isometric coordinate conversion

I am trying to create an isometric game using HTML5 canvas, but don't know how to convert HTML5 canvas screen coordinates to isometric coordinates. My code now is: var mouseX = 0; var mouseY = 0; ...
3
votes
2answers
615 views

Converting Doom maps to JSON [closed]

This is a really cool demo of a Canvas Doom Engine made back in 2006: http://canvex.lazyilluminati.com/84/play.xhtml Here is the e1m1 map in JSON format: http://canvex.lazyilluminati.com/84/map1.js ...
7
votes
2answers
2k views

Is there a simple way to do true isometric projection with an HTML5 canvas?

Is there a simple way to get a true isometric projection with the HTML5 canvas element?
4
votes
4answers
10k views

How to protect source code when game is developed in HTML5/Javascript [duplicate]

Possible Duplicate: How do you prevent your JavaScript / HTML5 web game from being copied or altered? If a game client is developed in Javascript, the source code can be found in browser. ...
-5
votes
2answers
454 views

Is it possible to integrate Action Script 3.0 with Java Script and PHP for an online browser game?

My client wants a browser based online game, languages which are known to me are Java Script PHP and Action Script and also My Sql. Game is quite like Farmvile as far as functionality is concerned.I ...
2
votes
2answers
287 views

For timed levels, how do you determine time steps that are less than 1/(frames per second)?

I have made a simple HTML5 racing game. The laps are timed. I am running the game are 40 frames per second, each frame represents 40 milliseconds. There for my timer will increase in 0.025 ...
5
votes
3answers
7k views

Where is the Aves game engine?

The Aves game engine made a splash last spring/summer, with very impressive demo videos. I went back to check on them, and it looks like their site has long since died. Google also doesn't seem to ...
6
votes
2answers
944 views

Scrolling Box2D DebugDraw

I'm developing a game using Box2D (javascript implementation - Box2DWeb), and I would like to know how I can pan the debug draw. I know the usual answer is - don't use debug draw, it's just for ...
1
vote
1answer
424 views

V8 JavaScript Engine and Mac App Store

If I embed the V8 JavaScript Engine in my game is it still possible to distribute it in the Mac App Store?
2
votes
2answers
555 views

Simple Math Multiplayer game - is Ajax sufficient?

I'm planning to create a simple math multiplayer game and I plan to just use Ajax for the server/client communication but I'm not sure if this is sufficient or if I need a socket server. The game ...
4
votes
2answers
916 views

Experience embedding javascript

I'm looking into scripting languages to embed in my game. I've always assumed Lua was the best choice, but I've read some recent news about embedding V8 as was considering using it instead. My ...
1
vote
1answer
226 views

How to promote my free javascript game? [duplicate]

Possible Duplicate: Effective marketing strategies for independent game projects I created a javascript game for browsers. Do you know easy ways to promote it?
4
votes
3answers
2k views

Chrome Angry Birds engine?

Was Chrome AngryBirds game made using html5 canvas? And if yes: what kind of engine did they use?
5
votes
4answers
709 views

Browser-board-game and server push

I want to start developing a browser game. Not for success, just for the sake of doing it and learning something from it. Now, a point where I have serious problems figuring out how to deal with it ...