Jump to content

jquery 2d platform game without canvas


Recommended Posts

Hi everyone,


i was wondering what libary best to use to make a platform 2d game with just divs

so not using the canvas.


and then more just focussed on the physics and that the player stays in the middle of the screen when moving.


i want to try to create a game with the html5 tool of adobe, edge animate. 

can someone help me further with this? already found a solution for the collision detection.

Link to comment
Share on other sites



OK first off the best way to do this would be to use a canvas element, so there isn't really a 'best library' for doing what you want to do, it would just be for fun.


I would suggest using velocity.js in place of JQuery's .animate, if you're really set on doing this. You could also try to use CSS animations (check out this I saw the other day), which might work more efficiently, though I know very little about how to write them.


If you're keeping the player in the center, what's happening is the rest of the world is being translated around him (so to speak) as opposed to the player being translated through the world. Particularly here it might be more efficient to just animate the player div, rather than all the other divs in the world. You can bind keys with jquery also, but for simple games development this small library is useful.


I've never used Edge Animate before, so I'm afraid I can't help much there, but again it looks like it's a tool designed for something different to what you want. Maybe if you posted what you have I could have a clearer idea of what you want to achieve and help more.


Hope that wasn't too negative, I would love to try and help more if I could :)

Link to comment
Share on other sites

I too think this would be useful, although from what i hear - Using jQuery to handle things like animations may not be the best idea though as what i've heard, it's not so good when animating like 100+ Elements at once. (It'd be easy to animate and move things about in plain JS anyway) - I'll have to create a benchmark for that to try it out actually.

I used to use DIV's even when Canvas was early days, it can actually work wonders, you'd be suprised. You just have to programme things the right way and be careful on animating and moving, and also generating/removing divs/sprites all the time.
Like for example theres no need in deleting a platform sprite and recreating it each tick/frame - Just move things that have changed, and hide/show & reuse them later on (If they are a common sprite for example, the clouds)


Hope it helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...