fr/en
gameQuery 0.1

Je viens de publier sur le site de plugins pour jQuery une version préliminaire de gameQuery. Il s'agit d'un plugin qui rend le développement de jeux en javascript plus facile. Le but est de fournir une alternative a flash dans certaine situations.

L'usage de jQuery et de ce plugin permet une approche plus haut niveau et cross-browser de la gestion de l'affichage du jeux.

Vous pouvez trouver la page pricipale de gameQuery ici

Voici une demo technique de l'usage de gameQuery:

tags >> javascript, jeu permalink >>commentaires >> ajout

nom:
e-mail ou homepage:
commentaire:
Justin StanczakTotally awesome work. I'll have to try this out sometime. Thanks for the great api.
weepyHi great stuff.

Does it support IE6 with transparent pngs ?

Really needs to! - I know a way to get CSS sprites to work with transparent pngs on IE6 without using background position (as it doesn't work with IE6 Filters)

cheers

jonah
SelimThanks. I haven't done anything to make it work on IE6. So transparency shouldn't work for PNG. You could use GIF however... But from the test I've done IE6 is way to slow with this to have something playable and for now I don't have plan to fix that in the near future.
DerFichtlReally nice work. I've created a Pong clone and a blog post about it.

http://bohuco.net/blog/2008/10/12/playing-around-with-gamequery/

Thanks and best regards from austria
Rafael C.P.Hi, Selim! Very good work! I have some code that may help you with the sound feature: http://www.inf.ufrgs.br/~rcpinto/tetris/sound.js
It tries to use 3 different forms of sound control commands, so it works with Quicktime, Real Player, Active Movie, Live Audio and MediaPlayer sound plugins. (you can see it working on my tetris game on the base folder). If you make any progress with the sound features, just let me know please!

PS.: there's an old version commented below the actual code.

PS2.: if you need anything, just leave a comment on my blog!
raistI have stared porting of our game to gameQuery:
http://www.honeyblaster.com
and i must say "it is easy and cool!" :)
raistAnother good solution for sound play:
http://www.schillmania.com/projects/soundmanager2/
SelimWow, HoneyBlaster looks very nice, thank you for using gameQuery! SoudManager2 is a great tool but it uses flash and I think that one of the purpose of gameQuery is to work in a flash-less environment so I would very much like to find another way.
DaveWe've made a few changes to the sound support to use gameQuery in our game, RedLine - its at http://www.vertigo-project.com/projects/redline-game

Thanks for the great plugin :D
Andrew Wooldridgeis this project in SVN or something? Would you accept code changes/updates?
cageI'd have some additions to gamequery.
It would be very nice to have a forum or some kind of development place where people could contribute.

great project!
SelimHi cage,

the google code page of the project can be used to participate. If you want to be given the right to commit you'll need a google account (contact me per email). There is a mailing list for contributing developpers to. I will create a forum when I find some time but it's not my highest priority :)
Greg StevensonHi Selim! I'm one of the main organizers for preDevCamp.org and I'd like to talk to about getting GameQuery some exposure with the Palm webOS developer community.

Regards,
Greg
DorukaiI think that addSprite should be seperated into two functions: preloadSprite and addSprite. I want to be able to preload a sprite without having it render itself as soon as the game starts.
Dorukaipossibly by having preloadSprite create an invisable sprite on the page, and having addSprite copy such an image based on an input ID
DorukaiGreat work. I'm going to use this in my isometric engine, IroniK.
Just one thing: I'm not sure I like the QuickTime audio. There's NOTHING wrong with using Flash. Really. If the whole point of not using Flash is to use only Javascript, what are you doing using Quicktime? Just use SM2 for petes sake!
DorukaiAnd Flash is available on the Wii and the DS opera browsers now.
Selim@Dorukai You don't need to add a sprite to preload the image. This is done each time an animation is created with "new Animation(...)". This animation needs not to be associated with a sprite for a preload to occurs.

For the sound I thinks I will drop support for anything else but the HTML5 "audio" tag. If you want to use SM2 it shouldn't be a real problem anyway.
chrisSo i've been following your tutorial on the site, and nothing happens at all that has to do with gamequery. Jquery things work, jquery background animations work (using seperate lib), but it appears as though loading the gamequery library has absolutely 0 affect on my project at all. I'm using version 0.3.0 Might perhaps changing to an older version work? i'm so lost and frustrated at my lack of progress. i've been at this for over an hour now.
Selim@chris Hi! Have you called the $().playground().startGame() function ? Until you've done this nothing should run. If you look at the examples this is done when the user click the "Click here to start!" text. If this isn't you error don't hesitate to contact me by email: gamequery AT onaluf DOT org
vcoolHi this is Great !!!
I really love your work, and i want to try this to create a game based on jquery and gamequery.

Just wondering if its support multi player ? im kinda new javascript, but im pretty sure i can, just need some advise and direction ..

Thanks once again :)
Selim@vcool Multiplayer is not taken care by gameQuery since it's only a client side library. But it quite easily done by doing some round trip to the server and coding your multi player logic server side. Easiest way would be to register a periodic callback that submit the player information each 200ms (for example) and get back the info about other players using AJAX.
matt pelhamI'm using it. / Je utilizer.

http://www.fokistudios.com/zombies/
Selim@matt pelham: nice one! I'm adding a link to you game in the gamequery page.
SenDoes collision detection work with jQuerys.animate function? If yes, how would you implement that?
Selim@Sen collision works only for sprites generated by gameQuery by the addSprite() method. The way the sprites are moved around should not affect the detection mechanism. Let say you want the sprite "player" to move from left: 200px to left: 300px you could write:

$("#player").animate(left:0 '+=300');

and register callback to use the collision method:

$.playground().registerCallback(function(){
$(#player).collision().each(function(){/* do something*/})
, 30});
AlanHello Salim,
très bluffant ce projet, félicitations.
J'ai même l'intention de l'utiliser. Par contre je n'ai pas trouvé un code d'exemple pour faire un sorte qu'un acteur soit "au centre" de l'écran, et que le décors bouge en fonction des déplacements de cet acteur (un peu comme la démo de Matt Pelham's).
Est-ce possible de le faire ? Et si oui, faut-il coder ses propres fonctions ou est-ce possible directement par l'API de gamequery ?

Bonne continuation.
Selim@Alan Hello et merci!
Cet effet est tout a fait possible. Il y a plusieurs manière de le faire: tu peux ajouter à ton playground un groupe (qui contiendra tout le décor) et le sprite du joueur. Ainsi en déplaçant le décor (comme tu déplacerait un sprite, avec .css("left", ...) par exemple) tu laissera le sprite du joueur sur place. ce n'est pas plus compliqué que l'inverse!

Si tu souhaite des explication plus précise ou de l'aide pour autre chose n'hésite pas a poster, en français si tu préfère, dans le group google du projet (http://groups.google.com/group/jquery-gamequery).
Aaron WinbornStarted a Drupal project for this excellent plugin at http://drupal.org/project/gamequery

Thanks for the great work!
bitographyPlease keep up the good work and development. We need this, a good opensource javascript/jquery gaming framework. All of the others are being bought up :) gameQuery FTW !!
EganSelim, I am almost finished with my first game using gameQuery 0.5 and am of course excited to show you! I want to finish the sound using jPlayer instead of soundManager2 but haven't gotten it working. jPlayer uses HTML5 (with a fallback to Flash) and currently works on all of my iPhone/iPad projects using multiple sounds -- so it seems a perfect match for gameQuery. Although for my gameQuery game, I have not been able to figure out how to create a sound-wrapper for jPlayer nor have I figured out how to get it working in conjunction with gameQuery otherwise. Do you think you can please consider a gameQuery+jPlayer solution and help me/us :) with our obsession? Bon couragé
Selim@Egan Thanks for you encouragements! I remember having started a wrapper for jPlayer some time ago but I think I never finished it, maybe because I couldn't get the looping to work. I will try again and keep you updated about my progress!
liste des tags