• OsrsNeedsF2P@lemmy.ml
    link
    fedilink
    arrow-up
    26
    ·
    18 days ago

    Back when I was a wee bit Java noob, I was trying to write a RuneScape bot to play Soul Wars. I had a basic recursive pathfinding algo for figuring out how to walk around the map, but it blew out of memory very quickly (each tile has 4 options, do that recursively, etc). So I added caching. Anyways, I never cleared the caching. So after 20 minutes of running the script, you had like 2GB of allocated RAM calculating the best path from any 2 tiles in the minigame.

    Great times. No amount of language safety features would have saved me from that stupidity.