7 ms·
Porting Doom to the Fastly edge serverless platform
- tyingq 5y agoCool write up, but no short demo or repo? Or did I somehow miss that?
- ozten 5y agoI'm unsure it is the same project, but I did find https://developer.fastly.com/solutions/demos/doom/ https://developer.fastly.com/solutions/demos/doom/
- exikyut 5y agoAh, thanks. I just checked the source of the OP linked page, and this link is not in the page anywhere. Likely an unintentional omission!(?) I'd suggest callouts in <h1>s myself, ideally at the start and the end of the article. -- As an aside, it's... reasonably fast, but not playable. And all the monsters appear to have quietly been turned off, and because the game loop can't see your exact keystrokes you can't cheatcode them back on :P
- ipsum2 5y agoProbably because they can't scale it? Which is ironic for a serverless provider. Seeing: > Too many players; retrying in 27 seconds.
- mekkkkkk 5y agoIt's just an absurd tech demo, why would they want to scale it? Just to burn money?
- FartyMcFarter 5y agoTo impress people, which is probably part of the goal of this blog post.
- mekkkkkk 5y agoI think any potential customers would understand that scaling isn't the point of the demo. It's unreasonable to assume that they'd infinitely scale a processing- and bandwidth-hog like this just for fun.
- HappyTypist 5y agoAs a potential customer, scalability is definitely top of mind. If you can't scale a tech demo, then I'm not left with a good impression with a CDN which is supposed to handle millions of requests per second. It's not like Doom is that intensive, and the the bandwidth is certainly less than a single 4K stream!
- mekkkkkk 5y agoScalability is probably a concern for a lot of people, but it still doesn't make it the point of the demo. They want to show that their service is capable of even running a workload so classically local and native as a full game with half-decent latency only using edge functions. And it's a mystery why you bring up streaming and CDNs. If you think that a 4K stream poses the same challenges as stateless, real-time, non-cacheable game engine processing targeting 60 req/s, then I don't know where to start.
- grenoire 5y agoMonsters aren't turned off, it's the lowest difficulty. Going through the first door (use key is U) starts off with two grunts.
- mulmboy 5y agoThis runs super well for me. Looking at chrome developer tools it's sending out a new frame request about every 38ms. Runs much nicer than the top two google results for "play doom online".
- kailanb 5y agoSource code: https://github.com/justinliew/DOOM https://github.com/justinliew/DOOM Demo: https://developer.fastly.com/solutions/demos/doom/ https://developer.fastly.com/solutions/demos/doom/
- philipswood 5y agoServerless Doom. Cloud, clouds everywhere.
- TechBro8615 5y agoHas anyone played Doom on Ethereum?
- ec109685 5y agoIt really is serverless. The full state is passed back and forth on each tick.
- hyperman1 5y agoI was wondering about that. The DOOM savegame is not a perfect representation of the game state: A major one: Monsters forget who they were targetting after a reload. I can't play it right now but assume some consequences are: Monsters forget about you after you turn around a corner. Probably no monster infighting. Probably the revenant fireball can't home in on you either. There was also some rounding error where things on the edge of a ledge drop down after a reload. Oh well, it's a fun tech demo
- krige 5y agoRunning Doom on anything and in any form imaginable really is an artform but in this case I can't help but be reminded of the recent "Brainfuck as a Service" post ( https://zserge.com/posts/bfaas/ https://zserge.com/posts/bfaas/ )
- aidos 5y agoHa! Pointers as mongo documents is a whole new level of disturbing.
- BBC-vs-neolibs 5y agoWhat you really need here is a Kubernetes monad.
- jon-wood 5y agoNah, that's pretty sane compared to pointers as NFTs: https://github.com/zhuowei/nft_ptr https://github.com/zhuowei/nft_ptr
- tasogare 5y agoThis is very funny. Thanks for sharing, I hadn’t laugh that much this month.
- riccardomc 5y agoyou haven't read the whitepaper yet: https://github.com/zhuowei/nft_ptr/blob/main/white_paper.pdf https://github.com/zhuowei/nft_ptr/blob/main/white_paper.pdf
- mekkkkkk 5y agoThat's absolutely hilarious, thanks for sharing. "Made with :heart: by a Blockchain Expert who wrote like 100 lines of Solidity in 2017 (which didn't work)" I died.
- dividuum 5y agoI don’t know how larger the game state/save game is, but if it’s small enough for a url parameter, they might even use their CDN for caching, as I would assume the same state always results in the same game output. If you don’t deviate from paths of previous players, you could sail along a cached path, no computation required :)
- HappyTypist 5y agoClever idea but as things like your position and camera angle are floats, there are virtually infinite gamestates.
- mysterydip 5y agoDOOM still used fixed point arithmetic at the time for speed, so it could be a large set but not as big as floats. You could also drop a few bits of precision off the LSB and make your search space that much smaller.
- TheSoftwareGuy 5y agoFloats are still represented in 32 bits, or 64 for doubles
- dividuum 5y agoThat would approximate infinity quite fast once you move around a few steps :-) I guess limiting rotation to 64 steps would be enough, but even then the state space grows exponentially. So it's not really useful in the end, but that fits the project, I guess.
- kevincox 5y agoBut you have to multiply that by the possible locations on the map and the enemy states. I imagine it would be possible to get a few hits at the starts of levels but I suspect that the vast majority of the frames for any play-through have never been seen before.
- MaxBarraclough 5y ago
- taneq 5y ago"Remember Doom? I love that game, but is there any way we could make it less... well... efficient?"
- TeMPOraL 5y agoHow to define an arbitrary thing as a computing platform: - Get a Hello World running on it. Proves it can compute. - Write Snake or Asteroids for it. Proves it can be used as a computer. Alternative for web & mobile developers: write a TODO app for it. - Port Doom to it. Proves it can do much more, and much faster, than what people are using it for.
- SketchySeaBeast 5y ago"You know what I was thinking runs too fast these days? Doom. Let's get that puppy back to the 486 days." I assume that was the same conversation that caused people to release a 100% Ray Traced Quake 2.
- cpach 5y agoCool! Hadn’t heard of that before. Here’s a link for the curios: https://www.pcworld.com/article/3398919/quake-ii-rtx-on-a-geforce-rtx-2080-ti-card-ray-tracing-performance.html https://www.pcworld.com/article/3398919/quake-ii-rtx-on-a-ge...
- deleted 5y ago[deleted]
- johnklos 5y agoNeat idea, but the term "serverless" is still incredibly stupid and misleading. Go ahead and run any of this stuff without a server. Go ahead. I'll wait.
- gogopuppygogo 5y agoIPoAC might fit your serverless communication requirements: https://en.wikipedia.org/wiki/IP_over_Avian_Carriers https://en.wikipedia.org/wiki/IP_over_Avian_Carriers
- kevincox 5y agoYou can choose to deny it but you are using a very outdated definition of serverless. The modern definition is that you don't need to think about physical machines. You only worry about the code and running that code is someone else's problem. I agree that this isn't the best word for it because the etymology is suggesting that there are no severs but language is about how it is used, not the letters that make it up. Even wikipedia agrees: https://en.wikipedia.org/wiki/Serverless_computing https://en.wikipedia.org/wiki/Serverless_computing
- bserge 5y agoSounds to me like adding yet another middleman to pay. Why?
- cle 5y agoBecause the middle man does stuff for you like emergent OS patching, secure log handling, request routing, TLS termination and cert distribution, zonal redundancy and failover, access control, etc.
- bserge 5y agoI grew up with having to do all of that myself. It's really not that hard, a minor part of running a website/service/app. Why would I give up more control? Just a machine (bare metal or virtual) and the domain are enough... Guess I'm old now heh
- woeirua 5y agoThis is one of those projects that sounds neat at first, but the more you think about it you're left with an overwhelming question of why. Since serverless platforms charge you per API call this would be tremendously more expensive than just about any other approach that already exists today as the game would be making tens of thousands of API calls per user per session.
- CyberDildonics 5y agoI don't know if it even sounds neat at first. It's just layers of nonsense.
- mekkkkkk 5y agoIt's just a silly way of showcasing capability. No one thinks this is a useful project. It's just impressive that it's possible.
- mwcampbell 5y agoIf kentonv or someone else at Cloudflare is paying attention, I think Doom would make a good demo for Cloudflare's new edge containers (currently in private preview) [1]. Edit: Or maybe Doom would be a good demo of Workers Unbound and Durable Objects. After all, Fastly just demonstrated that Doom can be ported to wasm, so it clearly doesn't need a whole Linux container. [1]: https://blog.cloudflare.com/containers-on-the-edge/ https://blog.cloudflare.com/containers-on-the-edge/
- matsur 5y agoThe first internal demo of containers involved a bunch of CF employees playing Quake running on the edge :)
- daxfohl 5y agoDoes this load the entire wasm binary each request or does it stay warm while playing?