Wavelength Collector by andriybyelikov

[raw]
made by andriybyelikov for Ludum Dare 58 (JAM)

Controls

  • WASD to move
  • Click and drag to move camera
  • Walk into items to collect them
  • Step on buttons to activate them

List of tools

  • Programming Languages: JavaScript, GLSL
  • APIs: WebGL2 (OpenGL ES 3.0)
  • Development Server and Resource Bundler: Vite

Ratings

Overall 762th 2.589⭐ 30🧑‍⚖️
Fun 783th 1.982⭐ 30🧑‍⚖️
Innovation 381th 3.268⭐ 30🧑‍⚖️
Theme 703th 2.964⭐ 30🧑‍⚖️
Graphics 425th 3.589⭐ 30🧑‍⚖️
Mood 760th 2.411⭐ 30🧑‍⚖️
Given 29🗳️ 33🗨️

Feedback

el-pepi
Oct 07th · 00:13 UTC
It looks neat when you bring the light orbs close to the wall
Timo5034
Oct 07th · 00:13 UTC
That's so cool! I once also implemented ray tracing in WebGL, it's definitely not easy!
I don't understand what's going on when I stand next to a wall (wall to my right/left). What are those reflections? Do the balls have a spotlight?
Wishes
Oct 07th · 00:14 UTC
this is so impresive in my opinion. Great job
LDJam user 374028
Oct 07th · 18:33 UTC
@timo5034 I assume that you are referring to the triple halo when you have collected all three pure wavelength lights. The balls are point lights. If you look to the right you see the blue light reflected a the center, followed by a cyan middle ring, followed by a turquoise outer ring. The color at each point is the sum of the colors of each light that arrive at that point attenuated by the inverse square of the distance between that point and the light source. So at the center you see blue because that's the closest light to the surface and the contribution by the green and red lights is occluded by it. At the point in which the contribution of the green light is no longer occluded by the blue light ball, the contribution of the blue light and green light combine to create cyan light, and finally at the point in which the red light is no longer occluded by the green and blue light balls, the red light combines with the green and blue lights to create turquoise light. The same happens with the reflections to the left, but it results in different colors because the blue light is now the farthest one and contributes less to the reflected color from the surface.
rubentipparach
Oct 07th · 19:46 UTC
I was expecting the world to explode when I collected all the dots lmao! Awesome renderer, hope you get to use this tech more in future jams!
LDJam user 356534
Oct 07th · 20:02 UTC
Very cool and very tech-demo-y, I really like the color combinations you can get while carrying one/two of the orbs and then looking at the ones that are still there. Really cool implementation and an inspiration to take a look at ray-tracing at some point!
Roitchie
Oct 08th · 17:28 UTC
This might look simple but having tried to implement a recursive raytracer in the past I can appreciate how difficult this can be to get right. So it's really impressive you got the light and reflections working as good as you did. Especially under the time pressure of a game jam too. Well done!

I'll have a look at the source code. I'm interested to see how you ended up implementing it.
Shaggy
Oct 09th · 19:36 UTC
Neat, well done!
Coda Highland
Oct 10th · 01:28 UTC
Shiny raytracing! You know, that's something I've never tried to build myself. I should try it one of these days.

Side note: From a game perspective, it would have been nice if you didn't have to hold the mouse button down to move the camera.
Disvent
Oct 10th · 19:43 UTC
I was honestly shocked that the game just started instantly. My pure programmer’s respect to you for that - it’s super cool!
LDJam user 384829
Oct 11th · 04:49 UTC
Nice game! The graphics look good, the sort of PS1 era vibes are great! Love the raytracing and the concept, it's really fun. And getting the colours to light up correctly is incredible. Well done!
Wouter52
Oct 11th · 13:55 UTC
Damn! Is this raytracing in Javascript? I'm impressed!
b0guslaw
Oct 11th · 13:56 UTC
Incredibly cool as a tech demo and proof of concept. The camera movement is a bit tough though
Conduit
Oct 12th · 10:54 UTC
This is such a cool demo! I really wonder where you could go with this concept, seems endless to me! Great work :)
Alex Mulkerrin
Oct 12th · 15:26 UTC
Making a raytracer in pure JavaScript is very cool, you get some nice effects when you shine all three lights at the dome in the middle. I'll have to look at the code to work out what you did with the shaders.
WilloXs
Oct 12th · 16:16 UTC
I have no idea how you did this, and as someone with no idea how to implement this myself, chapeau.

Though now i have to somehow rate this in a fair way with the other games and that's hard...
ChuChuGeralt
Oct 13th · 09:49 UTC
A nice little vignette! I really like the underlying concept, even though I'd love to see it developed into a game with more of a defined loop.

It would be especially fun if you introduced interactive objects that required specific lighting or shadow manipulation to solve, such as needing to light up or hide one of the three colored dots. This kind of mechanic would really elevate the gameplay!
Bumble
Oct 13th · 09:52 UTC
Nice tech demo, but I agree with @willoxs. It is difficult to give a fair rating in the game category. There is a demo category that would have been more fitting, I think.
Koolruz
Oct 13th · 16:50 UTC
Woah, very cool rendering technology here! I definitely struggled with the camera controls being inverted, but because this was a tech demo with no fine-grained movement required, it wasn't a huge problem. I loved seeing the way the different wavelengths cast light and shadow across the world (the attached screenshot just looks *so* cool to me)

![light-reflections.PNG](///raw/dec/c2/z/6f5c1.png)

I am super curious how the R+G+B light emitters work, and if the white light that they create is happening naturally as the scene is rendered by three different pure-color light sources (and thus has all the strange quirks of non-full-spectrum white light), or if you have any logic in place to additively combine the multiple colors.

In case you're not familiar with what I mean by the quirks of non-full-spectrum light, there is a really interesting Technology Connections video on this subject, where he lights a variety of scenes with RGB and full-spectrum white light, and the differences are really astounding: https://www.youtube.com/watch?v=uYbdx4I7STg

Again, there is some very cool stuff here, and I'm excited to see your next jam project to see if this gets expanded upon! Well done!
LDJam user 374028
Oct 13th · 17:53 UTC
@koolruz Hey, thanks for sharing the video, it was very interesting.

All lights in my game are monochromatic, event the white light at the ceiling in the middle of the room. I define my lights' emitted colors and my objects' reflected colors in the three pure wavelengths only, as linear RGB. I think it can be done to store entire emitted and reflected spectra functions per material instead of just three values for each pure red, green and blue wavelengths. In that case, instead of multiplying emitted and reflected RGB color vectors component-wise to obtain the final color, you would have to integrate the products of each wavelength across both spectra, and I think like that you can obtain what would be the equivalent color in real life. Then of course, this final color would still be converted to display encoded RGB, but it would be more accurate than illuminating an object with just three monochromatic lights. The problem with this approach is that it is too expensive to store and compute for real-time applications but I think that 3D animated films actually do this offline. I'm not sure if there's a way to accurately approximate or precompute any of the computations for videogame applications.
YibiRabbit007
Oct 18th · 01:51 UTC
Yo-ho, I quickly got all the colors, but why doesn't this perspective rotation directly follow the mouse position? Dragging to move is really counterintuitive! I thought you had to click to collect colors, but it turns out you just have to move close. Every time a color is collected, the room's color also changes—nice idea!

![屏幕截图 2025-10-18 094738.png](///raw/afd/36/z/6f74d.png)

*This is a very good optical demonstration device; perhaps refine it further!*
ColeSlaughter
Oct 20th · 18:58 UTC
[Thanks for submitting your game to stream!](https://www.twitch.tv/videos/2589159756?t=02h15m04s)

I'm jealous of the tech you manage to create here. Well done!