Пропустить навигацию
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_webdev4 тыс. подписчиков

Открыть в 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 отметка «Нравится»