-
-
Notifications
You must be signed in to change notification settings - Fork 262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
div-based renderer #30
base: master
Are you sure you want to change the base?
Conversation
Hi @uzudil, I do not exactly see the point of having a DOM-based display backend. What is its purpose? |
Hi, |
If you check out the open issues there's one where I submit some code for handling per-tile colors. It's not the fastest option, but it's the most general. It's not been merged in yet, but perhaps you can use it in your own code and dodge having to write a div-based renderer. |
Thanks I will check that out. In my experience the 2d canvas pixel operations were very slow, esp. on mobile devices. The DOM approach while maybe not ideal from a code-cleanliness perspective work reasonably well in most browsers. |
@uzudil If the colorization/tinting is the issue, you should definitely check out @troygilbert 's code in #22. The pull request itself is not merged and forgetting about it is my fault. Not all issues relevant to that feature are resolved, though (the per-pixel vs. globalCompositeOperation, for instance). Independently on how the colorization feature turns out in pullrequest #22, I strongly recommend modifying the existing As far as the performance is concerned, I would be interested in some benchmarks showing how many DIVs outperform a single . That would be surprising (but not impossible in these strange times of varying JS/HTML perf across devices) for me. |
I think that it would be nice to have more then one renderer and user will be able to pick one when he create a game. I personally will want to have html/text based renderer that will fit application that use jQuery Terminal. Also html based renderer will support copy (which will be like text based screenshot). |
@jcubic can you please fix the link to the jQuery Terminal? I truly see no actual benefit in rendering text via HTML means. |
I made a div-based renderer that can display bitmaps + light color via an overlay. The main benefit I see in this is that it would also work on tablets that don't support webgl. I will make a webgl-based renderer also in another fork. Thanks for considering!