jQuery is a cross-browser JavaScript library that facilitates DOM traversal, event handling, animation and AJAX interactions.
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
1answer
460 views
Rotate arrow on canvas
I need to draw a flow dynamically based on some user choices. In that flow I want to draw the choices (blue circles with number) and the directions of that choices (line and arrow). For example: node ...
1
vote
0answers
242 views
Simple track method for 2D car game? [closed]
I'm a new programmer and I am trying to make a 2D car game on an html5 canvas with javascript and JQuery. I have got the basic car motion down, check it out here:
...
0
votes
0answers
103 views
Balancing fight script in Text Based Javascript Game
I'm working on a little text based javascript game and I've been using chromes Javascript console for the output. The 'game' works off a series of methods written into an object called Player created ...
0
votes
3answers
709 views
Add a Countdown Timer that increments in JavaScript and resets per level(Resovled)
I am currently developing a Simon says type game using jquery and javascript.
I have linked a fully copy of the game on github
Github download and unzip to see the game fully ...
0
votes
1answer
64 views
Get speed from vector using box2d and javascript
I need to find the speed of an object in a game. The game is made in HTML5 with jquery and jquery.box2d.
For this I can use these methods:
GetLinearVelocity().x;
GetLinearVelocity().y;
I'm then ...
0
votes
0answers
42 views
changing sprite coordinate when defining a new reel in crafty.js
this is my jsfiddle : http://jsfiddle.net/B5UsC/18/
this.bind('KeyDown', function () {
if (this.isDown('A')) {
this.__coord[0] = 57;
...
0
votes
1answer
70 views
confusion in animating a sprite sheet using craftyjs
can anyone help me with this : http://jsfiddle.net/B5UsC/15/
you can see that the sprite animation is not rendering correctly and i am guessing that i am not using the exact width of the sprite ,i ...
0
votes
1answer
315 views
jQuery - calculate map polygon Width and Height
Let's say I have this map:
<map name="diffmap1" id="diffmap1" class="myMap">
<area shape="poly" coords="152,347,253,292,264,307,167,358" class="diff diff1">
<area shape="poly" ...
0
votes
1answer
232 views
jQuery - div border around map area
Let's say I have this map:
<map name="diffmap1" id="diffmap1" class="myMap">
<area shape="poly" coords="152,347,253,292,264,307,167,358" class="diff diff1">
<area shape="poly" ...
0
votes
1answer
105 views
setting a time delay between two frame when animation a sprite sheet
this is my jsfiddle :http://jsfiddle.net/Z7a5h/
As you can see the animation of the sprite sheet when the player is not moving is too fast so i was trying to make it slow by declaring two variable ...
0
votes
1answer
92 views
How to change the start position of my 2D game
I am trying to create a game where you have to move a ball on a platform. At the start of the game, the ball is dropped on the platform and then you can move it around. This is al working, no problems ...
4
votes
4answers
870 views
How do I write a simple 2-player server?
I've recently started learning JavaScript and HTML and developed simple 2-player game such as tick-tack-toe, battleship, and dots & boxes. However, these 2P games can only be played on one ...
-1
votes
1answer
409 views
View port for my canvas game
I am developing a canvas game, and im struggling to get my head around how i can make a view port so when the character moves the world moves with it.
Unlike traditional 2d maps built with arrays i ...
4
votes
1answer
517 views
Working principle of an RPG map
I am currently thinking of building a basic browser-based 2D(that would eventually become 2.5D) RPG. I have planned everything and I think that would be able to accomplish the current goals, but it ...
-1
votes
2answers
288 views
Game library for 2D animation JS browsergame [closed]
I am developing a 2D multiplayer online browsergame.
On the backend I have set up a Node.js server. Everything works perfectly.
On the frontend I will use jQuery and several libs for collision etc. ...
2
votes
2answers
2k views
Receiving keyboard events on a canvas in Javascript
I need to receive keyboard events in a canvas element. Click events are received but key presses aren't.
Here is my code which doesn't handle key events:
var canvasElm = $('canvas');
...