Page 1 of 1

K1-3 maximum level size

Posted: Thu Nov 24, 2016 7:27 am
by KeenRush
I tried searching for this info but couldn't find it. I remember, back in whatever year, Spleen had a sensible theory or perhaps even valid info about it. If I remember correctly it was some constant that the width * height * planes * wordsize couldn't exceed. If anyone knows, let me know.

Posted: Fri Nov 25, 2016 8:40 am
by levellass
Well you CAN exceed the maximum size, in level volume, but if you do it gets overwritten with updating game data and you tend to get gibberish. This value is a bit over 10'000 words.

Posted: Sat Nov 26, 2016 3:57 am
by CommanderSpleen
Best I've figured is that the game allocates memory for 16,384 (0x4000) tiles and anything after that gets corrupted by other game data overwriting it.

128 x 128

256 x 64

n x (16,384 / n)

Posted: Sat Nov 26, 2016 6:12 am
by KeenRush
Yass, thanks both. I was sure it was considerably larger than Lass's estimation, because I've played levels that've been larger than 100x100 and they've been fine. I'll be staying under 0x4000 tiles but it's good to know.

Posted: Sun Nov 27, 2016 12:33 am
by levellass
Also, careful with your level heights and widths, the game doesn't like Keen having a position larger than 256 (Well 255 really) and can get a bit snitty on you.

Posted: Sun Nov 27, 2016 4:22 pm
by Benvolio
A young Benvolio, before learning a little bit of self-restraint, had 120x120 as his preferred level dimensions and never had problems at this size. I think 200 was the widest I ever used to make my levels but it's been a while. I also was probably limited by what Andy's KeenWright could tolerate.