"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. ...
43
votes
18answers
15k 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
...
13
votes
8answers
4k 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 ...
17
votes
5answers
3k views
Implementing features in an Entity System
After asking two questions on Entity Systems (1, 2), and reading some articles on them, I think that I understand them much better than before.
But, I still have some uncertainties, and mainly they ...
2
votes
1answer
656 views
Shoot a bullet towards cursor - top down 2d
I am making a 2D topdown shooter game, in which the player's movement is controlled with WASD and gun with the mouse. I'm having a hard time figuring out how to update the position of the bullet as it ...
27
votes
9answers
9k 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 ...
14
votes
4answers
3k views
Simple noise generation
I'm looking to generate noise that looks like this:
(images courtesy of Understanding Perlin Noise)
I'm basically looking for noise with lots of small "ripples". The following is undesirable:
...
8
votes
3answers
1k views
Why is it a bad idea to store methods in Entities and Components? (Along with some other Entity System questions.)
This is a followup to this question, which I answered, but this one tackles with a much more specific subject.
This answer helped me understand Entity Systems even better than the article.
I've ...
7
votes
3answers
1k 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.
...
11
votes
4answers
2k 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 ...
17
votes
6answers
2k views
Essential knowledge for making HTML/JavaScript-based games
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 ...
3
votes
5answers
3k 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 ...
8
votes
3answers
2k views
Entity Component System based engine
Note: I'm programming this in Javascript, but it should be language agnostic in the most part.
I am thinking about converting my engine to an ECS based one.
I get the basic idea (note: this is ...
6
votes
4answers
1k views
Is there a way to increase the collision check efficiency of a system of n objects?
I'm making a game that consists of many onscreen objects, one of which is the player. I need to know which objects are colliding every iteration.
I made something like this:
for (o in objects)
{
...
7
votes
4answers
799 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
8answers
1k views
HTML5 game obfuscation
HTML5 games have viewable source code. Is there a way to make them like swf file?
How to hide the game algorithm?
What do you think of the Firefox JavaScript Deobfuscator Plugin and obfuscation?
1
vote
7answers
522 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?
3
votes
2answers
530 views
canvas ball physics animation
I want to animate ball in html canvas like this.
ctx.beginPath();
ctx.arc(75, 75, 10, 0, Math.PI*2, true);
ctx.closePath();
ctx.fill();
start position is left top corner and ball's maximum ...
1
vote
4answers
3k views
Transform coordinates from 3d to 2d without matrix or built in methods
Not to long ago i started to create a small 3D engine in javascript to combine this with an html5 canvas.
One of the issues I run into is how can you transform 3d to 2d coords.
Since I cannot use ...
29
votes
20answers
4k 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 ...
9
votes
8answers
11k views
What are some good jquery/javascript game engines?
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.
...
8
votes
4answers
1k views
Staggered Isometric Map: Calculate map coordinates for point on screen
I know there are already a lot of resources about this, but I haven't found one that matches my coordinate system and I'm having massive trouble adjusting any of those solutions to my needs.
What I ...
13
votes
6answers
3k 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
642 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 ...
18
votes
6answers
2k views
Anti-cheat Javascript for browser/HTML5 game
I'm planning on venturing on making a single player action rpg in js/html5, and I'd like to prevent cheating. I don't need 100% protection, since it's not going to be a multiplayer game, but I want ...
5
votes
4answers
7k 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. ...
4
votes
3answers
634 views
List of 3D libraries based on WebGL
Is there a up-to-date list of WebGL libraries or articals with comparison?
Until now I heard only tree.js and GLGE.
3
votes
3answers
229 views
Semi Fixed-timestep ported to javascript
In Gaffer's "Fix Your Timestep!" article, the author explains how to free your physics' loop from the paint one.
Here is the final code, written in C:
double t = 0.0;
const double dt = 0.01;
double ...
3
votes
3answers
352 views
What is better for the overall performance and feel of the game: one setInterval performing all the work, or many of them doing individual tasks?
This question is, I suppose, not limited to Javascript, but it is the language I use to create my game, so I'll use it as an example.
For now, I have structured my HTML5 game like this:
var fps = ...
3
votes
3answers
2k 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;
...
2
votes
3answers
1k views
Get points on a line between two points
I'm making a simple space game in JavaScript, but now I've hit a wall regarding vectors.
The game view is top-down on a 2d grid. When the user clicks on the grid, the space ship will fly to that ...
2
votes
4answers
471 views
Javascript Audio solution
still has issues. Flash works but... requires flash (an issue for iOS). What do you use in Javascript for audio?
5
votes
1answer
273 views
Jump handling and gravity
I'm new to game development and am looking for some help on improving my jump handling for a simple side scrolling game I've made. I would like to make the jump last longer if the key is held down ...
4
votes
2answers
4k 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 ...
1
vote
1answer
448 views
javascript game loop and game update design
There is a main game loop in my program, which calls game update every frame. However, to make better animation and better control, there is a need to implement a function like updateEveryNFrames(n, ...
1
vote
3answers
619 views
What Javascript game engines are out there, other than Impact? [closed]
Does anybody know of a decent (meaning preferably free ;)) alternative to Impact? Any suggestions are very much appreciated!
-1
votes
1answer
1k 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 ...
7
votes
1answer
147 views
Javascript keyDown - no event approach
I'm making game in JavaScript. I have canvas for drawings and game loop. I'd like to make method readKeyboard, in game loop, to check if there is any pressed key. I don't want to attach event to ...
5
votes
3answers
961 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 ...
4
votes
3answers
366 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 ...
3
votes
5answers
645 views
How can I imitate interaction and movement in Diablo II?
I'm prototyping a simple browser-based game. It's played from a top down perspective on a 2d canvas.
You left-click on a point on the map, and your character will begin walking to it. If you click ...
2
votes
1answer
59 views
Stop music in crafty.js
How do I stop a looping music file from playing in crafty.js? I want the music to stop playing once a gameover condition has been reached.
2
votes
3answers
558 views
Is there a HTML/JS game engine/library that deals with things (HUD, menus, accounts, etc) other than the core gameplay?
I've been looking through the many HTML/Javascript game engines/libraries out there (many of which are found here https://github.com/bebraw/jswiki/wiki/Game-Engines). Most of them seem fairly ...
1
vote
0answers
275 views
shader-based particle systems
I have a classic particle system where each particle is represented by a quad and, each time step, I move each particle.
My target is webGL which means I don't have instancing, attribute divisors nor ...
1
vote
2answers
563 views
Matrix rotation of a rectangle to “face” a given point in 2d
Suppose you have a rectangle centered at point (0, 0) and now I want to rotate it such that it is facing the point (100, 100), how would I do this purely with matrix math?
To give some more specifics ...
1
vote
1answer
134 views
How can I clear explosions in my function?
Hi I have a function to place bombs, and a for loop that places explosions on the tiles where possible.
My problem is that I can't remove the explosions after a while. I've tried everything I can ...
0
votes
1answer
126 views
javascript function with game engine
I have coded my main menu for the game in html/css and need the image buttons to function with the engine using JavaScript.
For example:
Skip (Enable) Which skips the menu when you come back to play ...
0
votes
2answers
386 views
How legal would it be to use some elements of the Half Life universe in my non comercial, indie game?
I'm planning to make a simple, HTML5 game, that would use some elements of the Half Life universe. Basically, it would be a 2D Portal clone, but it would have it's own story, and portals would be ...