Atroxian Realm (Version 1.2 Released)

Here is where to post about the latest Commander Keen fangame or modification you've finished, a new website you've made, or another Keen-related creation.
User avatar
K1n9_Duk3
Vorticon Elite
Posts: 563
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: Atroxian Realm (Version 1.2 Released)

Post by K1n9_Duk3 » Mon Nov 11, 2019 22:40

Hisymak wrote:
Mon Nov 11, 2019 19:59
Well, what if this code is added into the game, but made optional.
This might work in theory, but you need to realize that Lemm's code is not a simple replacement of the original drawing code. You need to modify a lot more than just one function. Adding all the checks that would allow you to have both versions in one executable and swap between them by changing one variable requires a not insignificant amount of new code, which also takes up precious memory.

Also, Lemm's code requires that the "shifts" settings for all the sprites are set to 1 in the EGAGRAPH file. This is what actually lowers the memory requirements (instead of 2 or 4 copies of the same sprite, the game only has to keep one copy in memory). So in theory, you would need a new EGAGRAPH file. The game could be told to ignore the "shifts" value (or pretend the value is set to 1 when in "shiftless" mode), but again, that means more code.

I'm not saying it would be impossible to add all this code. I just don't want to do it, at least not right now.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

User avatar
K1n9_Duk3
Vorticon Elite
Posts: 563
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: Atroxian Realm (Version 1.2 Released)

Post by K1n9_Duk3 » Thu Nov 14, 2019 23:17

keenmaster486 wrote:
Sat Nov 09, 2019 15:04
@K1n9_Duk3, I'd like to bring to your attention that AR 1.2 now fails to load without a "low on memory" error on real DOS. I've tried with JEMMEX too, which gives me the largest free amounts of conventional, upper, XMS, EMS, etc.
Well, I think I found a solution for that. As it turns out, I could just use one of my tools to reduce the amount of memory that was taken up by the sprite graphics. The tool removes any unnecessary fully transparent parts of the sprite images and adjusts the offsets to compensate for that. This brought the memory requirements down to just under 491k to play all the levels with music enabled. Here's a screenshot showing level 8 (Security Layer) working just fine with (a bit over) 490k of memory available to the game and less than 1k of memory to spare:
Image
(In version 1.2, that level required about 518k with music and 481k without music.)

As long as you have at least 455k of memory available to the game, you should never encounter an "out of memory" crash in the new version. Music will be disabled for a few levels, but you should at least be able to play through all the levels without encountering any crashes. Even with the XMS-related bug, 455k should be possible under real DOS. I have 474k available to the game on my primary DOS 6.22 system.

I also added some hacks for better memory management (i.e. avoiding memory fragmentation). This should have no negative impact while playing in DOSBox at the default settings, but it will come in handy on real DOS systems.

Atroxian Realm Version 1.3 (Source Code)
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

User avatar
keenmaster486
Vorticon Elite
Posts: 511
Joined: Sun Mar 20, 2016 18:29
Location: Tranquility Base
Contact:

Re: Atroxian Realm (Version 1.2 Released)

Post by keenmaster486 » Sun Nov 17, 2019 20:07

K1n9_Duk3 wrote:
Thu Nov 14, 2019 23:17
keenmaster486 wrote:
Sat Nov 09, 2019 15:04
@K1n9_Duk3, I'd like to bring to your attention that AR 1.2 now fails to load without a "low on memory" error on real DOS. I've tried with JEMMEX too, which gives me the largest free amounts of conventional, upper, XMS, EMS, etc.
Well, I think I found a solution for that.

---
Wow, holy crap, man! Good stuff!

I had read your previous post and thought to myself "well, if I have some free time I'll try to add that code and recompile the project." But here we are with another version!

I'll give it a shot as soon as I get the chance.
I flermmed the plootash just like you asked.
Very silly indeed: https://audaxeundum.wordpress.com/

Post Reply