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 planning on developing a multiplayer RPG (kinda like RuneScape, but don't worry, with a different gameplay) and i want to do this in the browser. Now before saying things like "A MMORPG is hard to make" or "Others tryied that too" please keep in mind that i am not dreaming at a huge game, it's just an idea that i want to see "breathing".

The reason i choose JavaScript and HTML5 over other technologies is that i have some experience in web development (which of course includes a deep understanding of JS).

I've looked over some libraries (or so called engines) on the web and i've found some that might have what i need.

My question is: What is the best way to render this kind of game in the browser, also could you suggest me the library that you think is the most suitable for this kind of job?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

That's completely game-specific, actually.

If your game is in some very simple/discrete space, then moving divs around will do.

But if you really want to do more complex graphics without much coding, go with the standard for HTML5 games - the canvas element. Do note that many HTML5 game engines support DOM rendering, but I'm not sure to what extent, I doubt that you'll have that awesome canvas API at your disposal.

As for engines, refer to this answer: http://gamedev.stackexchange.com/a/32777/9736.

The only other comparison I can make between the canvas and the DOM is that the DOM is a bit faster, or so I hear. But really, nothing substantial.

share|improve this answer
    
The game that i have in mind will have a pretty big world which will include a lot of elements. Now, i gave RuneScape as example because i'm planning to load the world as the player moves (like they do). Returning to the engines problem: i've already tryied Crafty which IMHO is the best designed from that list, the problem seems to be the rendering as i loaded 800 tiles and then when i drag-n-drop, the movement is not so smooth. link –  Romeo Jul 23 '12 at 1:11
1  
Consider not using an engine, it's more than possible. developer.mozilla.org/en/Canvas_tutorial –  akled Jul 23 '12 at 9:56
    
What about a canvas library? Should i use an already made canvas library for rendering? I remember that the person who got me into web developing told me once "stop tryin' to reinvent the wheel". –  Romeo Jul 23 '12 at 11:01
1  
You're not reinventing the wheel. And even if you were, that would be good for learning. Start low, and then make your way up. Go to my GitHub and get some loaders and other useful scripts, if you want. The link is on my profile page. –  akled Jul 23 '12 at 16:02
1  
Thank you very much! –  Romeo Jul 24 '12 at 13:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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