CSSQuake

(cssquake.com)

459 points by msalsas14 hours ago

42 comments

  • jedberg10 hours ago
    This is an awesome achievement, but I can't help but notice that Quake ran smoother on my Pentium-133 PC in the 90s than it runs on my Mac M1 Pro...
    • amatecha39 minutes ago
      Err, strange, what browser? I'm using Firefox on a ThinkPad from 2018 running Linux, and cssquake was running at a smooth 60fps just now (and at 1080p resolution vs the 320x240 or 320x200 someone would likely be running on a P133)
    • poisonfountain10 hours ago
      This engine is not optimised for performance. It's using CSS, after all.
      • Insanity10 hours ago
        Yeah this is a case of “not the right tool for the job”.<p>It is awesome though.
      • jedberg9 hours ago
        Of course, but you&#x27;d think after 30 years the compute power should be enough to overcome any lack of optimization. It&#x27;s a testament to the engineering that went into the original Quake engine.
        • culi9 hours ago
          Decades of optimizing a toaster to make better toast will not make the toaster any better at making meatloaf
          • libria7 hours ago
            Is this the right analogy? The product is the same, the appliance is different.<p>It should be &quot;Decades of inventions from toasters to IOT AI Smart Air Fryers will not make better toast than the original&quot;<p>But I&#x27;d argue the IOT AI Smart Air Fryer should make really good toast. Which is what GP is saying.
            • culi1 hour ago
              I stand by my analogy.<p>Both a toaster and an oven might benefit from improved electronics but in the end—whether its a toaster from the 60s or a toaster from 3008—you are still using a toaster to make a meatloaf.<p>CSS is not remotely comparable to a game engine. It&#x27;s not even a programming language.
            • matt_kantor5 hours ago
              It&#x27;d be like if the IOT AI Smart Air Fryer had a constraint of only being allowed to use friction to create heat.<p>CSSQuake uses an intentionally-absurd rendering pipeline. It&#x27;s not surprising that the result is sub-optimal.<p>(Though I agree that the meatloaf analogy is not very good.)
          • rustystump8 hours ago
            I am on the ground. This is great.<p>Still, why css is as slow as it is given what tech like imgui can do is a little wild.
            • harrall8 hours ago
              CSS is a general rendering solution, not something built for rendering 3D games.<p>And no one has spent any time optimizing 3D transforms to make a game workable because no one would be able to justify the use of their time like that. It wouldn’t even give you brownie points ‘cause most people would just ask “why?”
              • Akronymus7 hours ago
                Id assume &quot;a fun challenge&quot; could be enough of a reason
    • jamal-kumar8 hours ago
      For what it&#x27;s worth it works like smooth butter under Chrome on an M2, on Safari it&#x27;s clunky and seems to clip alot
    • jeroenhd5 hours ago
      Zero issues on Firefox + Linux. Gnome Web is stuttery and weird, though. Must be a WebKit&#x2F;Safari thing.
      • jedberg5 hours ago
        Possibly, I did it on Safari. Trying it now on Chrome and it&#x27;s fine.
    • DanielHB9 hours ago
      Wait, did Quack run on Pentium-133? I had a Pentium MMX 233mhz and I always assumed it didn&#x27;t ran well so I never bother to get it.
      • iamphilrae9 hours ago
        If you had a 3dfx card it would run silky smooth on a Pentium-120 (what I had at the time)! Quake 2 ran pretty well too if I recall.
        • jklp1 hour ago
          Yep 3dfx was a game changer. Was night and day on my 486 DX4 100 with and without
      • bluedino8 hours ago
        Bare minimum for it being playable was a 486DX4 100MHz or similar, but with the floating point Quake really wanted a Pentium
        • Garlef8 hours ago
          I played it on a Pentium with 60mhz - it was allright
      • bitwize49 minutes ago
        I ran it on a Pentium 60. If you stuck to 320x200 it ran fine.
      • MrFurious5 hours ago
        I played quake in 486dx100.
      • lightedman9 hours ago
        Quake ran on a P75 with 8MB RAM in DOS mode. Not the best but it worked at 320x200.
      • jedberg9 hours ago
        It must have, because that&#x27;s what I had in 1996 and I played it.
      • lizknope6 hours ago
        Ran fine on my Pentium 90 with 16MB RAM
      • UltraSane9 hours ago
        Quake ran well on my 100Mhz Pentium.
    • to11mtm8 hours ago
      Either you had a Voodoo on your P133 or whatever the M1 is doing is having a bad time...<p>On my 7945HX this is plenty fast.
    • api3 hours ago
      Quake compiled in C will run insanely fast at 8K full resolution on an M1.
      • jedberg2 hours ago
        You wouldn’t happen to have a pointer on where to get this version would you?
    • jonplackett9 hours ago
      I think you’re missing the point
  • AzzieElbab13 hours ago
    Awesome! Harder to exit than vim.
    • pgt8 hours ago
      In case you want to view the menu, press Tab. Click outside menu items to resume game.
    • deskamess11 hours ago
      how did you exit? because nothing seems to be working.
      • calgoo11 hours ago
        Back button worked for me
      • ChrisClark11 hours ago
        I pressed escape, then just closed the tab
      • axus11 hours ago
        I pressed Esc key, click quit. And then closed the browser tab.
  • badsectoracula10 hours ago
    Impressive. I guess this isn&#x27;t only the renderer made to use CSS but also a full recreation of the engine and logic right? My guess is because a bunch of things do not behave like the original game, e.g. some buttons need to be shot instead of touched to activate, some secret doors open by touching them instead of being shot, etc.
    • rofko4 hours ago
      Hi there! Thanks for the report, buttons should work properly now.<p>Regarding the game logic, the build step has a small JS extractor over QuakeC&#x2F;progs.dat to generate JSON source facts: states, models, attacks, sounds, etc. The browser runtime is TypeScript and consumes those for Quake-ish gameplay.
    • slopinthebag6 hours ago
      No it’s just the renderer. The game itself is Typescript.
  • jojogeo11 hours ago
    This is the first thing I&#x27;ve seen on the intertubes for a &#x2F;long&#x2F; time which genuinely makes me smile, thank you op.<p>Checked out <a href="https:&#x2F;&#x2F;cssdoom.wtf&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cssdoom.wtf&#x2F;</a> and loved it too, both are far lighter than current affairs. \o&#x2F;
  • remix200013 hours ago
    It seems like this CSS Quake needs JS to run…
    • rikschennink6 hours ago
      Maybe possible with <a href="https:&#x2F;&#x2F;lyra.horse&#x2F;x86css&#x2F;" rel="nofollow">https:&#x2F;&#x2F;lyra.horse&#x2F;x86css&#x2F;</a> ?
    • zamadatix9 hours ago
      CSS does the rendering, the game logic is TypeScript.
  • divan12 hours ago
    As someone who passionately and ardiently hates prolifiration of this set of _hacks on top of hacks_ called CSS (and CSS&#x2F;JS&#x2F;HTML aka Web-stack), I must say this is good and valid use case for CSS. :)
  • edwinjm13 hours ago
    Is this a rip from <a href="https:&#x2F;&#x2F;github.com&#x2F;NielsLeenheer&#x2F;cssDOOM" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;NielsLeenheer&#x2F;cssDOOM</a>
    • OuterVale12 hours ago
      Separate projects. Niels Leenheer who made CSS Doom has seen Agustin Capeletto&#x27;s CSS Quake.<p><a href="https:&#x2F;&#x2F;bsky.app&#x2F;profile&#x2F;html5test.com&#x2F;post&#x2F;3mok5febchs2g" rel="nofollow">https:&#x2F;&#x2F;bsky.app&#x2F;profile&#x2F;html5test.com&#x2F;post&#x2F;3mok5febchs2g</a>
      • pantelisk8 hours ago
        And I think both have seen these much older handcrafted css3d engines<p>- <a href="https:&#x2F;&#x2F;pantel.is&#x2F;projects&#x2F;css3d&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pantel.is&#x2F;projects&#x2F;css3d&#x2F;</a><p>- <a href="https:&#x2F;&#x2F;keithclark.co.uk&#x2F;labs&#x2F;css-fps&#x2F;" rel="nofollow">https:&#x2F;&#x2F;keithclark.co.uk&#x2F;labs&#x2F;css-fps&#x2F;</a> (the original)<p>but quake and doom took it to the next level :)
    • degamad13 hours ago
      The source appears to be &lt;<a href="https:&#x2F;&#x2F;github.com&#x2F;LayoutitStudio&#x2F;cssQuake" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;LayoutitStudio&#x2F;cssQuake</a>&gt;
  • sgt12 hours ago
    Very cool. I wonder what the limitations are? I see the dog I shot is floating in the air. Is that maybe a CSS thing or is it fixable?
    • freakynit12 hours ago
      .dog { display: float; }
      • skvmb11 hours ago
        You win! I laughed way too hard at this. Boss man is now giving me the side eye.
    • amatecha37 minutes ago
      Damn, always gotta deal with these accursed z-index issues with CSS ;)
  • ulrischa6 hours ago
    Though this is impressive, I think this is something that should not be possible with a declarative styling language
    • slopinthebag6 hours ago
      Its just using CSS for the rendering, not the game logic.
  • glerk7 hours ago
    Wow this is really awesome. Really really smooth. It&#x27;s insane how after 25 years or so my muscle memory is still intact.
  • jacobgold9 hours ago
    No light theme though?
  • gpderetta13 hours ago
    Nice, but the view keeps clipping out to far ahead of the map (but the character seems to still be in its original position as I can die from monsters). It snaps back in place when I shoot.<p>edit: both on chromium and firefox, desktop linux.
  • crimsonnoodle5811 hours ago
    Amazing and impressive use of CSS. But at the same time, makes me appreciate what feat Carmack achieved 30 years ago on early Pentiums.
  • aggregator-ios9 hours ago
    Wow, this is impressive. 60FPS, MacBook Air M1. I was instantly hooked and so much nostalgia.
  • elinear7 hours ago
    I noticed my cursor was continuously sliding upward first in Neal.fun&#x27;s latest canvas multiplayer game and I experienced it here as well. Anyone else see this behavior?<p>And maybe a skill issue but I was unable to jump out of the slime...
  • jdw6411 hours ago
    I wish I could use CSS this well too
    • MattCruikshank10 hours ago
      Don&#x27;t worry, OP still can&#x27;t center a div.
      • qingcharles10 hours ago
        I was centering divs just fine, but now they took away Fable and I&#x27;m lost.
      • jdw6410 hours ago
        I think I&#x27;ve finally found something in common between OP and me
  • stoobs13 hours ago
    Seems like you get stuck on corners and it really doesn&#x27;t like running up&#x2F;down slopes, neat though.
  • boredemployee9 hours ago
    I still play quake (world) to this day. I just can&#x27;t quit it.
    • amatecha34 minutes ago
      Hell yeah, I still see it as the optimal arena FPS. The sequels add too much IMO. Quake 1 (QuakeWorld) was such a raw competitive arena shooter that is just pure action, no weird extra mechanics. Pick up items, get some health, shoot people. Q2&#x2F;Q3 are totally fine too, but I feel like QW really just nailed everything.
  • joehabeebs2 hours ago
    Really impressive
  • ChrisArchitect12 hours ago
    Show HN: from the dev (who&#x27;s also in here, maybe a title update) <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=48571117">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=48571117</a>
  • criley213 hours ago
    Really cool experiment. A lot of jank. It would sometimes rubber band me back, movement was grid aligned in a way that made accessing the secret room challenging, and the whole tab unexpectedly crashed with no error. 5 star would play again
  • xyproto7 hours ago
    Has science gone too far?
  • iandanforth11 hours ago
    Crazy, such memories. Thanks!
  • rvba8 hours ago
    After leaving the first area to the bridge... was the sky really so close to the ground in the original game, or the old monitors made it look differently?<p>Also nice achievement...!
  • kiyeonjeon12 hours ago
    how long does it take to develop this game?
  • Snoopfrogg11 hours ago
    This is dope.
  • vldszn6 hours ago
    lowkey amazing!
  • Vaslo10 hours ago
    But can it play Crysis?
  • alexb_11 hours ago
    Doesn&#x27;t work at all for me. I keep jumping around and clipping through objects, can&#x27;t even leave the first room without being stuck in the doorway to the elevator.
    • ekaryotic11 hours ago
      have to shoot the elevator buttons in this, in the original you could move into them.
  • ronbenton9 hours ago
    Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should
    • aruametello8 hours ago
      Then Tresspasser CSS next<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Trespasser_(video_game" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Trespasser_(video_game</a>
  • xenophonf13 hours ago
    Every time I click in the window, the menu disappears. I tried both Firefox and Chrome.
    • rofko4 hours ago
      Thanks for that report! It is hopefully fixed now.
  • AbraKdabra2 hours ago
    Bro how tf.<p>This is insane.
  • zuzululu9 hours ago
    this is crazy i didn&#x27;t know css could do this
  • cynicalsecurity11 hours ago
    If this is what CSS has become, it means at some point its development went the wrong way.
    • senfiaj11 hours ago
      It still needs JS. It just avoids using canvas and does DOM manipulation + CSS instead.
    • Rohansi11 hours ago
      The game logic here is running in JS. Only the rendering is handled by HTML and CSS. Is it really wrong that you can do this? All it requires is 3D transformation of elements.
  • buffer_overlord14 hours ago
    is there no sound?
    • amarant13 hours ago
      Is there a way to produce sound using CSS?
      • pwdisswordfishq13 hours ago
        <p><pre><code> @media speech { body { cue-before: url(&#x2F;path&#x2F;to&#x2F;sound.ogg); } } </code></pre> <a href="https:&#x2F;&#x2F;www.w3.org&#x2F;TR&#x2F;CSS2&#x2F;aural.html" rel="nofollow">https:&#x2F;&#x2F;www.w3.org&#x2F;TR&#x2F;CSS2&#x2F;aural.html</a>
      • Waterluvian13 hours ago
        Only screams.
    • rofko13 hours ago
      You should be able to enable sounds with the M shortcut or through the Options menu.
  • AndorinaAI9 hours ago
    lol that&#x27;s crazy. Good job.
  • cws_ai_buddy1 hour ago
    [flagged]
  • ikari_pl12 hours ago
    Wow, this will be a great project for the forever-upcoming VRML &#x2F;s
  • formit3410 hours ago
    [flagged]
  • thenthenthen13 hours ago
    Wow