this post was submitted on 01 Sep 2026
511 points (98.7% liked)

Programming

28351 readers
669 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS
 

Daddy needs a new pair of RAM!

edit: the fps are way better in smaller terminal windows with lower character count but then it's hard to make out the dice. D:

edit2: code here (expires in 2 weeks)

top 50 comments
sorted by: hot top controversial new old

AI killed like 10 whales for this.

[–] lenabee@lemmy.blahaj.zone 2 points 1 day ago

this is fucking CONTENT, baby!!! Great work, honestly great code. This is an achievement.

[–] AnarchistArtificer@lemmy.world 44 points 2 days ago (2 children)

One of my favourite things in the entire world is what I call "high effort shitposts". Running DOOM on absurd devices like pregnancy tests is the archetypical example I use when explaining this.

Well, congrats, because this is absurd enough that this makes the list too. You are ridiculous and delightful, and I am glad that you exist to create impressive horrors like this.

[–] mr_robot2938@lemmy.world 2 points 1 day ago

How about DOOM on a 1956 vacuum tube computer?

Doom on the oldest digital computer in America

[–] Pudutr0n@lemmy.world 18 points 2 days ago

Thank you so much! I love high effort shitposts too!

And if you liked that, you're going to love this: A while ago I also wrote a 3d renderer from scratch inside the picotron, an emulated fantasy console that never existed, to display a 3d model of a pudu.

I have a few more of these you might appreciate, non 3d related.

[–] spacegoat@lemmy.world 19 points 2 days ago (1 children)

Do you think God stays in heaven because he too lives in fear of what he's created?

[–] Pudutr0n@lemmy.world 12 points 2 days ago

God comes over
creates some bullshit
stays in heaven
refuses to elaborate

[–] HeHoXa@lemmy.zip 7 points 2 days ago (1 children)
[–] Pudutr0n@lemmy.world 4 points 2 days ago
[–] glizzyguzzler@piefed.blahaj.zone 37 points 2 days ago (2 children)

Get this on the berg I wanna render my dice rolls over SSH stat

[–] Pudutr0n@lemmy.world 7 points 2 days ago (1 children)
[–] glizzyguzzler@piefed.blahaj.zone 4 points 2 days ago (1 children)

When I opened the code I immediately scrolled to the bottom to see how many lines, and hell yeah. I read through it and I'm horrified, but I'm even more horrified it works. This is truly an chievement

Here it is running over SSH https://files.catbox.moe/qkwd4q.mp4 what more could I ask for, thank you for making this insane thing and sharing it!

[–] Pudutr0n@lemmy.world 5 points 2 days ago (1 children)

holy shit, I'm so flattered! Thank you for your kind support and encouragement!

It's crazy that it looks okaish right? quaternions, dude. I have implemented them in 3 projects and still have no fucking idea how they work.

Also, you can run it in --quality low if you're struggling with framerate. :)

[–] glizzyguzzler@piefed.blahaj.zone 3 points 2 days ago* (last edited 2 days ago) (5 children)

It's insane how many features this has for being insane in of itself!

Edit: that was running on anemic "1 core" (1 very shared core) VPS, bumping it up to 4, hooboy do those dice fly

load more comments (5 replies)
[–] Pudutr0n@lemmy.world 15 points 2 days ago (10 children)

lol but it's not finished and everyone will see how stupid my code (and brain) is D:

[–] GeirGrusom@lemmy.world 26 points 2 days ago

It's bash. Everyone is expecting nightmare code, and that's why it's fun!

[–] prole@lemmy.blahaj.zone 7 points 2 days ago (1 children)

Cut yourself some slack. These days, most people would have just pasted LLM outputs

load more comments (1 replies)
[–] promitheas@programming.dev 9 points 2 days ago (2 children)

My suggestion is do it. Its a cool project, and clearly there is interest from others who could contribute to the project by suggestions, bug fixing, or general collaboration, helping you learn. Just add some kind of disclaimer in the project that its not ready yet, and that youre still learning and it should be fine.

load more comments (2 replies)
[–] BasedMaquisEddington@lemmy.dbzer0.com 8 points 2 days ago (4 children)

I hope you change your mind.

Most people care about features, not the implementation.

Those who dislike your code are probably going to generally dislike others’ code anyways, so in a sense they don’t even need to see your code to already disapprove of it 🤷‍♀️

load more comments (4 replies)
load more comments (5 replies)
[–] oce@jlai.lu 36 points 2 days ago (1 children)

I'm curious why it seems the time slows down at the end compared to reality? Because more computation is needed to check if it's a stable state?

[–] Pudutr0n@lemmy.world 32 points 2 days ago (10 children)

the final resolution stage was a huge headache and as you can see, one I didn't fully solve. Basically when the dice finally settle, particularly those with more sides, lots and lots of micro collisions happen in close sequence, each one having to apply friction and bounce back. As velocities come close to be rounded to 0, the bounce back effect and force of gravity no longer provide movement, but the final angle of the bottom face may not be fully settled on the floor. So basically if i don't ignore all these tiny collisions I get the frame rate drop you see and if I do, I can arrive at not fully settled states which can become ambiguous result-wise in, say, the 20-sided die.

load more comments (10 replies)
[–] Aqivex@fedinsfw.app 13 points 2 days ago (1 children)

@Pudutr0n@lemmy.world - You are certifiably insane. There are a million more effective ways to achieve this, with less resources... I LOVE IT.

[–] Pudutr0n@lemmy.world 7 points 2 days ago

This is exactly the kind of flattery that truly touches my heart. <3

[–] farmgineer@nord.pub 22 points 2 days ago (1 children)

Are you often described as a masochist?

It looks neat. I can't imagine wanting to write it in bash, though, heh.

[–] Pudutr0n@lemmy.world 18 points 2 days ago

XD I am! And it was a complete nightmare. hahaha

[–] thingsiplay@lemmy.ml 15 points 2 days ago (1 children)

I just woke up and this is the first thing I see. Did I really woke up?

[–] dejected_warp_core@lemmy.world 8 points 2 days ago (2 children)
[–] Crackhappy@lemmy.world 5 points 2 days ago

Oh my God that's amazing.

load more comments (1 replies)
[–] adhocfungus@midwest.social 15 points 2 days ago

Absolutely insane. Part of me wants to see the source code, but part of me is terrified of how complex it must be. Plus I've only been writing bash for 20 years, so it would probably look incomprehensible to me.

[–] MonkderVierte@lemmy.zip 16 points 2 days ago (1 children)

(hopefully) Constructive critique:

  • it looks like you're handling the dice in physics as a ball? Takes forever to settle at the end.
  • the throw has a visual glitch.
[–] Pudutr0n@lemmy.world 16 points 2 days ago (1 children)

Thanks! Yeah, there's definitely A LOT of room for improvement. collisions are handled per vertex, but torque is applied to angular impulse to the dice as a whole (like a ball I guess). The settling is a huge issue, yes. the visual glitches I've been trying to get rid of but man... fix one and then another one pops up in a different case. Thanks for your critique. :)

load more comments (1 replies)
[–] RheumatoidArthritis@mander.xyz 16 points 2 days ago (2 children)

Haha nice! How long did it take you? Integer-only math?

[–] SpaceNoodle@lemmy.world 22 points 2 days ago (6 children)

All computer math is integer math if you go deep enough

load more comments (6 replies)
[–] Pudutr0n@lemmy.world 15 points 2 days ago (3 children)

Jebus I don't even know how long I've been working on this. It started out as a way to teach myself bash, combined with my long obsession with rendering platonic solids. I previously coded a huge galaxy of hundreds of thousands of polyhedra you could fly across in python with opengl shaders and got to reuse/translate a lot of that code. The quaternion stuff I was grateful to not have to rethink that much again. haha. And yes, integer-only! Some params are "floating point" but i just parse them and add a bunch of zeroes so i can later do all the operations with equally blown up values of pi and trig stuff from "lookup tables" (case matching).

load more comments (3 replies)
[–] alphabethunter@lemmy.world 12 points 2 days ago (1 children)

This is beautiful, and insane! But truly beautiful hahaha

load more comments (1 replies)
[–] mike_wooskey@lemmy.thewooskeys.com 8 points 2 days ago (2 children)

I'm viewing this thread in Lemmy and am unable to find any mention of a link to the source code or a demo, and I can't see the attached media (genetic image icon - is it an animated gif or a video?).

Based on all the comments, I appear to be in the [significant] minority. Would you mind posting a link to your source or demo or image/video?

[–] Pudutr0n@lemmy.world 19 points 2 days ago (15 children)

I haven't shared the source code yet because criticism is terrifying and I'm a horrible coder, but with the encouragement of the the community I might give it a shot. I don't even have a codeberg account yet though.

The post contains these two video links: https://files.catbox.moe/8rz9m7.mp4 https://files.catbox.moe/5d3n2k.mp4

If you still can't see them, maybe you can suggest a different hosting service, one that works for you? Or if you really really want the source code I suppose I could send it by DM on the meantime.

[–] oce@jlai.lu 12 points 2 days ago

There are millions of professional coders who couldn't do what you did there.

load more comments (14 replies)
[–] Pudutr0n@lemmy.world 4 points 2 days ago

here's the source code. :)

load more comments
view more: next ›