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)

you are viewing a single comment's thread
view the rest of the comments
[–] 8 points 5 days ago* (1 child)

maybe just "if velocity < 0.01, find which side is closest to the floor, and if its within 1mm of the floor, take the opposite side (the one facing up) as the answer"

The only edge case I can think of is if it gets close to balancing on an edge, and then finally tips over to one side or the other. But in that case I don't think the face closest to the floor would be within 1mm of the floor, so it should still work.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 6 points 5 days ago (1 child)

    that's how it's implemented, mostly, but sometimes dice "stop" while they're still tilted and standing on a corner (and then roll back down, possibly going back more than 1 face) so there's also that.

  • source
  • parent
  • hideshow 2 child comments