"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

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
543 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
915 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
754 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
146 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 ...
14
votes
8answers
6k views

How should I sort images in an isometric game so that they appear in the correct order?

This seems like a rather simple problem but I am having a lot of difficulty with it. What should I do to properly sort images in an isometric game? In a normal 2d top-down game one could use the ...
2
votes
4answers
511 views

Javascript Audio solution

still has issues. Flash works but... requires flash (an issue for iOS). What do you use in Javascript for audio?
15
votes
6answers
5k views

Are there any alternative JS ports of Box2D?

I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library. I ...
1
vote
1answer
3k views

Translate object in world space usings it's local rotation

I'm using Three.JS to render some objects. I'm struggling with some very simple object rendering and translation. The scenario is that I spawn an object at 0,0,0 in world space with 0,0,0 rotation. ...
3
votes
2answers
5k views

HTML5 - check if font has loaded

At present I load my font for my game in with @font-face For instance: @font-face { font-family: 'Orbitron'; src: url('res/orbitron-medium.ttf'); } and then reference it throughout my JS ...
2
votes
2answers
881 views

How do I employ an arcball to allow the user to look around the screen?

How do I apply an arcball (using quaternions) along with mouse events, to allow the user to look around the screen using the o3d WebGL framework? This sample uses the arcball for rotating the ...
1
vote
3answers
1k views

Where to start, to develop an online Backgammon game?

I would like to develop a backgammon game to play against other players online, as a way of learning more Javascript/jQuery and a little game development. I'm a web developer and most of my experience ...
20
votes
7answers
9k views

HTML5 Game (Canvas) - UI Techniques?

I'm in the process of building a JavaScript / HTML5 game (using Canvas) for mobile (Android / iPhone/ WebOS) with PhoneGap. I'm currently trying to design out how the UI and playing board should be ...
0
votes
1answer
636 views

HTML Canvas drawing - Firefox error

I am getting the following error ONLY when running my game in Firefox (3.6) Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage] ...
1
vote
1answer
507 views

Javascript injection problems to beat my game! HELP

So I have a web application game that runs completely on the client side and just returns the score back to the server to list the highest scorer. Now I have noticed that I can easily manipulate the ...
22
votes
12answers
14k views

Isometric game engine in JavaScript/HTML5 [closed]

Is anybody aware of any stable-ish (ie out of alpha) isometric drawing engines for JavaScript/HTML5? I have done some Google searches and found a few, but they were mostly in alpha/invite-only ...
22
votes
3answers
6k views

Double buffering on HTML5 Canvas game?

My simple canvas game seems to work fine on Chrome and FF on Mac/Linux. I haven't had chance to test it on smart phones or Windows environments yet. It doesn't use double buffering but I have seen ...
5
votes
3answers
1k views

Securing JavaScript / PHP game data

Followup to securing-http-data-from-a-javascript-game-to-server. I'm working on something similar, in that I have a PHP backend and a JavaScript frontend, which plays around with the HTML5 canvas ...
6
votes
7answers
2k views

How long till HTML5 canvas becomes a viable game development platform?

So I have been working on web application. So invariably what it boils down to is making simple games which were previously based on flash or openGL. Now I know apple was moving away from flash ...
4
votes
2answers
535 views

jquery ondrag map load only what has not been viewed

When a person mouse down, moves the mouse, and mouses up the system gets the different in the mouse down coord and the mouse up coords and loads in the new map items. However, the problem is it loads ...
15
votes
6answers
4k views

Do any open source JavaScript 3D physics engines exist? [closed]

I'm working on a web-based 3D FPS game using WebGL, HTML5 and JavaScript. It is supposed to target PCs and net-books with WebGL-enabled browsers installed. I'm wondering if there's an existing open ...
6
votes
2answers
853 views

What is the best way to debug and profile a web application on an iPod in Mobile Safari?

I've built a web app that makes heavy use of JavaScript and HTML5 canvas. It's easy to debug in Chrome, but on a mobile device the developer tools are much less robust. Is there a tool or technique ...
15
votes
7answers
3k views

How does one optimize an HTML5 Canvas and JavaScript web application for Mobile Safari?

I've created an HTML5 Canvas and JS game that runs great on a desktop or laptop in Chrome (30fps), but on mobile Safari I only get around 8 fps. Are there any simple tips or tricks to increase the ...
8
votes
3answers
3k views

Online board game engines [closed]

I would like to create an online implementation of a board game. What engines could I use to write the game and make it easily accessible to as many people as possible? I would like it to be as ...
6
votes
3answers
1k views

multi touch on HTML5 with JavaScript?

How action game controls should be implemented so that they would work on smart phones as well? At the moment I use wasd/arrow keys and I am able to handle for example two keys down at the same time. ...
2
votes
1answer
372 views
8
votes
4answers
1k views

Securing HTTP data from a JavaScript game to server

Suppose I am doing a JavaScript game, and I wish the game to update the server if the user has successfully completes the game and his outcome. How should I ensure that the request came from the ...
7
votes
3answers
3k views

Tips for communication between JS browser game and node.js server? [closed]

I am tinkering around with some simple Canvas based cave flyer game and I would like to make it multiplayer eventually. The plan is to use Node.js on the server side. The data sent over would ...
46
votes
18answers
22k views

What are good JS libraries for game dev? [closed]

If I decide to write a simple game both text and graphical (2d) what libraries would I use? (Assume we are using a HTML5 compatible browser) The main things I can think of Rendering text on screen ...
8
votes
2answers
2k views

Top down space game control problem

As the title suggests I'm developing a top down space game. I'm not looking to use newtonian physics with the player controlled ship. I'm trying to achieve a control scheme somewhat similar to that ...
28
votes
9answers
12k views

How do you prevent your JavaScript / HTML5 web game from being copied or altered?

I'm in the middle of planning a game built using JavaScript and HTML5. I'm having trouble understanding how you could prevent someone from simply copying the JavaScript from the web server and ...
7
votes
3answers
5k views

Binding C++ and V8 Javascript from Google

The examples are quite challenging to grasp if you are still getting your head around other things, so the simplest example would be great. Is there a simpler example?
17
votes
6answers
2k views

Essential knowledge for making HTML/JavaScript-based games [closed]

I was wondering if any experts out there could share the knowledge and resources of what is necessary to start making games with the latest HTML standards and JavaScript (or what some like to call ...
33
votes
20answers
5k views

Examples of good Javascript/HTML5 based games [closed]

Now that Flash is largely being replaced with HTML5 elements (video, audio, canvas, etc.) are there any good examples of web-based games built on completely open standards (meaning Javascript, HTML ...