[Housing] Can't make overly huge rooms.

TripDering

Green Slime
So I was messing around in my house, trying to find the maximum dimensions for a room.

Starting from the smallest possible beginning room, you can expand 189 ticks north (before you reach the actual house map north wall), then 98 ticks west (again, hitting a wall).

The problem arises when you try to expand east (using the previously expanded room to start with) - going a simple 26 ticks causes the game to crash with the following error message:

Code:
Version: 0.707a Steamy Hot Unstable

Error: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Bagmen.HousingBagman.CheckIfCan_RoomResize_Resizing() in (path)\Housing\HousingBagman.cs:line 5752
   at Bagmen.HousingBagman.ProcessInput(LocalInputHelper xGameInput, LocalInputHelper xMenuInput) in (path)\Housing\HousingBagman.cs:line 5460
   at SoG.Game1._IngameInput_Handling() in (path)\InputHandling.cs:line 219
   at SoG.Game1.Update(GameTime gameTime) in (path)\Game1.cs:line 989 - FullScreen: No - NetworkRole: LocalOnly - MD5: 1ba806410a07843ba1ab50f6523f2ccb

Further testing revealed that the northern expansion means nothing.
The room simply cannot be longer than 123 (plus the default) ticks wide.
 

Teddy

Developer
Staff member
Nice catch! I forgot that the wall has twice the "resolution" of the floor tiles, and so they take up more slots! I was taking into account only the floor tiles, assuming that the maximum width would be 255 (the maximum value of a byte). With wall cells being half the width of a floor cell, however, the maximum room width becomes 255/2 = 127.

In other words, the width limit for a room is 127, and the bug fix will not increase this but rather avoid the crash by refusing to increase the width beyond this.
 
Top