matt-kimball / godot-mrpas-assetlib

Godot asset library MRPAS implementation
MIT License
17 stars 0 forks source link

Consider adding an option for an 'offset.' #1

Open funkyskunk1 opened 2 months ago

funkyskunk1 commented 2 months ago

Hello, I am an aspiring roguelike developer and this code is super useful. I have a problem, though. I use a random walk algorithm to generate dungeons with a tilemap and the algorithm starts at 0, 0 and moves around randomly. For the MRPAS size, I use get_used_rect().size

the problem is that the FOV doesn't work in my case because parts of the dungeon are in negative space, so there's a mismatch between the tile positions and the data in MRPAS. If I could add an offset to the MRPAS, such as by doing get_used_rect().position it would be very useful.

Either way, thank you for making this and keeping it updated. I appreciate it a lot.

matt-kimball commented 2 months ago

If I am understanding your issue correctly, it seems like it could be solved in the MRPAS module provided an alternate initialization which would, instead of taking a size parameter, instead take a bounding rectangle with min and max coordinates. This seems like a reasonable thing to add. Am I understanding correctly?

funkyskunk1 commented 2 months ago

Yes, that would solve the problem. Once again, thanks for the MRPAS module. I apologize for not explaining properly

matt-kimball commented 2 months ago

No worries, my friend. I'll work on adding a bounding rectangle initialization this coming week.