Aedalus / malwoden

A JS/TS roguelike library.
MIT License
30 stars 2 forks source link

Additional map generators, lighting, and Dijkstra maps. #136

Open avinashv opened 1 year ago

avinashv commented 1 year ago

Is your feature request related to a problem? Please describe. The limitations in map generation algorithms will inevitably lead to reimplementing the same thing over again--it would be nice for it to be baked in.

Lighting is possible to bootstrap with FoV, but it feels ugly and tacky, and a large map with many entities that are simultaneously processing FoV may result in performance issues.

Dijkstra maps are not so straightforward to implement and would be welcome additions to really add to the abilities of the framework. I've attempted to bootstrap this myself and am very out of my depth.

Describe the solution you'd like

Describe alternatives you've considered rot.js is really the only thing but attempting to merge the two together doesn't result in the cleanest of code.

Additional context Is this library going to continue to be updated? It would be a shame for something with so much great work done so far to not continue!

seawaffle commented 1 year ago

I think it's safe to assume it's been abandoned. No commits in over a year, and the tutorial doesn't even have the last chapter added to the website (even though it's in the repo). I do really like a lot about Malwoden (primarily the input and gui portions), and I'm sticking with it for now, but a more active library would be nice. You're right about trying to merge rot.js functions making for ugly code, I've been rewriting certain rot functions to work nicer inside my game with the Malwoden functions.

As to some of your specific points:

avinashv commented 1 year ago

@seawaffle It's a shame but you're probably right that it's abandoned.

Correct that I ripped copiously from the Rust Roguelike tutorial (I mentioned it in my implementation notes, but I should have made it clearer in the code as well). I did add bit sets for the diagonals to improve the tiling a bit more compared to that tutorial, commit here.

I have implemented several of those more famous algorithms already in other languages, and fortunately the Rust tutorial explains it well enough that along with Roguebasin's explanations, it's not too hard to figure out. Having it implemented within the library and have a lovely optimized version was really the goal.

The Dijkstra implementation is absolutely lovely, thanks for that. And in Typescript! I will be using that for sure!