Revived the 2D DOM Context

1 view
Skip to first unread message

bfat...@gmail.com

unread,
Dec 17, 2009, 11:06:41 PM12/17/09
to The Render Engine
After making the decision to drop the 2D DOM context, I have decided
(after some refactoring made it possible) to bring it back. Another
reason being that the Effect Engine (another Javascript game engine)
uses the DOM and there's a noticeable speed difference. However,
instead of doing manipulations on the client-side, they are pre-
rendering on the server side.

I'm not really trying to complete with them, and while the engine was
recently put on Reddit and people played a direct comparison in their
comments between The Render Engine and the Effect Engine, it made me
think about how best to support the DOM. With some refactoring of the
code and some additional internal changes, I was able to revive the 2D
DOM context. This doesn't mean you'll be able to drop it in and
expect the same capabilities as the canvas context, but it will
eventually support more functionality (such as DOM transformations).

The Wii example has returned to using the DOM context as its default,
but it can be changed to use the canvas context by setting the
"context" query parameter to "0". Along the same lines, the text
rendering demo can be switched to use the DOM context by setting the
"context" parameter to "0" as well. The only text renderer that works
in the DOM context is the ContextText renderer (at the moment). At
some point I may get the BitmapText renderer working in the DOM
context as well.

Anyways, this is a fairly big change so I wanted to let people know so
that if something unexpected blows up -- this might be why.

- Brett

Rodrigo Moraes

unread,
Dec 18, 2009, 7:00:45 AM12/18/09
to the-rend...@googlegroups.com
On Fri, Dec 18, 2009 at 2:06 AM, wrote:
> After making the decision to drop the 2D DOM context, I have decided
> (after some refactoring made it possible) to bring it back.  Another
> reason being that the Effect Engine (another Javascript game engine)
> uses the DOM and there's a noticeable speed difference.

I would not worry too much about performance on action games, not
right now. At this time, I think JavaScript is more suitable for board
/ turn-based / puzzle / logic games. We could think on this as a call
to build great infra-structure for these kinds of games.

-- rodrigo

Brett Fattori

unread,
Dec 18, 2009, 10:10:43 AM12/18/09
to the-rend...@googlegroups.com
I just wanted to revive it as a talking point.  As I said, I'm not trying to compete with anyone, but the ability to do sprite based games is appealing to a lot of people.  And with the new DOM transformations, I think the DOM canvas will be even more appealing.  For now I'm just bringing it back.  It won't see any real enahncements until at least v2.0 of the engine.

- Brett


--

You received this message because you are subscribed to the Google Groups "The Render Engine" group.
To post to this group, send email to the-rend...@googlegroups.com.
To unsubscribe from this group, send email to the-render-eng...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/the-render-engine?hl=en.



Reply all
Reply to author
Forward
0 new messages