Another day, another sizetest

So there’s been some refactoring to how rooms are created, a new set of room tiles made a couple of weeks ago, the addition of some more realistic torch placement in the deep dark cave and it seemed like it was time to run my ‘SIZETEST’ map again just to get a feel for things.

The ‘SIZETEST’ is set to a base of 2500 rooms, far larger than anything expected in the finished game.  Currently, it ends up being 2674 rooms in the cave biome.  The base size is used to generate a rough estimate of a given maze/dungeon size, but other factors and randomizations will throw that off by a factor.  At any rate, clearly the refactoring has been good.  With only general logging enabled, it now only takes ~3 seconds to create that 2674 room behemoth pictured below.

That leads me to another thing that my day job should’ve taught me, but that somehow had been slipping my mind of late – logging is a resource hog.  Turning on the full compliment of logging nearly doubles the generation time.  Still, even with logging now, it takes ~6 seconds with logging.  Previously, the SIZETEST was taking closer to ~35-45 seconds to generate.  This is pleasing.


Same map without the room-stage color coding, so you can see the lighting placement.

Screen Shot 2016-08-14 at 8.26.19 PM

Trying to figure it out – how to place items along colliders

In the first “Trying to Figure it Out” segment, I’ll share a question I posted on Stack Exchange.  Sometimes things just aren’t that easy to figure out, and crowd-sourcing an answer, or at least some guidance, can save huge amounts of time.

First entirely unique rooms in the game

Screen Shot 2016-08-03 at 9.31.22 PM

A couple of the first unique rooms in the game (interestingly this screenshot shows two of the same room – oops!) with lighting from a single torch.

Tiled and Tiled2Unity are both saviors, but neither come without a few major question marks.  Interestingly, right now every time I import a new room into my project, I have to reimport the tileset, even though it doesn’t change at all.  Not quite sure what’s up with that.  But it’s a minor headache.

I’ve switched to a properly top-down perspective player character as well.  It’s a place holder with no animation, but it gives a better feel for scope, motion, and lighting.  The movement script is a bit weak, and something funky is going down with the rotation of the sprite – sometimes he just rotates eternally for no good reason after coming to a stop.  It’s the joy of figuring out these little things that cause development time to increase.

Remember, great ideas don’t always lead to great code.  Hell, great code doesn’t even always lead to great code, and first attempt code is rarely great.