Search Explore
  • stevenhubertron · 3 years ago

    Very cool. Of course the music is retrowave.

        • lstodd · 3 years ago

          Try Welle: Erdball it'll blow your mind

          • owlninja · 3 years ago

            Strong agree for something to work to. I was into vaporwave a few years ago but really love the whole outrun, synthwave, %wave stuff for working. Darksynth if I am really having to get after it!

              • theandrewbailey · 3 years ago

                5 years ago, after deliberately looking for new music, I realized that synthwave was the music that I had spent my entire life searching for.

            • kdazzle · 3 years ago

              Thats’s awesome. Kind of reminds me of this vector-y 80s game I had as a little kid - the Tomy Turbo [1]. I’ve been trying to make something similar myself but keep pushing it aside. Anyways, nice work - it looks great!

              [1] https://m.youtube.com/watch?v=1aCeg-EbOAI

              • aabbccsmith · 3 years ago

                This is the sort of thing I'd leave on an unused monitor all the time or have on display somewhere. Really cool aesthetic

                  • mdswanson · 3 years ago

                    Me too...though in the arcade and on the 2600.

                  • xyzzy_plugh · 3 years ago

                    Relaxing except the cars are driving on the wrong side, at least for me.

                    • kevinmchugh · 3 years ago

                      Weirdly I had the idea to do the same thing, including doing it in js, a year or so ago. This is much nicer than what I'd pictured. Mine would've been set to Kamasi Washington's Clair de Lune.

                      https://youtu.be/KqJJ-2cRR0M

                      • willhinsa · 3 years ago

                        This reminds me of the movie Drive (2011), in particular the first song on the soundtrack, Kavinsky - Nightcall

                        https://youtu.be/MV_3Dpw-BRY

                        • keyle · 3 years ago

                          Wow Drive is from 2011? Man... I feel like it's a new movie. I loved it, maybe that's why.

                          • moffkalast · 3 years ago

                            Well it is a new movie, at least by period standards.

                            Broadly speaking you've got the B&W era until the 70s, the "old classics" recorded in colour on actual film up till the 90s, then the period of questionable CGI and campiness up till somewhere like 2005 when what we feel like is new/recent cinema starts. The ongoing era of decent invisible CGI, quality digital cameras, and post-9/11 hopelessness.

                            It's why I still watch a lot of 90s/early 2000s movies, there's just something different about that era that feels nice.

                            • uhtred · 3 years ago

                              the period of questionable CGI and campiness is over? Have you seen the never ending churn out of marvel "movies"?

                              • TOGoS · 3 years ago

                                Having grown up with the crappy "Jurassic Park somehow pulled off what no other movie of the time did" CGI of the 90s, the effects in the Marvel movies look pretty seamless up to the point where people's fingers start shooting green lightning or whatever. The nature of their plot holes and overall dumbness feels different, also. Much more polish, to the extent that I can almost ignore how stupid the whole thing is when I'm watching one. Almost.

                            • Bakary · 3 years ago

                              I think we get that "goddamn years are going by" feeling with movies especially because they are connected to a specific year yet are disconnected from other memories (unless you brought your crush to one of them maybe)

                              • Bakary · 3 years ago

                                I can't tell you what originated the aesthetic, but it's not Drive because some songs on its soundtrack were already part of the established aesthetic.

                                It's definitely one of the major works in that world, however.

                                • pcthrowaway · 3 years ago

                                  I was thinking of this song exactly before I turned on the music; thought it might even be the same song for a second. I wonder why the (visual) aesthetic is evocative of this song?

                                  • jcynix · 3 years ago

                                    Very nice! I instantly recognized the tune but from a completely different event, namely

                                    https://youtu.be/wkF9w86XXKU

                                    That's the cover by band London Grammar and TIL about the original one. Didn't know about the movie which now is on my todo list, thanks.

                                    • nickkell · 3 years ago

                                      I remember Alt-J performing a cover of "A Real Hero", another song from the Drive soundtrack, at Glastonbury festival years ago. The film and soundtrack were really cool.

                                      • mckirk · 3 years ago

                                        Incidentally, that song was written with Chesley Sullenberger in mind, the pilot of US Airways Flight 1549, which he glide-landed in the Hudson River.

                                        That guy is a real hero, and apparently a real human bean.

                                        • aleksiy123 · 3 years ago

                                          Real human bean. Love this movie.

                                        • rezmason · 3 years ago

                                          I'm amused that we share initials and a passion for this kind of project! Mine's https://rezmason.github.io/drivey .

                                          One key difference: this guy built his demo from scratch, whereas mine's a port of someone else's work. It's great to see another implementation, with its own techniques and features.

                                          • tomcam · 3 years ago

                                            Gorgeous and hypnotic.

                                            • breck · 3 years ago

                                              Wow that's gorgeous. Is there a link to the source?

                                            • latchkey · 3 years ago

                                              Great work on this though! Super impressed. Would be fun to clean it up and convert to typescript.

                                              • luismedel · 3 years ago

                                                Honest question. What do you see "not clean" in the original code?

                                                • latchkey · 3 years ago

                                                  Good question. The honest answer is that I don't know and that's the problem.

                                                  A compiler would tell me what all the types should be and if they are being respected. I'd also write a lot of unit tests to make sure that the code is doing what it is expected to as well as enable refactoring more easily. The code isn't formatted consistently, so that also makes it hard for me to read, I'm kind of OCD about that and having tools like eslint/prettier, which do it automatically, makes this super easy to fix. Linting the code would also point out other issues that the compiler misses. Putting it into CI would ensure that all changes get checked and builds would fail, if there are issues.

                                                  So I guess that is what I mean when I say 'clean it up'.

                                                  • latchkey · 3 years ago

                                                    Update: Getting a lot of downvotes (yes, I know against HN 'rules' to comment about that), but I don't get why people dislike my response so much and would love feedback on that (similar to how the OP asked for honest feedback).

                                                    What I did was pull the source code, load it up in IDEA, convert the .js files to .ts files. Then looked at the errors. Most of what stood out was that the author included a copy of threejs directly and used parts that TS can't infer types on. Not a huge deal, but makes following the code more difficult for sure. I don't think it would take too much time to update it at all.

                                                    • rezmason · 3 years ago

                                                      If you compiled me, you'd know that you are a type who I respect ;)

                                                      I think you're right on many counts, and I appreciate the effort you took to see what TS could do for this kind of project.

                                                      If you create an issue on the repo, I can notify you if I make an attempt at using TypeScript to maintain it, in a branch at least. No guarantees, but I've considered it before, and it'd be worth my time once I have some to allocate.

                                              • phist_mcgee · 3 years ago

                                                As a fan of vaporwave this is

                                                aesthetic 可ぷき

                                                • S-E-P · 3 years ago

                                                  I’m vibing

                                                • justinlloyd · 3 years ago

                                                  I do not like how your city planners put pedestrian crossings on blind curves. That's really bad design that could lead to accidents.

                                                  P.S. It's a joke. This is a really well executed demo.

                                                  • rezmason · 3 years ago

                                                    I agree, but the original creator put them in and they add some spice to the environs.

                                                    I like to joke that Australia (where Drivey originally comes from) has a low enough population that the pedestrians are in no real danger ;)

                                                  • smrtinsert · 3 years ago

                                                    This is beautiful.

                                                      • rezmason · 3 years ago

                                                        That's really neat! I like the tunnels under the giant trapezoids, they make me think of those enormous trapezoid buildings in Blade Runner.

                                                        I can't take credit for Drivey's aesthetics, I'm just honored to have carried it to HTML5 ;) Somewhere out in Australia is the original programmer who I'm sure would love to see this, but who also loves avoiding the spotlight.

                                                        I just did a quick scroll of your Twitter feed and jeez you're prolific, this stuff is really cool. I'll try Hexpress this weekend.

                                                        • aaroninsf · 3 years ago

                                                          Among "features it would be neat to add", fading timelapse smeers as in your photo of the curve would be luvly.

                                                        • mhd · 3 years ago

                                                          Oh, I think I remember the original Drivey and was following the dev blog for a while back then. But I think in the end, it didn't go anywhere (no pun intended).

                                                            • mandeepj · 3 years ago

                                                              Copied from https://www.rezmason.net/projects.html

                                                              Through the nineties, Microsoft software engineers carried on a tradition of writing clever and distinctive software projects alongside the software they were primarily tasked with writing— this is where Solitaire and Minesweeper came from, for instance. These engineers also wrote "easter eggs" into their primary software, such as the beautiful flight simulator hidden in Excel 97.

                                                              Amazed by reading the above. I'm a sucker to read and learn from that clerverness.

                                                            • neilparikh · 3 years ago

                                                              Would be neat to have eye gaze be literally controlled by where you look using webcam tracking! Not sure how accurate it would be though.

                                                              • nolok · 3 years ago

                                                                Only tengentially related but eye tracking + foveated rendering is the thing that makes me the most excited about PSVR 2 !

                                                              • zulu-inuoe · 3 years ago

                                                                That's really cool, but I wonder why on my machine is maxes out all the cores on my CPU and still runs at something like 1 FPS on high If I turn it to Low it runs okay but looks.. not great.

                                                                But I don't see anyone else having issues so, is it just me?

                                                                • enraged_camel · 3 years ago

                                                                  Same here. I've also experienced it with other JavaScript simulations. I suspect it has something to do with Chrome's hardware acceleration because it works smooth as butter on Firefox.

                                                                  • 2OEH8eoCRo0 · 3 years ago

                                                                    Sounds like a lack of hardware acceleration. My i7-1185g7 is sitting at 20% but my Intel Iris Xe GPU is maxed. Runs smooth though.

                                                                  • JKCalhoun · 3 years ago

                                                                    Was yours based on "Drivey"?

                                                                    EDIT: never mind, it looks like it was, very cool.

                                                                    • rezmason · 3 years ago

                                                                      Yep, my third attempt in ten years!

                                                                      The original was written in "JujuScript", with strong types and novel operators. I pretended it was Haxe, and ran around fixing compiler errors it till it compiled to JavaScript. I built out a small Three.js project to hook it to, built up the features, then refactored it into something I felt was maintainable. I tried preserving the organization of the original script as best as I could.

                                                                      Sidenote: I belong to the "port it" school of software preservation. My friend who runs the BlastEm project belongs to the "emulate it" school. I've seen both approaches have been employed to preserve Glider, which I think implies how important that game is to people. :)

                                                                    • flanbiscuit · 3 years ago

                                                                      interesting that this is running very slow (like 1 frame per second) on Chrome, but runs very smooth on Firefox. I'm on the latest version of both for Mac.

                                                                      • rezmason · 3 years ago

                                                                        That is very odd. I wonder what your Chrome browser's zoom is set to, that might affect its resolution.

                                                                        If you create an issue on the repo, I'll try and figure it out when I have the bandwidth.

                                                                        • flanbiscuit · 3 years ago

                                                                          Just tried it again on my work laptop Chrome (Mac, latest) and it's running smooth, so it was something with my personal laptop and not your code.

                                                                      • jstanley · 3 years ago

                                                                        Neat! I like that this is kind of the opposite effect (obviously Drivey is way more polished).

                                                                        Drivey shows objects as their silhouettes on top of a light background, whereas Nightdrive shows objects as their lights on top of a dark background.

                                                                        • rezmason · 3 years ago

                                                                          Pleased to meet you! ^_^ Nightdrive is a jewel.

                                                                          Some people are making a strong case (I think) for calling these types of projects "demos", but also, I think the inability to fit them in the arbitrary structure of existing nomenclature is a good quality for a project to have. :D

                                                                          Have you considered using a small bokeh image in place of circles in your renderer? Their size is based on the (usually unchanging) optical properties of the eye, rather than the eye's distance to the light, so you'd fade them rather than resize them, and if you round their position to the nearest pixel you might be able to draw them with 2D canvas context speedily.

                                                                        • zxcvbn4038 · 3 years ago

                                                                          That is amazing, I remember seeing an early version of this on Windows, its so great to see it revived and with source!

                                                                          • zxcvbn4038 · 3 years ago

                                                                            That is amazing, I remember seeing an early version of this on Windows and being impressed. It is great to see it revived and with source!

                                                                            • sprkwd · 3 years ago

                                                                              Yeah. That is awesome.

                                                                              • archon810 · 3 years ago

                                                                                Hmm, nothing happens for me on mobile (Chrome, Pixel 6 Pro). Just a black screen with some controls on the bottom.

                                                                              • windows2020 · 3 years ago

                                                                                transform: scalex(-1);

                                                                                It's beautiful art. The code too. Great work.

                                                                                • bee_rider · 3 years ago

                                                                                  It might be nice to have something like this with very, very limited interactions to run in the background while programming or whatever.

                                                                                  • devsatish · 3 years ago

                                                                                    Really cool . Reminds me of the VR collaboration project (Dance Tonite) by Google Data arts team and LCD Sound System https://tonite.dance/

                                                                                    • Apocryphon · 3 years ago

                                                                                      Well, that's beautiful. I remember a procedurally generated night city skyline demo that was on HN years and years ago, this is a somewhat similar endeavor.

                                                                                      • jordemort · 3 years ago

                                                                                        I love this. I'd love an idealized version where nobody ever passes on the right even more.

                                                                                        • gavmor · 3 years ago

                                                                                          Notice oncoming traffic is also on the right? It's UK traffic. For peace of mind, try tossing a `transform: scaleX(-1)` on the <canvas /> element.

                                                                                        • arduinomancer · 3 years ago

                                                                                          edit: nvm

                                                                                            • aerovistae · 3 years ago

                                                                                              > if your browser runs JavaScript:

                                                                                              I don't understand this remark. What browsers do people use that don't have javascript?

                                                                                              • b0afc375b5 · 3 years ago

                                                                                                I think it just means "if you have JavaScript enabled". But to give a technical example, Lynx doesn't support JavaScript.

                                                                                                • rezmason · 3 years ago

                                                                                                  Some people run their browsers with JavaScript turned off. Some folks disable CSS. Some even browse via Lynx, a text web browser. It seems like the author's met some of these folks.

                                                                                                  • aerovistae · 3 years ago

                                                                                                    I had never heard of Lynx, thanks!

                                                                                                  • jstanley · 3 years ago

                                                                                                    I don't like to presume :)

                                                                                                    • Bakary · 3 years ago

                                                                                                      For most people, this will mean Ublock origin settings. For a smaller number of people, stripped down greybeard-approved browsers

                                                                                                    • abetusk · 3 years ago

                                                                                                      I love this.

                                                                                                      It would be awesome to do this with a bladerunner theme. Like, sitting in a spinner going somewhere, with all the different cars, spinners and maybe buildings passing by.

                                                                                                      • aerovistae · 3 years ago

                                                                                                        > The biggest flaw is that the cars are totally transparent,

                                                                                                        This seems easily fixable, no? Just make cars opaque black and assign progressively decreasing z-index to each spawning light. (Unlikely anyone will leave page open long enough to reach min value, and you could just reset at that point.)

                                                                                                        • rezmason · 3 years ago

                                                                                                          Someone with your level of optimism has an advantage.

                                                                                                          The tricky thing is, this project's renderer is currently a queue of circles to draw to a canvas. It's under 100 lines of JavaScript. So any increase in complexity will require substantial changes, like abstracting over types of drawables.

                                                                                                          • Joeri · 3 years ago

                                                                                                            There’s probably a simple but effective way to do it, like drawing the body itself as a few black circles.

                                                                                                            • aerovistae · 3 years ago

                                                                                                              Exactly. Whenever drawing a pair of red circles for tailights, draw ~10 overlapping black circles between them. Bam. Done. I don't think this requires naive optimism, just 5 minutes of additional effort. Maybe less.

                                                                                                                • upwardbound · 3 years ago

                                                                                                                  I'm not the previous poster but thought this would be a fun challenge. No way it was 5 min though; took me at least 20 min to understand what to change.

                                                                                                                  Anyways, run this in your browser inspector to hot-patch the live demo so that each car has an opaque black circle as its body/chassis:

                                                                                                                      for (let i = 0; i < cars.length; i++) { console.log(i);
                                                                                                                          cars[i].headlights = cars[i].headlights.concat([ {xy: new V2d(0,0), z: cars[i].headlights[0].z, r:cars[i].headlights[1].xy.x, col: "black"} ]);
                                                                                                                          cars[i].rearlights = cars[i].rearlights.concat([ {xy: new V2d(0,0), z: cars[i].rearlights[0].z, r:cars[i].rearlights[1].xy.x, col: "black"} ]);
                                                                                                                  }
                                                                                                                  • aerovistae · 3 years ago

                                                                                                                    Well done, nice job rising to the challenge! I definitely did not care enough to do it myself, so I applaud you. I just tried it out and it's perfect.

                                                                                                                    To be clear, since of course this is the internet and one must be precise or else get nit-picked and "outplayed," I obviously meant 5 minutes for the author who already knows the layout of the code. Obviously. Any charitable interpretation would have taken that as a given. 25-40 minutes sounds more appropriate for a newcomer examining it for the first time.

                                                                                                                    • upwardbound · 3 years ago

                                                                                                                      Oh yeah I totally get you, I just added the disclaimer about it taking me 20 min because I didn't want people to think I was trying to brag/flex about doing it in 5 min, which I didn't do and don't want to try to claim any credit for.

                                                                                                                    • jstanley · 3 years ago

                                                                                                                      Really nice! I hadn't considered making the opaque car bodies out of circles too :).

                                                                                                                      • skykooler · 3 years ago

                                                                                                                        hmm, this doesn't seem to change anything on Firefox.

                                                                                                            • chrisco255 · 3 years ago

                                                                                                              > What game can we make where the premise is that you're a passenger on the motorway at night time? It shouldn't be a particularly taxing game, I think the main experience should still be that you're just enjoying watching the lights, but it would be cool if there was some interactivity and some sort of goal.

                                                                                                              If you wanted to make it interactive, maybe a Pokemon Snap like functionality where you try to capture photos of random environment features or creatures.

                                                                                                              • justinlloyd · 3 years ago

                                                                                                                A man running alongside your car window, jumping over obstacles. Technically this game already exists, but it would be interesting to combine with this demo.

                                                                                                              • UberFly · 3 years ago

                                                                                                                Love it. It gave me a bit of that early-internet "wow, this is really cool and new" feeling. Thanks.

                                                                                                                • IMAYousaf · 3 years ago

                                                                                                                  This is really nice. I'd actually love it as a screensaver/background.

                                                                                                                  • mortenjorck · 3 years ago

                                                                                                                    > It's not a screensaver, because it's not the 90s.

                                                                                                                    It may be 2022, but I would love a screensaver version of this.

                                                                                                                    • jcynix · 3 years ago

                                                                                                                      It would definitely fit into xscreensaver's collection, yes.

                                                                                                                      • Jaruzel · 3 years ago

                                                                                                                        Depending on your OS it should just be a matter of starting a webview with the code as the default page and running it full screen. Then a small loop looking for mouse/keyboard events so it knows when to quit.

                                                                                                                      • Method-X · 3 years ago

                                                                                                                        I want this on my Apple TV so bad.

                                                                                                                      • rajeshp1986 · 3 years ago

                                                                                                                        what an amazing concept. Thank you for making this!

                                                                                                                        • felipelalli · 3 years ago

                                                                                                                          I don't know why, but this is so cool.

                                                                                                                          • mdtusz · 3 years ago

                                                                                                                            This reminds me of this video: https://youtu.be/WrxZ4AZPdOQ

                                                                                                                            He does incredible work with shaders and explains them in very clear detail.

                                                                                                                            • ciaron · 3 years ago

                                                                                                                              I watched this video a couple of years ago and was blown away by what can be done with shaders.

                                                                                                                            • fulafel · 3 years ago

                                                                                                                              In demo terms it's an "effect".

                                                                                                                              • masswerk · 3 years ago

                                                                                                                                BTW, while we may think that driving is a universal thing, I instantly found it amazing how North American this is. From the integrated indicators, to cars passing on your right, to the road lights and even how the road undulates. Having said that, great project!

                                                                                                                                Edit: Well I got this entirely wrong and missed that this was meant to be lefthand traffic. (I caught a segment that looked more like there was an independent road passing an interstate crossing a city, rather than being opposite lanes.)

                                                                                                                                • berkut · 3 years ago

                                                                                                                                  Erm, the cars are driving on the left (red taillights on left side of motorway, white headlights on right)... wouldn't North America be the other way around, with cars overtaking on the left?

                                                                                                                                  • otabdeveloper4 · 3 years ago

                                                                                                                                    He means cars overtaking you using the lane to your right. In Europe this is against the rules.

                                                                                                                                    • berkut · 3 years ago

                                                                                                                                      Yes, but the cars are driving on the left in this demo (like in the UK), so on the right is where you do overtake legally - in the faster lanes. I haven't noticed any "overtaking" on the left, where it would be illegal in some countries that drive on the left in the few minutes I've watched it.

                                                                                                                                    • masswerk · 3 years ago

                                                                                                                                      I happened to watch a segment where the cars on the opposite lanes looked more like passing on an independent road, so I missed that this was meant to be lefthand traffic. And it really looked more like an interstate passing through a city. – My failure.

                                                                                                                                    • mbrameld · 3 years ago

                                                                                                                                      I think it's from the UK or somewhere else that they drive on the left. Opposing traffic is on the right.

                                                                                                                                      • jansan · 3 years ago

                                                                                                                                        Also, the co.uk domain may be a hint.

                                                                                                                                      • hugginn · 3 years ago

                                                                                                                                        Isn't this left hand traffic though? As in, not what you'd find in America? It feels very Swedish to me, except for the traffic direction.

                                                                                                                                        • masswerk · 3 years ago

                                                                                                                                          You're right. Still, cars passing on both sides was so North American to me that this blended in this specific impression.

                                                                                                                                          • Jamie9912 · 3 years ago

                                                                                                                                            What do you mean Swedish except for the traffic direction??

                                                                                                                                            • hugginn · 3 years ago

                                                                                                                                              Depends on where you are of course, but reminds me of approaching Stockholm, just before it gets so thick that people start loitering in the left lane. Perhaps Salem, if traffic isn't too heavy.

                                                                                                                                            • jstanley · 3 years ago

                                                                                                                                              What do you mean by "integrated indicators"? Don't cars have integrated indicators all over the world?

                                                                                                                                              • jstanley · 3 years ago

                                                                                                                                                This is fantastic, thanks for sharing!

                                                                                                                                              • soupbowl · 3 years ago

                                                                                                                                                This is awesome, good job!

                                                                                                                                                • edreismd · 3 years ago

                                                                                                                                                  This is real art! Much more than SD

                                                                                                                                                  • gabesullice · 3 years ago

                                                                                                                                                    I enjoyed reading this as much as I enjoyed watching the demo. Both the demo and the writing style are simple and calming, I didn't even notice that the cars were on the wrong side of the road until I saw the TLD ;)

                                                                                                                                                    • warmuuh · 3 years ago

                                                                                                                                                      As German, the thing that annoys me after 5 seconds is that the driver is overtaken on the right side and does so himself ... Hate it

                                                                                                                                                      • kleiba · 3 years ago

                                                                                                                                                        I wouldn't use the word "hate" but I also find it irritating, even though I'm not German.

                                                                                                                                                        Admit it, though: you dislike even more that in that app, you're not zooming by everyone else on the left-most lane, right? ;-)

                                                                                                                                                        • bnegreve · 3 years ago

                                                                                                                                                          The driver drives on the left, so over taking on the right is the proper way to do it.

                                                                                                                                                        • BigJono · 3 years ago

                                                                                                                                                          Love it.

                                                                                                                                                          Might be a good thread to ask. A few years ago I found a couple of sites that were like shadertoy but for 2D canvas shit like this. One I think was codegolf.tk (which appears to have disappeared), and I can't for the life of me remember what the other was.

                                                                                                                                                          Does anyone know of any such sites?

                                                                                                                                                        • altacc · 3 years ago

                                                                                                                                                          So realistic that it hogs the middle lane when it could move to the left ;)

                                                                                                                                                          • jcynix · 3 years ago

                                                                                                                                                            That might be realistic, cf. a female's view of the autobahn:

                                                                                                                                                            https://ww3.cad.de/foren/ubb/uploads/NoIdea/perscheid32.jpg

                                                                                                                                                            by the late cartoonist Martin Perscheid.

                                                                                                                                                            What irritated me a bit instead, where the cars passing on the right side, until I realized that it was made by someone from UK ;-)

                                                                                                                                                            • AnthonyUK · 3 years ago

                                                                                                                                                              The red line indicates the hard shoulder but yes, even after the law change here in UK I have not seen much actual change on the road tbh regarding middle-lane hogging.

                                                                                                                                                              People are either ignorant, lazy or don't care as there is very little chance of being caught.

                                                                                                                                                            • z3t4 · 3 years ago

                                                                                                                                                              Would be a nice "game" experience with VR googles

                                                                                                                                                              • pavlov · 3 years ago

                                                                                                                                                                > ’Maybe it's a "demo"?’

                                                                                                                                                                There’s a long-standing tradition of people creating realtime graphics software on personal computers that doesn’t offer any interactivity. They are indeed called demos and the community is called the demoscene. It goes back to the late 1980s and had a golden era in the mid-90s on Amiga and PC. (Pre-Internet, watching and making demos was one of the few socially and creatively oriented things you could do for free on a home computer.)

                                                                                                                                                                To be pedantic, this isn’t a full-blown demo. Small demos are called intros, and a category of them is the size-constrained intro (e.g. 1kB or 4kB). So this could be either a small intro or an effect as part of a bigger demo.

                                                                                                                                                                It’s worth looking up some of the small intros. People can squeeze entire GPU-raytraced universes with music into a few kilobytes.

                                                                                                                                                                • soham · 3 years ago

                                                                                                                                                                  Would love to see some small intros. Any links/sources you may suggest?

                                                                                                                                                                • skrebbel · 3 years ago

                                                                                                                                                                  IMO the author could very much submit this to a demoparty in the "demo" category (assuming they'd substitute the music with a fitting original work).

                                                                                                                                                                  These days, the only notable difference between demos and intros is file size. If it's bigger than 64kb, it's a demo. You can totally have a short, single-effect demo like this one, and there's plenty such demos out there.

                                                                                                                                                                  Ergo, I disagree, I think this counts as "full-blown" for any reasonable current definition.

                                                                                                                                                                  • pavlov · 3 years ago

                                                                                                                                                                    Fair enough. The definition of a demo in the '90s was definitely multi-part: multiple effects with usually still graphics in between (such as group logos or pixel art rip-offs from fantasy paintings). A single-effect demo that wasn't an intro would have been rare.

                                                                                                                                                                  • danjoredd · 3 years ago

                                                                                                                                                                    Man...I need to get into the Demo scene. I have been disillusioned with the tech world because of just how utilitarian everything feels. I have been looking for something like this forever

                                                                                                                                                                  • techas · 3 years ago

                                                                                                                                                                    Very nice!

                                                                                                                                                                    I thought this would be about the Atari game with paddles… lol

                                                                                                                                                                    • shadowofneptune · 3 years ago

                                                                                                                                                                      I love how this written. I've wanted to document how a personal project works, and this style's exactly what I was looking for.

                                                                                                                                                                      • dotancohen · 3 years ago

                                                                                                                                                                          > What game can we make where the premise is that you're a
                                                                                                                                                                          > passenger on the motorway at night time?
                                                                                                                                                                        
                                                                                                                                                                        The same game passengers on the motorway already play. Punchbuggy yellow!
                                                                                                                                                                        • tsuujin · 3 years ago

                                                                                                                                                                          Who else grew up playing Night Driver on the Atari 2600?

                                                                                                                                                                            • Animats · 3 years ago

                                                                                                                                                                              Night Driver (1976) was the first video game with a first person 3D mode.[1] It's about as minimal a 3D system as you can get. The picture of the car is painted on, not on screen.

                                                                                                                                                                              [1] https://youtu.be/n5I2oh_ecvk?t=7

                                                                                                                                                                            • axus · 3 years ago

                                                                                                                                                                              First thing I thought of when I saw the title. Was using the paddle control less or more frustrating than the typical game?

                                                                                                                                                                              • tsuujin · 3 years ago

                                                                                                                                                                                The paddle was awful but it was also novel so young me loved it.

                                                                                                                                                                                • ASalazarMX · 3 years ago

                                                                                                                                                                                  I loved using the paddle. Atari controls were not very durable, and the paddle's potentiometer degraded into a simple switch, which Night Driver handled perfectly too.

                                                                                                                                                                                • ASalazarMX · 3 years ago

                                                                                                                                                                                  I was pleasantly surprised the article actually had something resembling Night Driver. Such a simple concept, but it was a game that stimulated your imagination. That and star Riders were brilliant for their time.

                                                                                                                                                                                • franciscop · 3 years ago

                                                                                                                                                                                  > "It's hard to classify what it is [...] Maybe it's a "demo"?"

                                                                                                                                                                                  Exactly, those are demos, and while I believe it's slightly different there's a whole culture around it that I've never been aware until recently called "demoscene"! I even have a small "Demos" section on my website with a bunch of those, not to the same level of quality though since for me it'd be a bit more like "self-contained small experiments that resulted in something cool so I put it together as a demo":

                                                                                                                                                                                  - "Zoom", hyperdrive-like effect: https://francisco.io/demo/zoom/

                                                                                                                                                                                  - "Tree generation", specify a JSON/HTML structure and it'll generate a tree: https://francisco.io/demo/tree/ (disc: it was inspired by a broken demo I saw from someone else)

                                                                                                                                                                                  - "Stereo Depth", calculate depth of a couple of stereo images using JS: https://francisco.io/demo/depth/

                                                                                                                                                                                  - "Terminal player", specify a bunch of commands in plain text and they'll be "played" like a video: https://francisco.io/demo/terminal/

                                                                                                                                                                                  • Ruarl · 3 years ago

                                                                                                                                                                                    I would have classified it as a "simulation". Which is what the author calls it, but then tries to find other things to call it too. Simulation is fine.

                                                                                                                                                                                  • spookierookie · 3 years ago

                                                                                                                                                                                    Saw it for a min. Nice.

                                                                                                                                                                                    Then I bumped into the car in front of me which was changing lanes. Not nice.

                                                                                                                                                                                    • jstanley · 3 years ago

                                                                                                                                                                                      Yes, sorry about that. The lane switch planning is incredibly poor!

                                                                                                                                                                                    • radar1310 · 3 years ago

                                                                                                                                                                                      It would be great to have the car I am in have headlights:)

                                                                                                                                                                                      • rippercushions · 3 years ago

                                                                                                                                                                                        This reminds me of Desert Bus, the legendary/notorious driving game by Penn & Teller. During the second half of the game, you're driving at night and the view is not dissimilar.

                                                                                                                                                                                        https://www.newyorker.com/tech/annals-of-technology/desert-b...

                                                                                                                                                                                        Of course, because Desert Bus is literally the worst game ever, the steering continually veers to the side and you have to keep nudging the wheel or you'll crash.

                                                                                                                                                                                        • Mountain_Skies · 3 years ago

                                                                                                                                                                                          Wonder if anyone has built an AI to drive the bus and get that sweet single point.

                                                                                                                                                                                        • jensenbox · 3 years ago

                                                                                                                                                                                          I suggest detecting the viewers geographic location and changing the left/right side drive.

                                                                                                                                                                                          • kenver · 3 years ago

                                                                                                                                                                                            This is wonderful, well done. The limitations you mention just add to the style.

                                                                                                                                                                                            • svdr · 3 years ago

                                                                                                                                                                                              Is it legal to overtake on the right in the US? It's not in the country where I live (NL).

                                                                                                                                                                                              • 93po · 3 years ago

                                                                                                                                                                                                Yes, you'd basically be stuck going well under the speed limit otherwise, because you will 100% always find someone going really slow in the left lane and oblivious to blocking tons of traffic. Even when there's sign after sign saying "Unlawful to use left lane unless passing"

                                                                                                                                                                                                • blauditore · 3 years ago

                                                                                                                                                                                                  This was made in the UK, so overtaking on the right is the proper way. Note the opposite traffing passing on the right too.

                                                                                                                                                                                                • kitd · 3 years ago

                                                                                                                                                                                                  Nice!

                                                                                                                                                                                                  It would be cool if it flipped from left- to right-side driving depending on host's IP address?

                                                                                                                                                                                                    • TOGoS · 3 years ago

                                                                                                                                                                                                      Hmm, some of those trees appear based on parallax to be farther away than the shoreline that they're painted over. Otherwise, pretty nice.

                                                                                                                                                                                                    • nickdothutton · 3 years ago

                                                                                                                                                                                                      This is art. If a pile of bricks wrapped in paper, or a lump of decaying meat in a box is art, then this is art.

                                                                                                                                                                                                      • dghf · 3 years ago

                                                                                                                                                                                                        > It's hard to classify what it is.

                                                                                                                                                                                                        “Synthwave multimedia project” would be how I’d describe it.

                                                                                                                                                                                                        It’s very good. Made me think of the Jeff Goldblum / Michelle Pfeiffer film Into the Night (https://www.imdb.com/title/tt0089346/).

                                                                                                                                                                                                        • mavu · 3 years ago

                                                                                                                                                                                                          > It's hard to classify what it is. It's not a video, because it's generated dynamically. It's not a game, because you just watch. It's not a screensaver, because it's not the 90s. Maybe it's a "demo"?

                                                                                                                                                                                                          You know, even men are allowed to just make Art.

                                                                                                                                                                                                          • Keyb0ardWarr10r · 3 years ago

                                                                                                                                                                                                            Please allow the lanes to be reversed, we drive on the right side

                                                                                                                                                                                                          • kashif · 3 years ago

                                                                                                                                                                                                            its art

                                                                                                                                                                                                            • rvba · 3 years ago

                                                                                                                                                                                                              I remember when I was very young I wrote something much simpler using PRINT and GOTO. Hand drawn formula car (drawn using /\ [] and |) would scroll indefinitely in a simple loop.

                                                                                                                                                                                                              • ramshorst · 3 years ago

                                                                                                                                                                                                                Kudos !

                                                                                                                                                                                                                  • holoduke · 3 years ago

                                                                                                                                                                                                                    I would love to see someone making a video of this and put it in stable diffusion to generate a even more synthwave experience.

                                                                                                                                                                                                                    • coldtea · 3 years ago

                                                                                                                                                                                                                      >The entire scene is created purely by drawing circles on a HTML5 canvas. It actually works a lot better than I expected. The biggest flaw is that the cars are totally transparent, so you can see lights from distant cars even where they should be occluded by closer cars.

                                                                                                                                                                                                                      Hmm, why not just draw a black rectange around any pair of car lights? It should work for givimg the impression of a solid car within the context of the video...

                                                                                                                                                                                                                      Edit: hmm, he does say this "This would be slightly harder than street light occlusion. Probably a first pass would be to render a black cuboid behind each car's lights, so that the cuboid blocks out anything that would be blocked by the car."

                                                                                                                                                                                                                      • jetbooster · 3 years ago

                                                                                                                                                                                                                        I somehow feel the simplicity of everything only being paired lights giving an _impression_ of something somehow adds to the charm

                                                                                                                                                                                                                      • zxspectrum1982 · 3 years ago

                                                                                                                                                                                                                        Nice but I usually turn my lights on when I drive at night :-)

                                                                                                                                                                                                                        • pixl97 · 3 years ago

                                                                                                                                                                                                                          I mean, unless they are riding their brakes then their lights are on.... It just happens that all the cars have their front bulbs out.

                                                                                                                                                                                                                        • jdfx3 · 3 years ago

                                                                                                                                                                                                                          I love it

                                                                                                                                                                                                                          • pelasaco · 3 years ago

                                                                                                                                                                                                                            nice, had a flash back of LSD, sweet old days.

                                                                                                                                                                                                                            • hlandau · 3 years ago

                                                                                                                                                                                                                              Very nice!

                                                                                                                                                                                                                              Not exactly the same thing, since it's a high-paced action game, but I was always fond of the DOS game Skyroads, which has a similar aesthetic. (I believe someone has now made a web-based version called OpenRoads.)

                                                                                                                                                                                                                              • smallerdemon · 3 years ago

                                                                                                                                                                                                                                I love this.

                                                                                                                                                                                                                                • toss1 · 3 years ago

                                                                                                                                                                                                                                  Very cool. One 'flaw' that immediately strikes me as cool is that the cars are transparent — so, for instance, when a car passes you between you and the oncoming traffic, you see the taillights, but also the oncoming headlights/streetlights are not obscured by the car. So it's sort of disembodied headlights and taillights, which makes the effect even cooler... fun!

                                                                                                                                                                                                                                  • skrebbel · 3 years ago

                                                                                                                                                                                                                                    Tbf I think that's the point

                                                                                                                                                                                                                                  • skrebbel · 3 years ago

                                                                                                                                                                                                                                    > Maybe it's a "demo"?

                                                                                                                                                                                                                                    Yep!

                                                                                                                                                                                                                                    • possiblydrunk · 3 years ago

                                                                                                                                                                                                                                      >There are a few more things that I think would be fun to do:

                                                                                                                                                                                                                                      First off, it's beautiful! Second, just because you can, doesn't mean you should :)

                                                                                                                                                                                                                                      I think it's art, so be careful about adding more. The minimalism is beautiful. Just a bunch of moving lights, but they capture the feel of night driving! If you add everything mentioned as upgrades, it will be a simulation. An impressive engineering feat, but (I think) less as a work of art.

                                                                                                                                                                                                                                      I wonder, what does someone who's never ridden/driven in a car at night 'feel' when they see this?

                                                                                                                                                                                                                                      • makach · 3 years ago

                                                                                                                                                                                                                                        I just loved how the author explained writing code without using any specific code. That's clever, lovely done!

                                                                                                                                                                                                                                        • pbronez · 3 years ago

                                                                                                                                                                                                                                          Fun, but backwards! Wish I could toggle right-hand drive

                                                                                                                                                                                                                                              • bodge5000 · 3 years ago

                                                                                                                                                                                                                                                Im not sure the cars and lights need to be anymore than floating orbs, its quite a nice minimalist aesthetic with just the lights. I'm not sure it needs to be a game either, maybe the ability to steer the car would be good but any more than that might seem forced (and I'm not even sure it needs that). The only real problem I see is that cars pass through you from behind (the only time the floating orbs effect becomes an issue), but even that seems minor for what it is.

                                                                                                                                                                                                                                                • jstanley · 3 years ago

                                                                                                                                                                                                                                                  Yes, the "self-driving cars" logic needs a lot of work. That's the part I am least fond of currently.

                                                                                                                                                                                                                                                • davidkunz · 3 years ago

                                                                                                                                                                                                                                                  As a German, it would have been more relaxing if cars on the left were faster.

                                                                                                                                                                                                                                                  • Mountain_Skies · 3 years ago

                                                                                                                                                                                                                                                    That was my first thought too. I was going to post "Tsk tsk, going slow in the middle lane, making people pass you on the right" but then noticed it was in the UK.

                                                                                                                                                                                                                                                    • DecoPerson · 3 years ago

                                                                                                                                                                                                                                                      Beautiful. This is something I’ve thought about too. Thanks for making it!

                                                                                                                                                                                                                                                      One of the most beautiful light effects I’ve seen while being a passenger in a car is the reflection of oncoming headlights on the underside of powerlines, whether they be mains power or for electric trains. It’s a dazzling pattern, reminiscent of the wormhole scene in Interstellar.

                                                                                                                                                                                                                                                      Perhaps something to add to your “more” list? :smiling-emoji-with-eyes-closed-and-sweat-bead:

                                                                                                                                                                                                                                                      Edit: At first I thought there were also stars, but it was just dust on my phone…

                                                                                                                                                                                                                                                      • danjoredd · 3 years ago

                                                                                                                                                                                                                                                        I miss seeing little projects like these that don't serve a purpose, but just look neat. I love it! I hope to see more "demos"!

                                                                                                                                                                                                                                                        • caeril · 3 years ago

                                                                                                                                                                                                                                                          > It's not a screensaver, because it's not the 90s

                                                                                                                                                                                                                                                          What's funny is that screensavers may end up coming back into vogue if OLED displays continue to have burn-in issues. Ray-traced flying toasters may be in our future.

                                                                                                                                                                                                                                                          • danjoredd · 3 years ago

                                                                                                                                                                                                                                                            Im into it

                                                                                                                                                                                                                                                          • btbuildem · 3 years ago

                                                                                                                                                                                                                                                            I'd call this a "demo" for sure -- harkening back to the mid-90's when people built things for fun / just because they could / to explore

                                                                                                                                                                                                                                                            • skrebbel · 3 years ago

                                                                                                                                                                                                                                                              People still do this.

                                                                                                                                                                                                                                                            • tempodox · 3 years ago

                                                                                                                                                                                                                                                              The music should be Kraftwerk's “Autobahn” :)

                                                                                                                                                                                                                                                              • pnf · 3 years ago

                                                                                                                                                                                                                                                                No headlights?

                                                                                                                                                                                                                                                                • cooze · 3 years ago

                                                                                                                                                                                                                                                                  i'm desperately mashing my keyboard hoping that some button would allow me to drive

                                                                                                                                                                                                                                                                  • runxel · 3 years ago

                                                                                                                                                                                                                                                                    It's superb! Only needs city lights now. Think of driving up the hill next to a city. And then less cars. That would be soothing.

                                                                                                                                                                                                                                                                    • foxbee · 3 years ago

                                                                                                                                                                                                                                                                      Hugeeeeee vaperware vibes right now

                                                                                                                                                                                                                                                                      • jjslocum3 · 3 years ago

                                                                                                                                                                                                                                                                        > It's hard to classify what it is. It's not a video, because it's generated dynamically. It's not a game, because you just watch. It's not a screensaver, because it's not the 90s. Maybe it's a "demo"?

                                                                                                                                                                                                                                                                        It's a simulation.

                                                                                                                                                                                                                                                                          • swayvil · 3 years ago

                                                                                                                                                                                                                                                                            Excellent vibe. Good art.

                                                                                                                                                                                                                                                                              • garaetjjte · 3 years ago

                                                                                                                                                                                                                                                                                I feel this isn't complete without mesmerizing shadow patterns from streetlights on dashboard.

                                                                                                                                                                                                                                                                                • system2 · 3 years ago

                                                                                                                                                                                                                                                                                  If he spends more time on this project I bet he will turn it into a full-fledged pc game.

                                                                                                                                                                                                                                                                                • kesava · 3 years ago

                                                                                                                                                                                                                                                                                  Was lot of fun staring at it for a long time. However, every driver using turn signals when they change lanes is not realistic :)

                                                                                                                                                                                                                                                                                  • uhtred · 3 years ago

                                                                                                                                                                                                                                                                                    It's not just the driving on the left that gives away that this is not in the US, but also the fact that there are lights along the highway and reflectors dividing the lanes. Ha, safety precautions!

                                                                                                                                                                                                                                                                                    I hate US highways at night, they are so dark, sometimes I feel I might as well have my eyes closed.

                                                                                                                                                                                                                                                                                    Rant that no one asked for over.

                                                                                                                                                                                                                                                                                      • manunamz · 3 years ago

                                                                                                                                                                                                                                                                                        It would be really neat to create a variation of this that simulates driving through mountain roads -- starry night sky, dark mountain silhouettes, the occasional cabin light...

                                                                                                                                                                                                                                                                                        • teddyh · 3 years ago

                                                                                                                                                                                                                                                                                          > It's not a screensaver, because it's not the 90s.

                                                                                                                                                                                                                                                                                          XScreenSaver had its most recent release two weeks ago.

                                                                                                                                                                                                                                                                                            • imknewhere · 3 years ago

                                                                                                                                                                                                                                                                                              I remember playing this game one time when I was a kid! I still think about it, from time to time, for some reason.

                                                                                                                                                                                                                                                                                              I found the entire experience so disorienting. I remember my dad laughing at me, I did so terribly at it (TBF I was probably 6 or 7)

                                                                                                                                                                                                                                                                                              • chclau · 3 years ago

                                                                                                                                                                                                                                                                                                That's also the first thing I thought when I saw the title

                                                                                                                                                                                                                                                                                              • fiat_fandango · 3 years ago

                                                                                                                                                                                                                                                                                                Does anyone have good resources for creating "generative assets" like this?

                                                                                                                                                                                                                                                                                                I have a decent handle on js but I have no idea where to start in terms of tooling. For now, I've been trying to build basic eye tracking to apply a "block" of color over eyes with an animation in said block on top of a real-time video stream.

                                                                                                                                                                                                                                                                                                Elsewhere, automating mouth animations from audio / even moving a character in a random motion when audio input is provided.

                                                                                                                                                                                                                                                                                                Any advice where to start would be greatly appreciated!

                                                                                                                                                                                                                                                                                                • BasilPH · 3 years ago

                                                                                                                                                                                                                                                                                                  I've done fun things with p5.js, which might have the primitives you need to do what you described.

                                                                                                                                                                                                                                                                                                  • scyzoryk_xyz · 3 years ago

                                                                                                                                                                                                                                                                                                    p5.js is amazing and made just for this purpose. That coding train guy made countless tutorials on generating visuals with js.

                                                                                                                                                                                                                                                                                                • OzzyB · 3 years ago

                                                                                                                                                                                                                                                                                                  Yes, it's a demo, welcome to the Demoscene™

                                                                                                                                                                                                                                                                                                  • Melatonic · 3 years ago

                                                                                                                                                                                                                                                                                                    Reminds me of the San Mateo bridge

                                                                                                                                                                                                                                                                                                    • err4nt · 3 years ago

                                                                                                                                                                                                                                                                                                          It's hard to classify what it is. It's not a video, because it's generated dynamically. It's not a game, because you just watch. It's not a screensaver, because it's not the 90s. Maybe it's a "demo"?
                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                      It's an animation.
                                                                                                                                                                                                                                                                                                      • sillyapple · 3 years ago

                                                                                                                                                                                                                                                                                                        If this is what most people see driving at night I'm jealous. Astigmatism makes every light source at night a big star-burst for me. Oncoming lights are near-blinding at some angles, the only way to cope is stare at the road lines on the opposite side.

                                                                                                                                                                                                                                                                                                        • gwillen · 3 years ago

                                                                                                                                                                                                                                                                                                          > I found it actually worked better if I omitted the x offset from the distance calculation (so just sqrt(y2 + z2)), otherwise objects near the edge of the field of view were weirdly distorted. But I wouldn't suggest doing that in the general case.

                                                                                                                                                                                                                                                                                                          I think this is because you should actually just be dividing by y, the perpendicular distance through the screen. Probably adding z to the mix, while wrong, doesn't make it too weird because of the limited set of z values used.

                                                                                                                                                                                                                                                                                                          If the result with just division by y looks distorted, then I would suggest fiddling with the value of k, which effectively controls how wide-angle versus telephoto things look.

                                                                                                                                                                                                                                                                                                          • chclau · 3 years ago

                                                                                                                                                                                                                                                                                                            Very very nice, but I don't like that the cars are transparent

                                                                                                                                                                                                                                                                                                            • simonjgreen · 3 years ago

                                                                                                                                                                                                                                                                                                              I have many many childhood memories of long journeys up and down the country visiting my grandparents sat in the back of my parents car at night with scenes just like this etched in there. And I'm from UK too so was delighted they did this the "right" way round :)

                                                                                                                                                                                                                                                                                                              Brilliant work, love this.

                                                                                                                                                                                                                                                                                                              And the music reminds me of Kavinsky too with the obvious association with Drive.

                                                                                                                                                                                                                                                                                                              Also, I know it's not actually there, but my mind insists on filling in a "not quite black" sky over the road and the occasional tree or similar to the sides as shadows. Fascinating effect.

                                                                                                                                                                                                                                                                                                              • brap · 3 years ago

                                                                                                                                                                                                                                                                                                                Was that a helicopter I saw? Couldn't find anything about it in the source or discussion... nice touch!

                                                                                                                                                                                                                                                                                                                • Ezhik · 3 years ago

                                                                                                                                                                                                                                                                                                                  Representing cars as just two lights is so simple yet so effective. I've toyed with a slightly similar idea as well: https://ezhik.me/beyond184/

                                                                                                                                                                                                                                                                                                                  There's also a screensaver out there which generates an entire little city, with neon branding on buildings and all.