breaking the 40x22 barrier

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andrew Davie

I've just rewritten the cave data and all the related board scanning systems to have dynamic dimensions. Previously the cave extents were 40x22, with smaller caves being drawn inside a virtual 40x22 board and the scroll limited.

This all came from way-back - the original Boulder Dash code, which used a 40x22 board because that's the size that the BD caves were. And it's kind of carried over for literally years -- because the systems were pretty much hardwired to having a board width of 40, and looking at -40 for the character above, and +40 for the character below.  It was everywhere.

Well, I spent a couple of hours going through all the code and making it dynanic. Now the whole system uses the cave size defined in the cave data itself. The constraints are now: maximum X 128 chars, maximum Y 128 chars, and the maximum board size 1024 chars.  So, _MAX_ROWS * _MAX_COLS < 1024

In this first-pass test cave, I have an 80 x 12 cave. You can see it's really really wide.  In fact this one is double the width I could have before. But more interesting will be the verticals, because 22 was the previous limit. Now I can have a cave waaaay deeper.

Obviously, 1024 is still a limit -- I can extend it to available RAM -- but the point is it's now dynamic and I can have clearly different types of caves.  And, of course, it's less like BD and thus claimably not the same at all.