Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Konrad Pilch
2,435 PointsjQuery games
Hi,
Did any of you made any jQuery games?
I was thinking about having a character that moves + jumps, like Mario, and you can have two weapons that will change and animate when you hit, like space and cross-bow and have enemies, obstacles, maybe some plane that will go above the ground that can shoot lol
Im just curious if you can make a game like that with jQuery? it sound a lot of fun and could learn a lot with jQuery while having lots and lots of fun. Id like to go into Obj-C in future but i could take an early approach with jQuery :D
And do anyone have osme examples build with jQuery? but peoper examples.
Konrad Pilch
2,435 PointsWow :D Maybe id do my self a dream arcade game in jQuery :D
Thank you!
Konrad Pilch
2,435 PointsThis is cool. Got it moving up , down, right, left :D awesome, now jsut need to ads some coins and points lol
I like jQuery or JS.
1 Answer
eck
43,038 PointsWhile you can make a game using jQuery I would not recommend it for most types of games. The DOM, which is what jQuery manipulates, was not designed for to handle many, constant visual changes. Changing the DOM causes it to be repainted and it is not particularly efficient from my understanding. If your goal is just to learn, however, then it is totally worth doing :P
Should you want to make more robust web games you will want to learn how to work with the canvas element. It is the standard way to render web games as of HTML5 and there are a bunch of free libraries you can use, some of which were mentioned by Greg, such as Phaser.io.
rthvrxuktt
15,680 Pointsrthvrxuktt
15,680 PointsIt's definitely doable. You could use a jQuery plugin like gameQuery to reduce some of the heavy lifting - gameQueryjs.com
That said, I'd be inclined to go for a specialized library like Pixi.js, Phaser.io, Impact.js etc. There's a big ol' list of them here: html5gameengine.com
Note that some of those examples aren't JS based :)