Share your cool programs!

  • xthexder@l.sw0.com
    link
    fedilink
    arrow-up
    21
    ·
    edit-2
    6 hours ago

    I’ve been working on my own game engine for years, and there’s all sorts of cool stuff it can do, but recently I’ve been expanding the scripting to be capable of streaming images to the GPU.

    Today I got Doom running inside my engine as a hot-reloadable plugin script:
    Video: https://wednesdayos.sw0.com/share/2025-12-13_00-25-14.mp4

    The engine has real-time bounce lighting using a highly modified voxel cone tracing algorithm I developed (doesn’t require ray tracing hardware), which I’ve been able to get running even on my Steam Deck! Video: https://wednesdayos.sw0.com/share/2025-03-21 23-50-29.mp4

    The whole thing is open source here: https://github.com/frustra/strayphotons

  • anton@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    3 hours ago

    It’s either printf and stack unwinding in assembly or something to test all possible execution path for very simple multi threaded programms.

  • Captain Aggravated@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    7 hours ago

    Okay, so you know the trope in spy movies where the launch codes or the diamonds or whatever are at the end of a hallway full of lasers, and the protagonist has to do some cool flip moves (if male) or some slinky contortions (if female) to get around the lasers?

    I made that as an arcade game with an Arduino. Some red laser pointer diodes, some photosensors, a few lights, bells and whistles, a fog machine, a few big ol buttons, and you’ve got spy laser hallway. It had a separate “break as many lasers as you can” mode as well, played like a combination of DDR and whack-a-mole.

    The second coolest thing I ever programmed was probably the GPS MP3 player. A farmer wanted to add an automatic soundtrack to his Halloween hayride, like when the drove through the spooky graveyard it played ghost noises, it would play music for longer stretches on the road. I used a Raspberry Pi with a GPS HAT and wrote up a script in Python that would compare the actual position with a set of coordinates stored in a text file, and if one matched, it would play an associated mp3 file. The effect was kind of lost because the audio was coming from the vehicle itself, but it’s a hay ride, it’s supposed to be kind of lame. The bedsheet ghosts said woo as you drove past, I’m in the special effects industry, dad.

  • Quicky@piefed.social
    link
    fedilink
    English
    arrow-up
    5
    ·
    8 hours ago

    In the 2010s I had a Windows Phone which I thought was amazing. I bought the original Surface Pro too, because at the time I thought it was incredible. A full operating system in a tablet form factor that was incredibly fast and touch screen.

    In the IT office I worked in, we had a dartboard. It was great for just stepping away from your desk if a problem had stumped you, throwing a few darts to take a break, and inevitably the answer would come to you. It was our rubber duck.

    Trouble was, all of us were terrible at the basic maths involved with darts matches. So I thought, what if we mounted the Surface to the wall, and could just tap where the dart had hit, and get scores instantly.

    So I wrote this darts score-keeping app that worked on everything from Windows Phones to tablets, and even an Xbox at one point, thanks to the way Microsoft had implemented their cross-device app deployment.

    We used it every day in the office. I think in 10 years it’s sold about 3 copies.

    Lovely Darts

  • maxy@piefed.social
    link
    fedilink
    English
    arrow-up
    10
    ·
    10 hours ago

    I’m still proud of my rendering of the logistic map. It was mostly just to learn more Rust, but it rendered this beatuiful picture with relatively little code. And mostly by accident, I didn’t know I would get those cool shadows!

    image

  • Undertaker@feddit.org
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    8 hours ago

    I implemented a self made or at least adapted ant based algorithm to solve a mathematical problem. Each ant walks a route which represents a possible solution. The shortest path is the best solution. It takes advantage of swarm intelligence.

  • slippyferret@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    25
    ·
    14 hours ago

    A long time ago I wrote a little web app that takes a search string and finds all the words in the dictionary that have overlap with its spelling. Sort of a portmanteau generator. It was just a fun project at the time, but I have used it on countless occasions to brainstorm unique names for projects, websites, etc.

    You can try it from the link below. Just type any word or name and it will populate the results.

    https://dev.djdupriest.org/name-combinator/index.html

  • sbird@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    10 hours ago

    I have a program called “country guess” that I made a year ago where it’s like the Sporcle quiz but with a) the proper UN recognized countries (with options for some of the partially recognized ones), b) completely offline since it’s made with half-baked Python and c) it’s text-based (ASCII art maps and all). It times how long you took to complete it, but there is no time limit. It also accepts alternative names, just like the Sporcle quiz (e.g. “uk” or “usa”)

    The way I did it was incredibly time consuming though, as it relied on a whole load of string formatting to show the ASCII map with countries highlighted (each country is a list of either whitespace or hashes #), meaning I had to manually copy and past the white space of the ASCII maps I found for each and every country. No wonder why I never finished it. It also had the flaw of not showing the country names in the big countries, with all of them shoved to the bottom of the map, meaning when you are close to finishing, you can’t see both the map and the countries you got right.

    As of right now, I think it has the continents of Africa, Europe, and the Americas, as well as Oceania. Not Asia though (there are simply too many countries there!) and the world, since I never bothered to finish it. If I recall correctly, the partially recognized territories I included that actually worked were Western Sahara, Somaliland, and Kosovo. I also had the optional UN observer states of the Vatican and Palestine.

    Do note that the python program requires the modules “colorama” for colourful text and “art” for ASCII text headings I think.

  • dgdft@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    edit-2
    13 hours ago

    In high school, we used to play a game colloquially called Spoons/Assassins/Spoon Assassin/Marker tag. Long story short, everyone playing gets assigned another player as a target. You tag your target on the back of the neck with a spoon or marker to “kill” them + take over their assignment. Rinse and repeat until only the winner is standing.

    Major catch here is that for the game to work properly, the targets have to be chained in a loop, so there usually has to be a trusted individual running the game who can validate the assignment list.

    So I scraped the online school directory to pull names, emails, and school photos of everyone. Then I built a Java Swing app to track a list of who was playing, and the app would shuffle a random list and email everyone their assignments blindly, photos included. Flash forward a few months, and eventually we had a full roster of ~80 people playing across grades, which was ~10% of the student body.

    Unfortunately, a group of freshmen started their own take on the game, which devolved into mauling one another with Crayola markers and Sharpies. The principal catches word that I’ve been running a ring, and brings me into his office to tell me to shut it down.

    Uncharacteristically for my teenage years, I went all-in on diplomacy. I plead my case, tell him I’m not involved with the freshmen, hear out his concerns, volunteer to modify the game rules, and point out that our group been playing for months without issues. No dice; the dude was a jackass with a chip on his shoulder. So we come to an impasse, staring at one another in silence.

    Eventually, to break the silence, he asks about a stray bandage I have sticking out the top of my shirt. I’d had a small melanoma removed from my collarbone that week, which was caught as early as possible and removed without issue. Seizing the opportunity, I tell the principal “I have cancer”, and immediately walk out before he could formulate a response. Poor dude went white as a sheet. Good times.

    Bit of a lame ending for the app, but building it taught me the skills I used to jump-start my career, and drove home the point that software isn’t an end unto itself — it’s the way people use it to come together that makes things great.

  • AnarchoEngineer@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    8
    ·
    12 hours ago

    My first project in Rust was replicating this paper because i wanted to learn rust but needed a project to work on because i hate learning from tutorials.

    Of course, I had intended to go the OOP route because that’s what I was used to and this was my first time using rust… that was a bit of a headache. But I did eventually get it working and could watch the weights change in real time. (It was super slow of course but still cool)

    Anyway I’ve started making a much much faster version by using a queue to hold neurons and synapses that need updating instead of running through all of them every loop.

    It’s like lightning fast compared to the old version; I’m very proud of that. However, my code is an absolute mess and is now filled with

    Vec<Arc<Mutex<>>>
    

    And I can’t implement the inhibition in a lazy way like I did the first time, so that’s not fun…