Page 4 of 6

Re: Operation Ocflore

Posted: Mon Jan 20, 2020 10:55
by Bubbatom
I'm glad I left it a while before releasing a revision guys, thanks for your input and feedback! There's always things that I miss and I'm getting this thing tweaked and ready for an update.
proYorp wrote: Sat Jan 18, 2020 5:05 Random question, why is the palette alteration done with an external program, rather than a patch? This also has a funny side effect, if after exiting Ocflore you change directory in DOSBox to start a different game:
Image
Yeah I've noticed this side effect, weird! I don't think a patch was possible for this when I implemented it. lemm put me onto the program and I stuck with it, I don't know if there's any other way to achieve the colour swap.
Nisaba wrote: Sun Jan 19, 2020 13:29 @Bubbatom this wasn't any help, was it?! --> https://keenmodding.org/viewtopic.php?f=24&t=3380
I played around with it a little and decided that it might be too much work considering I couldn't have two separate end game texts. I would've liked this mod to have had two endings but I don't know how much longer that would've made the release.
Gridlock wrote: Mon Jan 20, 2020 0:43 Speaking of these enemies, wooooow that part in the secret level with a bunch of them was hard as heck.
Haha I think this is an accomplishment in itself as you must not have shot these guys! That part is hard enough even when you stun them!

Re: Operation Ocflore

Posted: Mon Jan 20, 2020 14:37
by Syllypryde
This is definitely a fun mod. The graphics, music, level design and enemies are pretty much all top notch. I have been playing it hours on end all this weekend and an hour or two today. Though most Keeners start on normal, as I have said in the past I like to complete the game on all skill levels and master the game with collecting everything, complete every level and explore every inch of each level. I have beaten the game on easy twice and have begun my normal run. Right now I am stuck on Frigid Quarry, and I seem to be getting lower and lower on ammo for each failure to complete the level. I am sure I will get past it soon enough. My determination is what has gotten me so far in official games as well as a good half to 3/4's of all the available mods, Vorticon as well as Galaxy.

It might be just as well that there are not two alternate endings, as cool as that would have been. The reason is this, the story mode implies that Keen can choose his allegiances. He can side with the Dorsal or the Ormch, hence an alternate ending for each allegiance. Siding with the Dorsal means you cannot shoot them, the Enkri or any Savanaks that might still be alive. It also means you cannot play the secret level Dorsal Battleship, because playing that level and destroying that battleship would be siding with the Ormch. So allowing Keen to choose who to side with not only makes the game confusing and even harder if you cannot shoot certain creatures, but means you cannot play the secret level either if you side with the Dorsal. I would prefer not to be restricted.

Pretty much all the errors have been found already, so I have nothing to add to this. I only have one gripe and it is a very minor one. In Keen 4 and most of it's modifications, Lindsey and her replacements offer valuable clues within the game. The Dorsals offer little to nothing as far as clues. Yes, one of the Dorsals says you only need to find 3 ancient relics, but this is redundant because you are already told this in the story section. The Dorsal in Dorsal Obelisk says you are almost there. Almost where? Almost to the ancient relic or almost to the end of the game? If this means to the end of the game, this it is out of place if you complete Dorsal Obelisk first or second instead of last. Like I said, just a minor gripe.

This mod seems pretty hard just on easy. I can only imagine how hard it will be on normal and hard. Like I said, I already started my normal run and I'm already stuck on Frigid Quarry with only 3 levels complete. I will get farther I promise you.

Re: Operation Ocflore

Posted: Mon Jan 20, 2020 22:29
by K1n9_Duk3
proYorp wrote: Sat Jan 18, 2020 5:05Random question, why is the palette alteration done with an external program, rather than a patch? This also has a funny side effect, if after exiting Ocflore you change directory in DOSBox to start a different game:
Image
Well, if a solution already exists, why re-invent the wheel? If you're not intimately familiar with the Keen games' code as well as EGA/VGA graphics programming, it's much easier to use a tool that "works" rather than implementing it as a patch. If it weren't for the 386 code in it, it would be a perfect solution, since it doesn't take up any additional memory while the game is running.

By the way, if you run "defpa 1" after quitting the game (or just add that command at the end of OCFLORE.BAT), you won't get the color issues you mentioned.

Re: Operation Ocflore

Posted: Tue Jan 21, 2020 4:16
by Bubbatom
Alright, the first revision is completed and can be downloaded from the first post in this thread or here: https://www.dropbox.com/s/m8btdabl33ogx ... e.zip?dl=0

This update addresses the following:
- Pererro hitbox fixed
- Blue bird replacement hitbox fixed
- tile issues and bugs (water edges etc)
- typos
- made it a bit clearer that you must save Ocflore and destroy the Ormch threat within F1 Help menu
- increased ammo in Frigid Quarry
- levels with keys hidden in coral walls are made more clear as to their placement and Swallowed Spire has been made more linear to avoid players getting lost
- Petra-ped hyphen added in F1 Help menu
- Lindsey replacement (Dorsal) now give hints instead of useless info!
- that plank in the water everyone has been trying to land has been moved under a jetty to avoid confusion!
- music volume levels of quieter tracks have been increased

I'm sure there will still be a few things that people come across that will need to be tweaked and there may be a few added patches and songs in a future update. I might try to increase the contrast of tree branches against backgrounds too.

Thanks guys!

Re: Operation Ocflore

Posted: Tue Jan 21, 2020 4:51
by Roobar
So will the saves from the old version works?

Re: Operation Ocflore

Posted: Tue Jan 21, 2020 5:32
by 55Aavenue
I just finished this on normal. I have to say, this is one of my favourite Keen mods. I am blown away by the graphics. The slight altered colour palette, sound effects, unique gem items, and new dying animations all make this mod more feel like its own unique Keen game rather than just a Keen 4 mod.

The level design was really good, non-linear and requiring some exploration without being too confusing or having too much back tracing. I did find this mod pretty difficult on normal mode, and it got hard pretty quick too, almost right out of the gate. I shudder to think what hard mode will be like.

I did, like some other people mentioned, find the ammo a little scare, but it looks like thats been addressed in the update. I also agree with others that the tree leaves were hard to distinguish as a solid platform. There was one level I was stuck on for awhile not knowing where to go because I had no idea you could stand on them.

Overall, this is such an excellent mod, I really enjoyed it and am stoked I got to make some music for it!

Something I noticed on the updated version is the song that originally played on Ancient Observatory (ocflore7) is now replaced with the Pelagic Pillars song (ocflore6), and the original Ancient Observatory song is no longer in the game. Since the patch file doesn't reflect this change and still shows all the same song values as the first version, I am thinking this probably wasn't intentional and an IMF file got accidentally replaced when the slightly louder song versions were put in?

Re: Operation Ocflore

Posted: Tue Jan 21, 2020 7:40
by Bubbatom
55Aavenue wrote: Tue Jan 21, 2020 5:32Something I noticed on the updated version is the song that originally played on Ancient Observatory (ocflore7) is now replaced with the Pelagic Pillars song (ocflore6), and the original Ancient Observatory song is no longer in the game. Since the patch file doesn't reflect this change and still shows all the same song values as the first version, I am thinking this probably wasn't intentional and an IMF file got accidentally replaced when the slightly louder song versions were put in?
You're right, I just had a play around and I think that the track "Ocflore7louder" is actually a louder version of "Ocflore6" that you sent through. It sounds like "Ocflore7" is the track that needs the volume raised a tad but you might have mistaken 6 for 7 and renamed 6 as 7? or something like that?

Either way I have put "Ocflore7" back in for the Ancient Observatory and updated the link, let me know what you think!

Re: Operation Ocflore

Posted: Tue Jan 21, 2020 12:28
by Bubbatom
Roobar wrote: Tue Jan 21, 2020 4:51 So will the saves from the old version works?
I'm not sure, I think from past experience with Suburbs they probably won't, worth a try though.

Re: Operation Ocflore

Posted: Tue Jan 21, 2020 13:40
by Nisaba
may I ask you to write an abstract of the updated story for our KeenWiki, please? you can simply send me a pm and I'm gonna take care about all the rest. (editing, hyperlinks, level and enemy graphics, and so on and so forth...)
thanks!

Re: Operation Ocflore

Posted: Wed Jan 22, 2020 2:20
by 55Aavenue
Bubbatom wrote: Tue Jan 21, 2020 7:40 You're right, I just had a play around and I think that the track "Ocflore7louder" is actually a louder version of "Ocflore6" that you sent through. It sounds like "Ocflore7" is the track that needs the volume raised a tad but you might have mistaken 6 for 7 and renamed 6 as 7? or something like that?

Either way I have put "Ocflore7" back in for the Ancient Observatory and updated the link, let me know what you think!
I guess I should have named the songs better so it would be less confusing haha. I just checked and it everything sounds pretty good now I think.

Re: Operation Ocflore

Posted: Wed Jan 22, 2020 6:34
by keenmaster486
K1n9_Duk3 wrote: Sun Jan 19, 2020 6:56 Put this at the end of your patch file and don't use any of the .COM files:

...

This patch overwrites unused parts of the old VW_SetScreen, so don't use it without my customized screen update code! This is only to be used in Ocflore, anyway.
Thanks! This worked perfectly.

After much banging of head against wall with my system configuration, I got both XMS and (hardware) EMS working on my 286. Believe it or not it's an original IBM PC AT, which is interesting. The RAM card is an Everex EV159 RAM 3000 Deluxe, with 3 MB of RAM which I have split between expanding the base memory to the full 640K, and the rest for XMS and EMS.

After all this, though, Keen refuses to detect both XMS and EMS at the same time. It grabs an extra 64K of RAM from the EMS, and refuses to get any more. So Ocflore loads the first level after this, but I did try to warp to a different level (9) and it ran out of memory again. I tried both HIMEM.SYS and FDXMS286.SYS with identical results. I'm running DOS 5.

What gives? What is it about DOSBox that lets it detect both XMS and EMS, whereas this does not happen on real hardware? Out of curiosity I tried my 486 and couldn't get it to detect both at once, even with JEMMEX, which usually works miracles.

One more thing: Ocflore has a problem with my video card (Tseng ET4000AX). It's very halting, not smooth. It was jerky too (like what happens with ATI cards) but the "Fix Jerky Motion" setting fixed that, and so, for the first time I can remember in my entire life, that setting has actually WORKED. But it's still scrolling very haltingly. The "SVGA compatibility" setting did nothing, as usual. Did you change the video refresh code for some reason? (edit: I should mention this doesn't happen at all with vanilla Keen 4, which works perfectly)

Re: Operation Ocflore

Posted: Wed Jan 22, 2020 22:54
by K1n9_Duk3
keenmaster486 wrote: Wed Jan 22, 2020 6:34 Keen refuses to detect both XMS and EMS at the same time. It grabs an extra 64K of RAM from the EMS, and refuses to get any more. So Ocflore loads the first level after this, but I did try to warp to a different level (9) and it ran out of memory again.
Keen can't use more than 64k of EMS (and not more than just under 64k of XMS) anyway. Programs that use more than that just store the data somewhere in EMS/XMS and then need to use the EMS/XMS driver every time the program needs to access that data. Keen needs to have access at any time without having to invoke the driver again, therefore it's limited to 64k.

I guess the memory manager was originally targeted at an earlier DOS version and might have worked with XMS at some point. As I mentioned earlier, I can't get XMS to work either.

Now let's take a look at the memory requirements. If the game doesn't list at least 443k of total available memory at the startup screen, you won't be able to load level 9 at all. (At least not on the highest difficulty setting). Level 9 requires the biggest amount of memory (without music). With music, you need at least 455k (for level 7).

On top of that, the original Keens 4-6 have rather poor memory management. So you probably need a little more than what was mentioned above, but I think the worst thing that will happen is that you won't get any music in the level. Also, warping from one level to another can cause issues because the game doesn't remove the current sprite and tile graphics from memory when a new map is loaded. If the new map is bigger than the old one, you are very likely to encounter "out of memory" crashes. I wrote a fix for that, which should make it into the next official release. If you want to try it early, here it is:

Code: Select all

#Free sprites and tiles before loading a level
%patch $61DD
	$74 $0A			#	jz	no_demo
	$C7 $06 $7A6Cw $0002w	#	mov	gamestate_difficulty, 2
	$33 $C0			#	xor	ax, ax
	$EB $03			#	jmp	init_rndt
				#no_demo:
	$B8 $0001w		#	mov	ax, 1
				#init_rndt:
	$50			#	push	ax
	$9A $1D020002rl		#	call	US_InitRndT
	$58			#	pop	ax
	$9A $05C40006rl		#	call	FreeUpMemory
	$90 $90 $90 $90 $90 $90

#Don't free the paddle war sprites (in case loading a game fails)
%patch $5C4B $0081w	# default: $007Cw
Also, don't try to run the game via CK4PATCH. CK4PATCH itself takes up over 20k of memory, so it's an absolute no-go for running memory-hungry mods on real DOS machines. But you can use the latest version of my patching utility to create a fully patched standalone executable.

If you want to try that, change the beginning of the patch file like this:

Code: Select all

%exefile keen4e.exe 251712 # for K1n9_Duk3's patching utility
#%ext ck4
#%version 1.4

###########################
# The Usual Junk Required #
###########################

# Load the edited loading screen
%patchfile $1fe47 ck4load.bin

# Load the modified graphics please
#%egahead EGAHEAD.CK4
%patchfile $21080 EGAHEAD.CK4

# Load the maps now
#%maphead maphead.ck4
%patchfile $24830 MAPHEAD.CK4
My utility doesn't handle the "%level" commands, so you will have to replace them with the equivalent "%patch" instructions like this:

Code: Select all

############################
# Level Names and Entries  #
############################

%patch $1F040 "Ocflore V" 0
%patch $1F050 "Ocflore Airport" 0
%patch $1F060 "Imber Inlet" 0
%patch $1F070 "The Enkri Borough" 0
%patch $1F090 "Jungle Crags" 0
%patch $1F0B0 "Frigid Quarry" 0
%patch $1F0C0 "Enkri Sanctuary" 0
%patch $1F0D0 "Pelagic Pillars" 0
%patch $1F0E0 "Ostrum Absorbor" 0
%patch $1F0F0 "Mount Amnis" 0
%patch $1F100 "Dorsal Obelisk" 0
%patch $1F110 "Ancient Observatory" 0
%patch $1F130 "The Enkri Shanty" 0
%patch $1F150 "Savanak Temple" 0
%patch $1F180 "The Dorsal Battleship" 0
%patch $1F1A0 "Swallowed Spire" 0
%patch $1F1B0 "Evergreen Gate" 0
%patch $1F1C0 "Sunken Sanctum" 0
%patch $1F1D0 "The Thicket Steeple" 0

%patch $1F1F0 "Keen navigates" $0A "planet Ocflore" 0
%patch $1F210 "Keen splashes down at" $0A "the Ocflore Airport" 0
%patch $1F240 "Keen paddles to the" $0A "Imber Inlet" 0
%patch $1F260 "Keen cuts through" $0A "the Enkri Borough" 0
%patch $1F290 "Keen plunges down" $0A "the Jungle Crags" 0
%patch $1F2D0 "Keen cascades into" $0A "the Frigid Quarry" 0
%patch $1F300 "Keen beholds the" $0A "Enkri Sanctuary" 0
%patch $1F330 "Keen dangles on" $0A "Pelagic Pillars" 0
%patch $1F350 "Keen burrows his way to" $0A "the Ostrum Absorbor" 0
%patch $1F380 "Keen conquers" $0A "Mount Amnis" 0
%patch $1F3A0 "Keen filters through " $0A "the Dorsal Obelisk" 0
%patch $1F3D0 "Keen reveals" $0A "the Ancient Observatory" 0
%patch $1F400 "Keen cracks into " $0A "the Enkri Shanty" 0
%patch $1F430 "Keen delves into " $0A "the Savanak Temple" 0
%patch $1F470 "Keen teleports aboard" $0A "the Dorsal Battleship" 0
%patch $1F4B0 "Keen subsides into " $0A "the Swallowed Spire" 0
%patch $1F4E0 "Keen passes through" $0A "the Evergreen Gate" 0
%patch $1F510 "Keen plunges into " $0A "the Sunken Sanctum" 0
%patch $1F540 "Keen catapults up " $0A "the Thicket Steeple" 0
There are a few more issues in the patch script, but those should get fixed in the next official release.
keenmaster486 wrote: Wed Jan 22, 2020 6:34Did you change the video refresh code for some reason? (edit: I should mention this doesn't happen at all with vanilla Keen 4, which works perfectly)
Yes, I did. My main goal was to be compatible with DOSBox first and formost, since that's how most people play Keen mods nowadays. The code also worked perfectly fine on almost all of my systems (see linked thread). Since then, I also got myself a 286 system (12 MHz / 6 MHz) and my patch is working perfectly fine in 12 Mhz mode on that machine. I didn't play much in 6 MHz mode. Also, that machine requires SVGA compatibility mode, so I can verify that this option is indeed necessary on certain SVGA cards.

It's hard to tell what exactly is going on on your end, since you didn't say how fast your CPU is and if the PC has an AdLib-compatible sound card. Maybe you could record a video showing the mod running with and without the "Fix jerky motion" option enabled. What I can say is that my code waits for a vertical retrace on the CRT after updating the screen position. The original code didn't do that, which led to issues in DOSBox and also on fast DOS systems.

What happened with the original code was that the game sets the new screen position and then (because the CPU is faster than intended) manages to update the level objects and modify the video memory before the video card actually updates the screen position. So the video card ends up displaying parts of the video memory while the game is modifying them, which led to display issues. On slow systems like your 286, the time that is spent waiting for the vertical blank might better be spent updating the level objects. I could have rewritten the code to wait for the VBL before the game starts drawing the tiles and sprites, but that would mean the fix would only work in-game and you'd still get glitches in the Terminator intro or the Star Wars text crawl.

If the original scrolling works fine on your machine, then you could just disable or remove the screen update fix from the patch file. But then you can't use my color patch anymore and would have to play Ocflore with the wrong colors again.

Re: Operation Ocflore

Posted: Thu Jan 23, 2020 17:16
by keenmaster486
K1n9_Duk3 wrote: Wed Jan 22, 2020 22:54 I guess the memory manager was originally targeted at an earlier DOS version and might have worked with XMS at some point. As I mentioned earlier, I can't get XMS to work either.
OK this is interesting. I know Keen has stuff in the help files about "if you run DOS 5.0", probably expecting that the majority of people are running DOS 3.3 instead. Maybe I should try DOS 3.3 -- although this still fails to explain why DOSBox, which focuses on DOS 5/6 compatibility, would work perfectly.
K1n9_Duk3 wrote: Wed Jan 22, 2020 22:54 If the new map is bigger than the old one, you are very likely to encounter "out of memory" crashes. I wrote a fix for that, which should make it into the next official release. If you want to try it early, here it is:
Very interesting! I'll try this later.
K1n9_Duk3 wrote: Wed Jan 22, 2020 22:54 Also, don't try to run the game via CK4PATCH. CK4PATCH itself takes up over 20k of memory, so it's an absolute no-go for running memory-hungry mods on real DOS machines. But you can use the latest version of my patching utility to create a fully patched standalone executable.
Woah! Didn't know this existed. I tried it out and voila, it works great! However it only gains me about that 20K worth of memory, so not enough to run Ocflore perfectly. I still need another 50K or so (probably) to fit the largest levels and the music too. I LZEXE'd the result, too, but that gained me nothing.

I think my only hope at this point is to somehow figure out how to make Keen detect both XMS and EMS.

Re: Operation Ocflore

Posted: Thu Jan 23, 2020 21:42
by Bubbatom
Hey guys, I'm going to be away for the the next couple of days, will be able to reply to messages / work on another update once I'm home.

Re: Operation Ocflore

Posted: Fri Jan 24, 2020 10:21
by Nisaba
while updating the wiki I've noticed that these creatures/hazards are yet unnamed. do you have like a working title for them?
Image . . . . Image . . . . Image . . . . Image . . . . Image


besides...
was this graphic suppose to be meant as the squished Inchworm/Feathered Vindrizi Grub you were talking about earlier?
Image