跳过导航
HTML can't run Doom But HTML can now run *inside* Doom! Thanks to HTML-in-Canvas!
0:00 / 0:26

HTML can't run Doom But HTML can now run *inside* Doom! Thanks to HTML-in-Canvas!

Robin

@solarise_webdev3984 位关注者

在 X 上查看
1,145 个赞下载原帖

115,376 次观看

HTML can't run Doom But HTML can now run *inside* Doom! Thanks to HTML-in-Canvas! Fully accessible DOM elements drawn into Doom's own wall textures. This demo uses a WebAssembly port (jacobenget/doom.wasm) of the original C source. See it in action at - Requires Chrome with chrome://flags/#canvas-draw-element enabled. On every Doom tick, HTML-in-Canvas's drawElementImage() captures the DOM form (child of ) to an offscreen buffer, it's quantised to Doom's 256-colour palette, and the bytes are written straight into the cached patch for the appropriate texture in Doom. Doom's own software renderer then paints it onto E1M1 as a wall texture - which means perspective warp, sector lighting, and even the damage-red tint all get included and applied to the HTML form elements. It's just a texture to Doom.

36 条评论

评论来自 X (Twitter) 上的原帖

  • Akuma No Tsubasa 的头像

    @totmacherx

    It's so fucking impressive what people do it with a 33 year old game. One day someone will run crysis in doom. Mark my words. Might be another 50 years but it will happen.

    8 个赞

  • cr4n3 的头像

    @metaphysicr4n3

    Yes internet is fun again. The future is bright.

    6 个赞

  • George McHorseman 的头像

    @GMcHorseman

    Sooo... emscripten? Then you get a DOM inside your DOM, so you can DOM while you DOM.

    5 个赞

  • CuddlySalmon 的头像

    @nptacek

    @codexeditor ok so now we need to run doom inside VR inside doom inside VR

    4 个赞

  • Elix 的头像

    @GenericMage_

    ❌ "Can *it* run Doom?" ✅ "Can Doom run *it*?"

    4 个赞

  • Justin Williams 的头像

    @develop_justin

    This is what the world needed. Thank you for your service

    3 个赞

  • dominik kundel 的头像

    @dkundel

    Damned I was gonna do that tomorrow 😂 nice job 👏👏

    2 个赞

  • Robin 的头像

    @solarise_webdev

    I sensed I should get in there quickly! It was inevitable 😂 Would love to see other approaches for this though. My one is pretty hacky, reused an existing texture (you can see the form texture duplicated if you head up the stairs to the left!) Interested to see how this could benefit browser-based games in general too

    1 个赞

  • undefined 的头像

    @undy_aeon

    but can you run a canvas in it and run doom inside doom?

    2 个赞

  • Air Guitarist 的头像

    @wildstrums

    Yeah but can I run a C64 emulator inside of it?

    2 个赞

  • Valentino Giudice 的头像

    @Aspie96

    > HTML can't run Doom @rebane2001, can it with CSS?

    2 个赞

  • Shaun Kahler 🥽 的头像

    @kbidata

    Omg whyyyy 😂

    2 个赞

  • Robin 的头像

    @solarise_webdev

    Had to be done! 😄

    1 个赞

  • Cole Lawrence 的头像

    @refactorordie

    @codexeditor This explanation helped me understand what "html-in-canvas" is actually doing. Neat demonstration!

    2 个赞

  • Vincent 的头像

    @VynseDev

    customer support: "please shoot at the form" 😂

    2 个赞

  • Pseudonym 🦅 的头像

    @tariusdamon

    👀

    1 个赞

  • Sync Kun 的头像

    @Stardus63556727

    Wild

    1 个赞

  • ZEUS LYKAIOS ❤️‍🔥🌲✋ 的头像

    @zeuslykaios

    noting this down

    1 个赞

  • Quaid Leckey 的头像

    @quaidleckey

    Doom 3 demake with the interactive panels when?

    1 个赞

  • Flutterwhat 的头像

    @flutterwhat

    so, what are going to be the pratical applications in this? in game interfaces that actually require internet access to function? imagine not being able to open a door becaus the game's servers shut down and they used HMTL canvas for all the screens in the game

    1 个赞