G
gaz_d
Guest
Ok, I have a procedurally generated level in my game (from a marketplace engine, not my code) and before it makes the dungeon style level, it makes the room size HUGE, I guess so it never accidentally goes outside the room, then it generates the level in the middle of the room.
Everything works fine but for mini map reasons, I really need to change the room size to be only as big as it needs to be.
My thoughts are, after the level is generated I would create a grid to find the first and last instance of obj_wall on the x axis, then the same on the y axis and then resize the room to these co-ordinates? Not sure if this is right and I have no idea how to properly write it, I guess "for loops" but I'm still a bit of a novice.
Any help would be massively appreciated.
Thanks
Everything works fine but for mini map reasons, I really need to change the room size to be only as big as it needs to be.
My thoughts are, after the level is generated I would create a grid to find the first and last instance of obj_wall on the x axis, then the same on the y axis and then resize the room to these co-ordinates? Not sure if this is right and I have no idea how to properly write it, I guess "for loops" but I'm still a bit of a novice.
Any help would be massively appreciated.
Thanks