1
\$\begingroup\$

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?

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

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: https://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.

\$\endgroup\$
4
  • \$\begingroup\$ 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 \$\endgroup\$
    – Romeo
    Commented Jul 23, 2012 at 1:11
  • 1
    \$\begingroup\$ Consider not using an engine, it's more than possible. developer.mozilla.org/en/Canvas_tutorial \$\endgroup\$
    – jcora
    Commented Jul 23, 2012 at 9:56
  • \$\begingroup\$ 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". \$\endgroup\$
    – Romeo
    Commented Jul 23, 2012 at 11:01
  • 1
    \$\begingroup\$ 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. \$\endgroup\$
    – jcora
    Commented Jul 23, 2012 at 16:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .