K1-3 maximum level size

Request patches for Keens 1-3.
Post Reply
KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

K1-3 maximum level size

Post by KeenRush » Thu Nov 24, 2016 7:27 am

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.

levellass
Posts: 2895
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass » Fri Nov 25, 2016 8:40 am

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.

User avatar
CommanderSpleen
Posts: 1014
Joined: Sun Aug 31, 2003 12:11 pm
Location: The Land of Sparkly Things
Contact:

Post by CommanderSpleen » Sat Nov 26, 2016 3:57 am

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)
Last edited by CommanderSpleen on Sun Jan 08, 2017 6:38 am, edited 1 time in total.

KeenRush
Patch Maker
Posts: 1988
Joined: Sun Aug 31, 2003 2:52 pm
Location: Sand Yego
Contact:

Post by KeenRush » Sat Nov 26, 2016 6:12 am

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.

levellass
Posts: 2895
Joined: Wed Oct 11, 2006 12:03 pm
Location: Ngaruawahia New Zealand

Post by levellass » Sun Nov 27, 2016 12:33 am

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.

Benvolio
Posts: 214
Joined: Sun Aug 29, 2004 4:44 pm
Location: Ireland
Contact:

Post by Benvolio » Sun Nov 27, 2016 4:22 pm

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.

Post Reply