I'm amused that we share initials and a passion for this kind of project! Mine's <a href="https://rezmason.github.io/drivey" rel="nofollow">https://rezmason.github.io/drivey</a> .<p>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.
>There are a few more things that I think would be fun to do:<p>First off, it's beautiful! Second, just because you can, doesn't mean you should :)<p>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.<p>I wonder, what does someone who's never ridden/driven in a car at night 'feel' when they see this?
This reminds me of the movie Drive (2011), in particular the first song on the soundtrack, Kavinsky - Nightcall<p><a href="https://youtu.be/MV_3Dpw-BRY" rel="nofollow">https://youtu.be/MV_3Dpw-BRY</a>
<p><pre><code> 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"?
</code></pre>
It's an animation.
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.<p><a href="https://www.newyorker.com/tech/annals-of-technology/desert-bus-the-very-worst-video-game-ever-created" rel="nofollow">https://www.newyorker.com/tech/annals-of-technology/desert-b...</a><p>Of course, because Desert Bus <i>is</i> literally the worst game ever, the steering continually veers to the side and you have to keep nudging the wheel or you'll crash.
><i>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.</i><p>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...<p>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."
This reminds me of this video: <a href="https://youtu.be/WrxZ4AZPdOQ" rel="nofollow">https://youtu.be/WrxZ4AZPdOQ</a><p>He does incredible work with shaders and explains them in very clear detail.
I wanted to do the same for the train feeling: <a href="https://qewasd.com/train" rel="nofollow">https://qewasd.com/train</a>
Beautiful. This is something I’ve thought about too. Thanks for making it!<p>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.<p>Perhaps something to add to your “more” list? :smiling-emoji-with-eyes-closed-and-sweat-bead:<p>Edit: At first I thought there were also stars, but it was just dust on my phone…
Does anyone have good resources for creating "generative assets" like this?<p>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.<p>Elsewhere, automating mouth animations from audio / even moving a character in a random motion when audio input is provided.<p>Any advice where to start would be greatly appreciated!
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.
For something similar, I always liked this blog series: <a href="https://www.shamusyoung.com/twentysidedtale/?p=2940" rel="nofollow">https://www.shamusyoung.com/twentysidedtale/?p=2940</a><p>Unfortunately it seems the author passed away a few months ago
> "It's hard to classify what it is [...] Maybe it's a "demo"?"<p>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":<p>- "Zoom", hyperdrive-like effect: <a href="https://francisco.io/demo/zoom/" rel="nofollow">https://francisco.io/demo/zoom/</a><p>- "Tree generation", specify a JSON/HTML structure and it'll generate a tree: <a href="https://francisco.io/demo/tree/" rel="nofollow">https://francisco.io/demo/tree/</a> (disc: it was inspired by a broken demo I saw from someone else)<p>- "Stereo Depth", calculate depth of a couple of stereo images using JS: <a href="https://francisco.io/demo/depth/" rel="nofollow">https://francisco.io/demo/depth/</a><p>- "Terminal player", specify a bunch of commands in plain text and they'll be "played" like a video: <a href="https://francisco.io/demo/terminal/" rel="nofollow">https://francisco.io/demo/terminal/</a>
<i>> ’Maybe it's a "demo"?’</i><p>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.)<p>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.<p>It’s worth looking up some of the small intros. People can squeeze entire GPU-raytraced universes with music into a few kilobytes.
> 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.<p>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.<p>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.
Really cool . Reminds me of the VR collaboration project (Dance Tonite) by Google Data arts team and LCD Sound System
<a href="https://tonite.dance/" rel="nofollow">https://tonite.dance/</a>
Reminds me very much of <i>Night Driver</i>, the arcade game from 1976:<p><a href="https://archive.org/details/arcade_nitedrvr" rel="nofollow">https://archive.org/details/arcade_nitedrvr</a>
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 :)<p>Brilliant work, love this.<p>And the music reminds me of Kavinsky too with the obvious association with Drive.<p>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.
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.
> 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.<p>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.
I love this.<p>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.
> It's hard to classify what it is.<p>“Synthwave multimedia project” would be how I’d describe it.<p>It’s very good. Made me think of the Jeff Goldblum / Michelle Pfeiffer film <i>Into the Night</i> (<a href="https://www.imdb.com/title/tt0089346/" rel="nofollow">https://www.imdb.com/title/tt0089346/</a>).
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!<p>I hate US highways at night, they are so dark, sometimes I feel I might as well have my eyes closed.<p>Rant that no one asked for over.
> The biggest flaw is that the cars are totally transparent,<p>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.)
Related: tutorial for writing something similar with ShaderToy - <a href="https://youtube.com/playlist?list=PLGmrMu-Iwbgs0H9va0DlopOGyYnlLmxhS" rel="nofollow">https://youtube.com/playlist?list=PLGmrMu-Iwbgs0H9va0DlopOGy...</a>
> 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"?<p>It's a simulation.
Beautiful, congrats!
This reminds me the final shot of Playtime (not a spoiler! at 2:07: <a href="https://youtu.be/anvhVINSFnE?t=127" rel="nofollow">https://youtu.be/anvhVINSFnE?t=127</a> )
Music version is amazing: <a href="https://incoherency.co.uk/nightdrive/" rel="nofollow">https://incoherency.co.uk/nightdrive/</a>
In a similar vein, check out the js1k 2013 winner entry, "Strange crystals" [0].<p>Also check out the author's detailed explanations.<p>[0] <a href="https://js1k.com/2013-spring/demo/1459" rel="nofollow">https://js1k.com/2013-spring/demo/1459</a><p>[1] <a href="http://ehouais.net/2015/03/js1k-2015-part-1-introduction" rel="nofollow">http://ehouais.net/2015/03/js1k-2015-part-1-introduction</a>
This reminded me of Night Driver for Apple II:<p><a href="https://youtube.com/watch?v=l0nkMGyfYO8" rel="nofollow">https://youtube.com/watch?v=l0nkMGyfYO8</a>
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.
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!
Representing cars as just two lights is so simple yet so effective. I've toyed with a slightly similar idea as well: <a href="https://ezhik.me/beyond184/" rel="nofollow">https://ezhik.me/beyond184/</a><p>There's also a screensaver out there which generates an entire little city, with neon branding on buildings and all.
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!<p>[1] <a href="https://m.youtube.com/watch?v=1aCeg-EbOAI" rel="nofollow">https://m.youtube.com/watch?v=1aCeg-EbOAI</a>
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.<p><a href="https://youtu.be/KqJJ-2cRR0M" rel="nofollow">https://youtu.be/KqJJ-2cRR0M</a>
Love this, including the music, but here's an old favorite track of mine that would also fit: <a href="https://music.youtube.com/watch?v=zkQaLv7mEcI&feature=share" rel="nofollow">https://music.youtube.com/watch?v=zkQaLv7mEcI&feature=share</a>
Love it.<p>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.<p>Does anyone know of any such sites?
This gentleman made a great web game for the UK TV show, Countdown. Been using it for years...<p><a href="https://incoherency.co.uk/countdown/practice/" rel="nofollow">https://incoherency.co.uk/countdown/practice/</a>
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 ;)
> It's not a screensaver, because it's not the 90s<p>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.
Very nice!<p>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.)
It’s 11 o’clock at night and this is absolutely perfect. Bravo on the music version.<p><a href="https://incoherency.co.uk/nightdrive/" rel="nofollow">https://incoherency.co.uk/nightdrive/</a>
<p><pre><code> > What game can we make where the premise is that you're a
> passenger on the motorway at night time?
</code></pre>
The same game passengers on the motorway already play. Punchbuggy yellow!
Lay-by by Tennyson complements the simulation quite well<p><a href="https://invidious.flokinet.to/watch?v=3FfOsXr9rvw" rel="nofollow">https://invidious.flokinet.to/watch?v=3FfOsXr9rvw</a>
See also this very natty shadertoy demo <a href="https://www.shadertoy.com/view/MdfBRX" rel="nofollow">https://www.shadertoy.com/view/MdfBRX</a>
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.
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...
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
> 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"?<p>You know, even men are allowed to just make Art.
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!<p>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.)