Legacy GM Resize room using DS grid?

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
 
S

Salvakiya

Guest
I suppose you could do something like that. I personally would not. in fact I sometimes have a 2000x2000 game play area when the room size is actually only 640x480 and things still work just fine.
 
The "size" of rooms are completely artificial, and really only used by the built in view control. If you were to taker over control of the view, you can theoretically move an infinite distance in all directions. It's not the "size" of the room that counts, its how you use it.
 
Top