Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am working on a really simple online version of the parachute shooters game that was preprogrammed on old iPods. I'm pretty new to game development and so at first I tried to build the whole game with jQuery, so each object in the game was a div, etc. I had seen an online snake game written that way and it worked pretty well. That wasn't really working for me, so I scraped it and am now going with doing it all in canvas.

What would be the best way to go about making that game? As of right now, I am using setInterval() to act as separate threads controlling the user's pellets and the falling parachutes separately. Is that a good idea? Is there a better way to do it?

Thanks for any feedback.

share|improve this question

closed as off-topic by Jari Komppa, Anko, Noctrine Apr 21 at 14:57

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Jari Komppa, Anko, Noctrine
If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

up vote 1 down vote accepted

I would go for a draw function that is called in interval. And for the game objects you deal with them in an array and updates them in your loop. Then if you want to have good performance try to only redraw the part of the canvas that is needed to be updated.

Here is a good tutorial http://jlongster.com/Making-Sprite-based-Games-with-Canvas

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.