Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

if anyone uses godot, an example i'd like to see is raindrops falling into a puddle, viewed from the top, like the old screensavers. I tried using GPT to do it in 2 engines, pygame and unity. The pygame version kinda worked, but everything felt and looked slightly off.

I have a mighty need for something that can quickly render frames of arbitrary pixels. Ideally a line at a time for smoothness. I also had this working - kinda - in pygame, but after 2.5 screens worth of lines being drawn it gives up.

Looking at the godot documentation, it would be nice to see something non-trivial and arbitrary expressed as code.



Do you have an example of that screensaver? Is it something like this? [0] That's the only thing I could find online. You'd probably just want to use a fragment shader. [1]

[0] https://www.fullscreensavers.com/sea-raindrops-screensaver/

[1] https://godotshaders.com/shader/ripple-shader/


>I have a mighty need for something that can quickly render frames of arbitrary pixels. Ideally a line at a time for smoothness.

Dependent on the complexity of your application and how comfortable you are working in C++, you could give CImg [1] a go. I've used it for a handful of projects with a similar requirement. It can be lightning quick, but a pain to get started with.

[1] https://www.cimg.eu/


I wanted to make something that used pixel drawing in Godot and ended up creating a Image, manipulating the pixels of the image then copying the image to a texture and setting a sprite2d to that texture.

img = Image.create(width, height, false, Image.FORMAT_RGBA8)

img.set_pixel(x, y, col)

tex: ImageTexture = ImageTexture.create_from_image(img)

spr.set_texture(tex)


Have you checked out processing or p5js? They both seem like they'd be well suited to something simple like this, they're not game engines they're graphics libraries but they're very approachable and easy to use, with great documentation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: