this post was submitted on 01 Sep 2026
517 points (98.5% liked)

Programming

28402 readers
371 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
[–] spacegoat@lemmy.world 19 points 6 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 6 days ago

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

AI killed like 10 whales for this.

[–] HeHoXa@lemmy.zip 7 points 6 days ago (1 children)
[–] Pudutr0n@lemmy.world 4 points 6 days ago
[–] lenabee@lemmy.blahaj.zone 3 points 5 days ago

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

[–] AnarchistArtificer@lemmy.world 44 points 1 week 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 5 days ago

How about DOOM on a 1956 vacuum tube computer?

Doom on the oldest digital computer in America

[–] Pudutr0n@lemmy.world 18 points 1 week 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.

[–] glizzyguzzler@piefed.blahaj.zone 38 points 1 week ago (20 children)

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

[–] Pudutr0n@lemmy.world 7 points 6 days ago (1 children)
[–] glizzyguzzler@piefed.blahaj.zone 4 points 6 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 6 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 6 days ago* (last edited 6 days ago) (1 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

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

nice! I'm still working on and have kept adding features. the encouragement was really motivating, so now I'm finishing multi-dice rolls that later add the result of all rolls.

If you want an updated version later on, would be glad to share w you. :)

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

Wooo! Glad you're enjoying.

Also, nice rolls. :)

load more comments (19 replies)
[–] oce@jlai.lu 37 points 1 week 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 1 week ago (8 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.

[–] Cethin@lemmy.zip 2 points 6 days ago (1 children)

Since you're rolling on a plane, can't you simplify the collisions to only check the corners? I think that should be all that's needed. There shouldn't be a time where the edges or faces are below the lowest corner on a plane, so they can be skipped I believe.

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

i need to check the corner collisions but when the die start settling and an entire edge comes close to the floor, gravity keeps pulling back on several of them making them bounce back just a tiny bit, not reaching the velocity that gets rounded to zero.

I fixed that on the current version doe!

[–] ravenn@lemmy.blahaj.zone 1 points 6 days ago (1 children)

why not save the state of the di(ce) in the settling phase and choose (or allow user assignable) value for how many consecutive identicle states before freezing the di(ce) and reporting the result?

my only concern would be a "spinning" di but short of colliding with other dice, that seems technically solved

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

that's one of the aspects of the current implementation

load more comments (6 replies)
[–] farmgineer@nord.pub 22 points 1 week 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 1 week ago

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

load more comments
view more: next ›