"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

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
449 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
606 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
243 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
623 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
988 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
550 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
649 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
660 views

Need help making a semi-simple javascript game

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
561 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
834 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
614 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
452 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
285 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
927 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
421 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
554 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
904 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
224 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
706 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 ...
4
votes
2answers
217 views

JS: Should I have an upper limit to the number of update cycles per sec?

I'm making a javascript game engine for fun and one thing I noticed was that my laptop runs super hot with the simplest game mechanics and that my game is doing about 600 updates per second. The ...
8
votes
3answers
2k views

Web workers for HTML5 game physics simulation?

A bit related to this question. The idea is to guarantee the same physics behavior as much as possible. Would it be possible to run fixed time step physics on a web worker? The UI would update ...
3
votes
2answers
3k views

Smooth animation on a persistently refreshing canvas

Yo everyone! I have been working on an Isometric Tile Game Engine in HTML5/Canvas for a little while now and I have a complete working game. Earlier today I looked back over my code and thought: ...
4
votes
3answers
428 views

How do I prevent loop that moves character to run twice? (Javascript)

I managed to make a simple loop to move my character, onmousedown I move the character diagonally to where the user clicked. It's working but my problem is that I don't know how to prevent more loops ...
5
votes
2answers
372 views

Am I on the right track with Pong?

I'm a web developer who is trying to know more about game development. I've started trying to make Pong using canvas, just to see how far I can go (and what I can learn along the way). I have heard ...
4
votes
1answer
630 views

Unity Deactivating a gameObject

I'm trying to deactivate an GameObject when a certain variable reaches a certain value. It is an imported FBX and doesnt have a MeshRenderer. I'm trying to stop it now with ...
6
votes
4answers
2k views

Text-based game using JavaScript and/or PHP

I'd like to make a simple text-based game using either JavaScript or PHP. Ideally I'd like to be able to render ASCII text in a kind of blackscreen "console" style (think console roguelikes such as ...
4
votes
1answer
2k views

Unity MouseWheel weapon change

I am trying to make a simple weapon change in Unity3D. The best way to do this is with the mouse scroll wheel, as far as I can see. I googled on how to do this and found that I have to use ...
2
votes
7answers
542 views

Is there a fundamental technical reason for Flash being a more popular game platform than JavaScript?

Both Javascript and AS3 are implementations of ECMAScript. Is there a fundamental technical reason for Flash being so much more prevalent as a game-publishing platform, when compared to Javascript?
2
votes
2answers
1k views

How can I get my first-person character in Unity to move to a ledge with an animation?

I'm trying to get this to happen: The character walks up to a large crate, the player presses a button, and an animation starts playing where the character climbs up on to the crate. (all in first ...
12
votes
4answers
5k views

Ledge grab and climb in Unity3D

I just started on a new project. In this project one of the main gameplay mechanics is that you can grab a ledge on certain points in a level and hang on to it. Now my question, since I've been ...
5
votes
2answers
914 views

Arrays for a heightmap tile-based map

I'm making a game that uses a map which have tiles, corners and borders. Here's a graphical representation: I've managed to store tiles and corners in memory but I'm having troubles to get ...
7
votes
2answers
751 views

Capitalizing on JavaScript's prototypal inheritance

JavaScript has a class-free object system in which objects inherit properties directly from other objects. This is really powerful, but it is unfamiliar to classically trained programmers. If you ...
1
vote
1answer
2k views

Multiplayer game with Cocos2d-Javascript and Node.js

It is possible to make a multiplayer browser based game using cocos2d-javascript + node.js? If so, is there any tutorial about that?
10
votes
3answers
2k views

How do I generate terrain like that of Scorched Earth?

I'm a web developer and I am keen to start writing my own games. For familiarity, I've chosen JavaScript and canvas element for now. I want to generate some terrain like that in Scorched Earth. ...
9
votes
4answers
3k views

How to implement mouselook in the browser?

I am currently creating a 3D first-person shooter game in the browser using WebGL. How would I implement mouselook/free look for such a game?
2
votes
1answer
1k views

Separate shaders from HTML file in WebGL

I'm ramping up on WebGL and was wondering what is the best way to specify my vertex and fragment shaders. Looking at some tutorials, the shaders are embedded directly in the HTML. (And referenced via ...
0
votes
1answer
144 views

Strange javascript error when using Kongregates API

In the hopes of finding a fellow unity3d developer also aiming for the Kongregate contest.. I've implemented the Kongregate API and can see that the game receives a call with my username and presents ...