-1
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

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

| improve this answer | |
\$\endgroup\$

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