💾 Archived View for dioskouroi.xyz › thread › 29369941 captured on 2021-11-30 at 20:18:30. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Show HN: Giving a 2D grid a 3D look – part 4

Author: atum47

Score: 155

Comments: 36

Date: 2021-11-28 16:05:28

Web Link

________________________________________________________________________________

atum47 wrote at 2021-11-28 16:10:37:

I think I'm getting close to "finish" this project. I've been thinking about using as a music visualization for my web radio project [1] or let people save it as an image or a short video, so they can use on their designs...

Anyways, on this iteration I have added a CSS linear gradient background, a setting sun at the center of the screen also with some gradient and fiddle a bit with the alpha values, so the mountains would appear more gentle on the horizon.

Hope you like it. I'm open to suggestions on how I should use this project.

1 -

https://victorribeiro.com/radio/

Part 1 -

https://victorribeiro.com/random

Part 2 -

https://victorribeiro.com/random2

Part 3 -

https://victorribeiro.com/random3

terhechte wrote at 2021-11-28 18:32:21:

This is really really beautiful :)

I build something similar last year (

https://hyperdeck.io/beta/

) using Rust and webassemly. Yours looks much much much cooler though! Looking forward to the source to see how you did it :)

atum47 wrote at 2021-11-28 19:29:12:

Thank you. Just pushed the code to GitHub

achillean wrote at 2021-11-28 17:52:41:

This looks amazing! Are you considering open-sourcing it? Would love to see how it fits as a background for

https://2000.shodan.io

There are probably a lot of outrun-style websites/ projects that could use this.

atum47 wrote at 2021-11-28 18:20:49:

Yes, I'm on the road but as soon as I can I'll push it to GitHub

smaudet wrote at 2021-11-29 06:08:27:

I just see a purple background?

atum47 wrote at 2021-11-28 19:23:29:

Hi people, here's the source code. I hope you make good use of it.

https://github.com/victorqribeiro/retroSynthwave

Could you please like this comment so it goes to the top? Thanks.

ccrabb wrote at 2021-11-29 02:22:28:

Insane to me how terse and elegant that code is for such a beautiful outcome

atum47 wrote at 2021-11-29 02:53:05:

Well, isn't that a nice comment to receive on a project... Thank you!

mentos wrote at 2021-11-28 17:30:12:

Pairs nicely with my friend's 80's themed track:

https://soundcloud.com/protocolzero/trainride-to-paradise/s-...

Would be cool to drive the rendering with the song?

Definitely could see combining music with a visualizer like this to travel back to the 80s. Maybe put billboards up on the side of the road with all of the hit products/popculture of the time passing by? Probably too heavy handed, open to suggestions ha

atum47 wrote at 2021-11-28 19:50:44:

Yes, on my other comment I've linked my web radio project where I sync canvas animations with cool music. I'll try to add this one to it later. Glad you liked it.

globalise83 wrote at 2021-11-28 18:18:05:

A nice mix to go with it:

https://www.youtube.com/watch?v=HJcpcb1wnDE

fnord123 wrote at 2021-11-28 22:08:00:

Reminds me of Vector:

https://store.steampowered.com/app/1175140/Vecter/

metaphor wrote at 2021-11-29 06:19:50:

First thing that came to mind as well. To be sure, uninstalled with a quickness; might just be a generational sensibility thing, but the memes struck me as intolerable.

sillysaurusx wrote at 2021-11-29 06:07:12:

Is there a way to play Windows games on an M1?

krisrm wrote at 2021-11-28 16:38:04:

This is really cool! Feels very chill.

If I had one suggestion, some parameter sliders would be fun. Modify the speed over the land/height of the mountains/variance in mountain height.

Well done and thanks for sharing.

kattjakt wrote at 2021-11-28 19:12:00:

I've actually made something quite similar a while ago which you might find interesting! 22 parameters plus a step by step visualization of how the scene is created "layer by layer" :)

https://kattjakt.github.io/mars-playground/

atum47 wrote at 2021-11-28 19:40:07:

I've pushed the code to GitHub it would be very easy to fiddle with the parameters or add sliders - Mr.Doob has a library for that. Let me know if you make something cool with this. Thanks

dataviz1000 wrote at 2021-11-28 18:16:13:

Here is another example of making a 3D look with 2D graphics using JavaScript from the CodeIncomplete blog building an Outrun type car racer game,

https://codeincomplete.com/articles/javascript-racer/

.

eganist wrote at 2021-11-28 18:03:43:

once upon a time, there was a twitch stream that only played synthwave and vaporwave with backgrounds looped from RoyaltyFreeTube (

https://www.youtube.com/channel/UCDyoFl3axaufRwkpBA38-1w

)

https://www.twitch.tv/synthwavebeats

(it's been offline over a year now)

It was fairly successful, averaging between 40 and 100 listeners at any given time of day, which suggests to me that you could keep building on your visuals with a very basic synthwave, vaporwave, or other similar lo-fi-ish streaming page people could background on a tv or spare monitor, procedurally generating the visuals over time to keep things fresh.

Lifestyle businesses have been done with less.

atum47 wrote at 2021-11-30 00:25:37:

I have uploaded a video to youtube using this animation with some free royalty song I found online.

https://www.youtube.com/watch?v=ztv--KzSGDc

FractalHQ wrote at 2021-11-28 19:56:33:

Nice! How do you like the JavaScript canvas api? I found it hard to be productive with but I plan on taking another stab soon. I’ve had more luck with svg animations and pixi.js but I want to learn enough of the canvas api to solidify my opinion of it.

atum47 wrote at 2021-11-28 20:01:29:

Well, I really enjoy it. I've been using it on my projects since 2013 (when I first learned that I could use a 2D array as map for a game, haha).

To be honest, I feel I let a lot of people down because I write my projects on it. The radial menu, for instance, o lot of people like it, but they resent the fact that I did not used SVG so it could be styled with css.

This project for instance, I tried to give a glow to the grid but the frame rate dropped to the ground, something that would not happen if I had used webgl.

Anyways, to small games, interactive demos, cool scenes, canvas is my weapon of choice.

WesleyJohnson wrote at 2021-11-29 00:35:38:

I really enjoy doing things in canvas and processing.js, even though it's discontinued. It's a relatively rapid way to prototype things or build cool demos like you said. I got hooked around the same time a you, maybe a year earlier, when moderating over at Khan Academy in their CS area. So much fun.

perilunar wrote at 2021-11-29 07:02:24:

Very nice. Interesting that on Safari on my (admittedly old) laptop, random3 runs at about ~17ms per frame (60 fps), whereas random4 takes ~34ms (30fps). Re-drawing the sun and its gradient & blur each time is enough to cause requestAnimationFrame to miss frames.

Btw, I think the sun should to be scaled to the canvas size also - on small windows if take up the whole thing!

a_c wrote at 2021-11-28 20:08:30:

Please forgive my ignorance, I think I'm missing context here. Would you mind sharing what is this demo trying to achieve? Is it like the star war intro

https://m.youtube.com/watch?v=tGsKzZtRwxw

where a wall of text is being transformed, and yours is another visualization?

Again apologies for my ignorance

atum47 wrote at 2021-11-28 20:28:54:

If go under the links I've submitted you will see that I started a project just for the heck of it and it ends up looking like this. No specific goal in mind, just to spend a few minutes a day doing something cool.

ChrisMarshallNY wrote at 2021-11-28 18:17:37:

As someone that used to play the old "wireframe" video games (like SPECTRE), I think this is cool; especially, since it is just JS.

Matheus28 wrote at 2021-11-28 20:48:54:

FYI multiply canvas width & height by window.devicePixelRatio so it won't be blurry in high res screens

codetrotter wrote at 2021-11-28 17:30:49:

Very outrun. Nice work :)

FpUser wrote at 2021-11-28 17:16:28:

Love your website. Selection of music for the Rock channel is very nice as well. Bookmarking it.

Btw I've written pixel shader based music vis ages ago. Here is screenshot:

https://imgur.com/a/txWiOih

atum47 wrote at 2021-11-28 19:32:26:

I'm glad to hear that. I put so much care into my website. It makes me really happy when people like it.

mywacaday wrote at 2021-11-28 17:18:59:

Really like this, not normally my thing but really like the 80s feel while being modern at the same time. Great work!

samradelie wrote at 2021-11-28 21:04:47:

i should like to see how you did the infinite terrain. did a mars-walk some years ago with a friend's sculptures

https://samelie.github.io/mars-amenothep/

Snd_ wrote at 2021-11-28 22:05:04:

Great work! Love it

atum47 wrote at 2021-11-28 22:05:39:

Thanks

094459 wrote at 2021-11-28 16:52:36:

Love this