Running mapsets on Omnispeak?

You can discuss anything about fan-made Commander Keen games here.
Post Reply
TDRR
Grunt
Posts: 11
Joined: Tue Dec 18, 2018 17:46

Running mapsets on Omnispeak?

Post by TDRR » Wed Feb 20, 2019 15:59

Is it possible to run custom mapsets in Omnispeak? If anything, at least Keen 7 would be nice. I tried running it in DOSBox and the framerate fluctuated way too much.

I know that custom text wouldn't show up, but heck at least playing the levels themselves would be enough. I assume i would need to make source modifications for this?

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

Re: Running mapsets on Omnispeak?

Post by K1n9_Duk3 » Wed Feb 20, 2019 21:45

Running mods that only change the levels and graphics should be possible, but you would have to make sure all the files are in a format that Omnispeak can understand. For example, I have Omnispeak set up to play Keen 4, so in addition to the regular Keen4 files (AUDIO.CK4, EGAGRAPH.CK4, GAMEMAPS.CK4) I need all the header files that are usually embedded in the KEEN4.EXE.

I haven't tried it myself, but if you start with a copy of Omnispeak that is configured correctly for Keen4 (for example), you should get some basic mods to work by copying the modded files into the Omnispeak folder and replacing the existing ones. For modified levels you need at least GAMEMAPS.CK4 (rename the mod's file to GAMEMAPS.CK4 if you have to) and MAPHEAD.CK4 - and make sure that MAPHEAD.CK4 is exactly 402 bytes. If the maphead file is larger, then it also contains tile info data, which Omnispeak expects to read from TILEINFO.CK4.

For modified graphics, you'd have to do the same: copy the modified EGAGRAPH.CK4 and EGAHEAD.CK4 (and also EGADICT.CK4 if it exists). Don't worry too much about files you might have never heard of, like GFXINFOE.CK4 or AUDINFOE.CK4, since the versions that come with Omnispeak should still be valid for the vast majority of Keen mods.

One thing you need to keep in mind is that the file names in the mods won't always match the file names that Omnispeak expects to find. But I hope that most mods use some meaningful names that make it clear which file is the EGAHEAD file and so on. When in doubt, check the patch file itself.

I'm not that familiar with the patch file for Ceilick's Keen 7, so I can't say if it would be possible to play it in Omnispeak. You can change the actor behavior in Omnispeak to some degree by editing the ACTION.CK? file, but I don't think this allows you to recreate the Keen 7 behavior. For example, the MadMushroom replacement in Keen 7 only does one low bounce before the high bounce, instead of the two low bounces in Keen 4. Changing somethig like this doesn't seem to be possible without recompiling Omnispeak, but I could be wrong about this.


So in short: Keen 7 probably won't work in Omnispeak.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net

TDRR
Grunt
Posts: 11
Joined: Tue Dec 18, 2018 17:46

Re: Running mapsets on Omnispeak?

Post by TDRR » Thu Feb 21, 2019 3:14

K1n9_Duk3 wrote:
Wed Feb 20, 2019 21:45
in short: Keen 7 probably won't work in Omnispeak.
Ah, makes sense, i'm not afraid of recompiling Omnispeak but i don't think i will get very far without knowing what i'm doing.

Thanks for the answer! I guess DOSBox will have to do while Commander Genius gets fixed up.

User avatar
Multimania
Grunt
Posts: 21
Joined: Sat Nov 10, 2007 8:10
Location: Hiding in a small, cramped corner of the BwB megarocket.
Contact:

Re: Running mapsets on Omnispeak?

Post by Multimania » Fri Feb 22, 2019 7:59

K1n9_Duk3 has it right: you can play (with a small amount of effort) level packs and mods which only change levels and graphics (and sounds), but anything else will need changes to the code (or at least to some data files in Omnispeak-specific formats).

One thing to note is that you don't actually need to worry about checking the MAPHEAD size — Omnispeak supports TILEINFO data embedded in the MAPHEAD as well as in a separate TILEINFO file. So if your MAPHEAD.CK? file is > 402 bytes, you can just delete the TILEINFO.CK? file and it'll load the tileinfo from the MAPHEAD.

Image

Mods like Keen7, though, will need code changes to support all of the patches. Fortunately, Keen7's patches are rather simple, and I was bored, so I've quickly hacked together a proof-of-concept version of Keen7 under omnispeak here: https://davidgow.net/stuff/omnispeak-keen7.zip. Note that this isn't a particularly good way of making these changes — and for something more complicated like the Keen8 or Keen9 mods it'd probably be better to implement them as almost entirely new "episodes" in Omnispeak rather than hacking up Keen4 (and in the process breaking it), but it proves it's possible.

If you're interested, the code is included in the download. Look at the keen7src.diff file (or grep the source code for KEEN7) to look at what changes were needed. Sorry for the bugs, I basically didn't test it (there's at least one typo), but the binaries included did at least run on my machine, and should work for x86 (32-bit) Linux and Windows.

Hopefully in the future Omnispeak will support some limited modding more easily, but it's difficult to support the big mods without major code changes, as patching has come far enough that it's not possible to support everything automatically.

TDRR
Grunt
Posts: 11
Joined: Tue Dec 18, 2018 17:46

Re: Running mapsets on Omnispeak?

Post by TDRR » Mon Feb 25, 2019 4:01

Multimania wrote:
Fri Feb 22, 2019 7:59
K1n9_Duk3 has it right: you can play (with a small amount of effort) level packs and mods which only change levels and graphics (and sounds), but anything else will need changes to the code (or at least to some data files in Omnispeak-specific formats).

One thing to note is that you don't actually need to worry about checking the MAPHEAD size — Omnispeak supports TILEINFO data embedded in the MAPHEAD as well as in a separate TILEINFO file. So if your MAPHEAD.CK? file is > 402 bytes, you can just delete the TILEINFO.CK? file and it'll load the tileinfo from the MAPHEAD.

Image

Mods like Keen7, though, will need code changes to support all of the patches. Fortunately, Keen7's patches are rather simple, and I was bored, so I've quickly hacked together a proof-of-concept version of Keen7 under omnispeak here: https://davidgow.net/stuff/omnispeak-keen7.zip. Note that this isn't a particularly good way of making these changes — and for something more complicated like the Keen8 or Keen9 mods it'd probably be better to implement them as almost entirely new "episodes" in Omnispeak rather than hacking up Keen4 (and in the process breaking it), but it proves it's possible.

If you're interested, the code is included in the download. Look at the keen7src.diff file (or grep the source code for KEEN7) to look at what changes were needed. Sorry for the bugs, I basically didn't test it (there's at least one typo), but the binaries included did at least run on my machine, and should work for x86 (32-bit) Linux and Windows.

Hopefully in the future Omnispeak will support some limited modding more easily, but it's difficult to support the big mods without major code changes, as patching has come far enough that it's not possible to support everything automatically.
Wow that is really cool! I will take a look at the code and decide if Keen 8 and 9 are worth the trouble. Keen 8 doesn't have many enemy changes (none that are extremely different) so maybe a simple text change and hack up of Keen 6 may do for it. Althrough Keen 9 has completely new enemies so maybe it will be much harder.

Post Reply