you are viewing a single comment's thread
view the rest of the comments
[–] 18 points 4 months ago (2 children)

I remember having to program a trap for double-clicking buttons in an application.

Then I had to implement a penalty for triple-clicking.

Later, I converted it to a progressive incremental penalty.

  • source
  • hideshow 4 child comments
  • [–] [S] 6 points 4 months ago (2 children)

    I’m actually surprised no one’s roasted my math in ShatterCanvas.xaml.cs yet—I’m basically faking the 'gravity' by just incrementing VelocityY every frame. It’s surprisingly lightweight for how many polygons are flying around.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 7 points 4 months ago (1 child)

    What is acceleration other than increase in velocity over time? Nothing to roast!

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 4 months ago (1 child)

    Haha, fair point! I guess I spent too much time looking at the code and thinking "this feels too simple to work". But hey, if it hits the bottom of the screen and satisfies the VelocityY math, it’s a feature, not a bug. Glad to see another dev who appreciates the simple approach.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 4 months ago (1 child)

    I remember the first program I wrote where I implemented gravity. I too was amazed at the simplicity. But that simplicity is only in hindsight. You stumbled into physics when you thought you were just programming.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 1 point 4 months ago

    That’s a beautiful way to put it. I definitely went from "how do I move a polygon" to "wait, why does this feel like it has weight?" in about 10 lines of code. It’s wild how much of the physical world is just hidden in a simple $v += g$ loop. Definitely an "ah hah!" moment I won't forget. 〒▽〒

  • source
  • parent
  • [–] [S] 2 points 4 months ago

    Incremental penalties are the way! I see you’re also a student of the 'Hostile UX' school of design. Shaking the window is basically the ultimate progression of button spam—once you exceed the velocity threshold, the UI simply quits on you. ψ(`∇´)ψ

  • source
  • parent