{"id":25959153,"url":"https://github.com/y785/moe-miho","last_synced_at":"2025-10-25T23:08:31.826Z","repository":{"id":57736820,"uuid":"213499666","full_name":"y785/moe-miho","owner":"y785","description":"Basic 2d spacial data for MapleStory🍁. Also includes a neat QuadTree \u0026 Binary Search Tree.","archived":false,"fork":false,"pushed_at":"2020-02-20T13:14:11.000Z","size":190,"stargazers_count":19,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-07-05T04:14:51.229Z","etag":null,"topics":["java","maplestory"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/y785.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-07T22:37:54.000Z","updated_at":"2023-04-04T12:59:11.000Z","dependencies_parsed_at":"2022-08-24T04:50:09.720Z","dependency_job_id":null,"html_url":"https://github.com/y785/moe-miho","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y785%2Fmoe-miho","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y785%2Fmoe-miho/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y785%2Fmoe-miho/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/y785%2Fmoe-miho/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/y785","download_url":"https://codeload.github.com/y785/moe-miho/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241898406,"owners_count":20039108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","maplestory"],"created_at":"2025-03-04T18:28:14.227Z","updated_at":"2025-10-25T23:08:26.789Z","avatar_url":"https://github.com/y785.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Miho\nBasic 2d spacial data for maplusitoree. Also includes a cute QuadTree \u0026amp; Binary Search Tree.\nI recommend using the Binary Search Tree for footholds as it usually has better results and is more memory efficient.\n\n### Maven\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003emoe.maple\u003c/groupId\u003e\n  \u003cartifactId\u003emiho\u003c/artifactId\u003e\n  \u003cversion\u003e1.2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Why?\nOdin's quadtree is quite bad. Really bad. In fact, just simply iterating an array shows higher benchmark scores. This has plagued every source for a long time now.\n```\n public Foothold findBelow(Point p){\n        List\u003cFoothold\u003e relevants = getRelevants(p);\n        List\u003cFoothold\u003e xMatches = new LinkedList\u003cFoothold\u003e();\n        for(Foothold fh : relevants){\n            if(fh.x1() \u003c= p.x() \u0026\u0026 fh.x2() \u003e= p.x()){\n                xMatches.add(fh);\n            }\n        }\n        ....\n```\n\nMiho's quadtree and bst are better. Example:\n```\npublic Foothold getFootholdUnderneath(int x, int y) {\n        var result = Result.of((Foothold) null);\n\n        root.searchDown(match -\u003e {\n            if (!match.isWall() \u0026\u0026 match.below(x, y))\n                result.setIf(res -\u003e res.compareY(match) == 1, match);\n        }, x, y);\n\n        return result.get();\n}\n```\n\n### Benchmarks\nThe benchmarks are by no means perfect, but they show some promising results. These were run with a mix of regular points and sloped points using ellinia's footholds. BST is the clear winner and is the 2nd most fault tolerant. The first obviously being the array iteration.\n```\nBenchmark          Mode  Cnt        Score       Error  Units\nBst               thrpt   20  2153434.103 ± 36622.564  ops/s\nQuad              thrpt   20   748475.970 ± 21468.748  ops/s\nLiterallyAnArray  thrpt   20   167335.920 ± 59497.594  ops/s\nOdin              thrpt   20    22285.210 ±   768.409  ops/s\n```\n\n### Images\n[Quad/BST Album for Ellinia](https://imgur.com/a/RB26Gw1)\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://i.imgur.com/SF6JgQ0.png\" tag=\"BST image of Ellinia\" width=\"200\" height=\"200\"\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy785%2Fmoe-miho","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fy785%2Fmoe-miho","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fy785%2Fmoe-miho/lists"}