• netizen@programming.dev
    link
    fedilink
    English
    arrow-up
    11
    ·
    10 hours ago

    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.

    • FunnyCoder@programming.devOP
      link
      fedilink
      arrow-up
      4
      ·
      5 hours ago

      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.

    • FunnyCoder@programming.devOP
      link
      fedilink
      arrow-up
      2
      ·
      6 hours 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. ψ(`∇´)ψ

      • FunnyCoder@programming.devOP
        link
        fedilink
        arrow-up
        21
        ·
        12 hours ago

        Just tell your boss it’s a mandatory Windows 11 ‘Surface Tension’ update. If the windows didn’t break, how would you know they’re made of glass? OwO

          • FunnyCoder@programming.devOP
            link
            fedilink
            arrow-up
            2
            ·
            6 hours ago

            It’s because liquid glass has zero surface tension until it hits the user32.dll barrier. I haven’t implemented ‘viscosity’ in the physics engine yet, so for now, the UI remains in a solid, shatter-prone state. Windows 11: The Glass Update.

    • FunnyCoder@programming.devOP
      link
      fedilink
      arrow-up
      15
      ·
      12 hours ago

      I am not responsible for any ‘Update your Resume’ meetings that result from this. But if you do it, please record the reaction of the first person who shatters their Outlook. ヾ(•ω•`)o

      • Scoopta@programming.dev
        link
        fedilink
        arrow-up
        5
        ·
        10 hours ago

        If this was here a week ago I might have rolled this out for April fool’s lol, I’m the domain admin for a small company and I’m pretty sure I could get away with it for the occasion, maybe if I remember next year

        • FunnyCoder@programming.devOP
          link
          fedilink
          arrow-up
          3
          ·
          6 hours ago

          Put it in your calendar for next year! The “Lite” version is actually perfect for GPO deployment because it’s a single portable .exe that deletes itself after one “event”. It’s the ultimate hit-and-run prank—no uninstaller needed, just one confused employee and a lot of loud meme audio lol.

  • FunnyCoder@programming.devOP
    link
    fedilink
    arrow-up
    76
    ·
    17 hours ago

    I’ve been practicing my “API Abuse” skills and created a desktop toy that gives your windows “fragility” consequences.

    The Cursed Technical Details Areeeee:

    • The Mouse Thief: To prevent a “teleportation” bug when the window shatters, I’m using user32.dll to send a MOUSEEVENTF_LEFTUP signal. It literally prys the window out of your hand if you drag it too fast.
    • The Snapshot: It uses DwmGetWindowAttribute to find the exact frame bounds (ignoring those invisible Windows shadows) , takes a screen capture, and replaces the real window with a WPF PhysicsCanvas.
    • The Physics: Each shard is a Polygon shape with its own VelocityY (gravity) and RotationSpeed.

    The Chaos (Warning: LOUD Audio): The GIF is silent, but I recorded a short demo with “m e m e” sound here: https://youtube.com/shorts/9bTcgtLpOXQ

    The Project Page: If you want to break your own desktop, I put a free lite version on Itch. It also supports custom .wav modding if you want to swap the sounds for your own stuff. https://erza-lotus-arcane.itch.io/please-drag-me-gently

    • FunnyCoder@programming.devOP
      link
      fedilink
      arrow-up
      48
      ·
      17 hours ago

      Thanks lol! I spent way too much time reading old Win32 documentation just to make a joke app, so I’m glad the “API abuse” is being appreciated yike. 〒▽〒