Questions tagged [gamequery]

gameQuery is a jQuery plugin to aid JavaScript game development.

gameQuery is a jQuery plugin to help with JavaScript game development.

22 questions
6
votes
2 answers

Detecting whether two divs overlap

Possible Duplicate: How to detect if two divs touch with jquery? I've spent a lot of time trying to figure out how to detect if two divs are overlapping. I tried the gamequery plugin and used it like this: $("#" + checkform).collision("#" +…
Johannes Flood
  • 735
  • 3
  • 7
  • 9
3
votes
2 answers

Collision detection between Divs

I am running into some troubles with my simple Brick Breaker game. I made a simple animation for my ball object but I have a hard time with it detecting when it comes into contact with other elements on the page. Not to mention, I can't seem to keep…
2
votes
2 answers

in gamequery I am trying to move a selected object with mousetracker by clicking on the object, and dragging it

I know I can use mousedown selection for it, but I am wanting the clicked on sprite to follow my mouse, there is a mousetracker function of sorts mentioned in the api; but unfortunately there are no examples of this other than stating that it allows…
j.gooch
  • 305
  • 1
  • 4
  • 21
1
vote
1 answer

How to stop an animation in GameQuery

I have one image animation started using GameQuery. Now I want to stop the animation. For that, I have used the following code. imgAnimation["myimage"] = new $.gameQuery.Animation({imageURL: imgPath + "test.png", numberOfFrame: 3, delta: 130, rate:…
UVM
  • 9,776
  • 6
  • 41
  • 66
1
vote
1 answer

reversing animation in Gamequery

Is there a method to reverse animation sequence in GameQuery. Currently, if we specify the number of frames in, it will assume that from left to right. Can we start animation from right to left? How to choose one out of the multiaminations ?
UVM
  • 9,776
  • 6
  • 41
  • 66
1
vote
1 answer

GameQuery Collision Detection

I am having a problem with GameQuery (jQuery) collision detection Tthey just never seem to fire?!? I have checked all the .arrow's exist and the same for the .bot's but it just never seems to call the function I have the below code in my main…
Pez Cuckow
  • 14,048
  • 16
  • 80
  • 130
1
vote
1 answer

how to make text within a div unhighlightable

I know this question has been asked before, but the answers simply did not work I tried adding the jquery disable selection code here, it did not work jQuery.fn.extend({ disableSelection : function() { return this.each(function()…
j.gooch
  • 305
  • 1
  • 4
  • 21
1
vote
1 answer

gamequery collision issue

Let me start by saying I am a complete newbie to js I am taking a class and one of our assignments is to make a basic race game. We are able to use any scripts we find so I chose gamequery. The premise is that the players are completely automated…
flatty
  • 13
  • 5
0
votes
1 answer

gamequery collision detection doesnt react

i created 2 sprite objects and want to check if they collide, but it doesnt seem to work. My code: creation of the sprites:** .addGroup("flying", {width: 366, height: 254}) .addSprite("flyinganimation",{animation: flight, posx:…
0
votes
1 answer

JQuery mousedown issue

What I am trying to achieve is changing the way a player moves in a JQuery game. Rather than a keypress I am trying to get the player to move if they click/mousedown on text, with id "left". Original code is as follows. …
MartinH23
  • 13
  • 3
0
votes
1 answer

JQuery (using gamequery) to recognise click rather than keypress?

I'm using gamequery to create a game, however, the documentation has nothing about using a click instead of keypress. http://gamequery.onaluf.org/documentation.php I wanted to setup 4 images (left, right, up, and down arrows) and once clicked, it…
MartinH23
  • 13
  • 3
0
votes
2 answers

gameQuery collision detection

it is the first time for me to explore jQuery and gameQuery for building games using JavaScript, so am asking about sth that might look very naive, but really i cant get it. i am developing a game like Space Invader, the detection for collision…
Samer Makary
  • 1,815
  • 2
  • 22
  • 25
0
votes
0 answers

gameQuery error : Cannot read property 'children' of undefined

I am new to JQuery and gameQuery so I have probably got lots of things wrong, please bear with me. I was just following the tutorial to try to learn how to make web games but since the tutorial was slightly outdated, I needed to change some things.…
Rolodophone
  • 813
  • 1
  • 7
  • 10
0
votes
2 answers

Increase efficiency of a loop with jQuery

I have a game coded in jQuery where bots are moved around the screen. The below code is a loop that runs every 20ms, currently if you have over 15 bots you start to notice the browser lagging (simply because of all the advanced collision detection…
Pez Cuckow
  • 14,048
  • 16
  • 80
  • 130
0
votes
1 answer

Javascript(gameQuery game) how can I get the next bottom element in the tilemap?

how can I get the next bottom element (id, class) of a selected tile without to loop through the whole tilemap? E.g.: my tile $('.gQ_tileType_4') is a rock in the game and this should be fall down if the next bottom tile $('.gQ_tileType_8') a space…
lortschi
  • 2,768
  • 2
  • 18
  • 12
1
2