FoonLudum Dare ExplorerLD58 → Wavelength Collector

Wavelength Collector

By andriybyelikov

View on ldjam.com

CategoryRankScoreCount
Overall7622.5830
Fun7831.9830
Innovation3813.2630
Theme7032.9630
Graphics4253.5830
Mood7602.4130

Comments

el-pepi 2025-10-07 00:13

It looks neat when you bring the light orbs close to the wall

timo5034 2025-10-07 00:13

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 2025-10-07 00:14

this is so impresive in my opinion. Great job

andriybyelikov 2025-10-07 18:33

@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 2025-10-07 19:46

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!

philocode 2025-10-07 20:02

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 2025-10-08 17:28

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 2025-10-09 19:36

Neat, well done!

coda-highland 2025-10-10 01:28

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 2025-10-10 19:43

I was honestly shocked that the game just started instantly. My pure programmer’s respect to you for that - it’s super cool!

pixel-studios 2025-10-11 04:49

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 2025-10-11 13:55

Damn! Is this raytracing in Javascript? I'm impressed!

b0guslaw 2025-10-11 13:56

Incredibly cool as a tech demo and proof of concept. The camera movement is a bit tough though

conduit 2025-10-12 10:54

This is such a cool demo! I really wonder where you could go with this concept, seems endless to me! Great work :)

alex-mulkerrin 2025-10-12 15:26

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 2025-10-12 16:16

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 2025-10-13 09:49

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 2025-10-13 09:52

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 2025-10-13 16:50

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

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!

andriybyelikov 2025-10-13 17:53

@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 2025-10-18 01:51

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

*This is a very good optical demonstration device; perhaps refine it further!*

coleslaughter 2025-10-20 18:58

[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!