Project 'keenly'

You can discuss anything about fan-made Commander Keen games here.
Post Reply

What is you first impression of this project?

Sounds interesting.
17
85%
I don't want to battle with other players over the Internet.
2
10%
Well, no impression yet.
1
5%
 
Total votes: 20

youkai
Grunt
Posts: 4
Joined: Sat Oct 10, 2009 9:47

Project 'keenly'

Post by youkai »

Hi, there! :)

I just want to announce a small project named 'Keenly'. You will find it at its SourceForge project site. You will find a project description there.

Current release: Techdemo 2 (Change log)

Image

I started this project because I wanted to create my first network game quite some time ago. Commander Keen is a great motivation for me. The hard part will be the network layer and so I decided to re-use the classic CK games as a front-end.

Actually there is a second techdemo out that allows you to move around, jump, pogo-jump and shoot. I tried to get some kind of the original keen feeling so that the game will be fun. :)

The source code of this project is portable and it my be compiled on a Linux/Unix system or a Mac. It needs the following libraries:
  • SDL (graphics output, timing)
  • SDL_mixer (audio output)
  • SDL_net (network communication)
  • Qt4 (core lib, multi-programming)
The core access to all keen resources out of the game files is based on:
  • lmodkeen (extract sprites, tiles, fonts)
  • unlzexe (decompress executables)
  • KeenWave (extract sounds, music)
  • adplug (read/convert IMF music)
I would appreciate any kind of feedback. As the project in its current state, it would be compressed to:
  • keen feeling while moving around
  • general usability
  • all kinds of problems with starting the game
At the moment, the project is suspended for a some months due to academic studies. One current lecture named "Middleware and Distributed Systems" could bring me a big step further in this project.

Have a nice day!
Last edited by youkai on Fri Oct 23, 2009 18:26, edited 3 times in total.

User avatar
VikingBoyBilly
Vorticon Elite
Posts: 4158
Joined: Sat Jan 05, 2008 2:06
Location: The spaghetti island of the faces of dinosaur world for a vacation

Post by VikingBoyBilly »

Multiplayer Keen? :eek
There should be an option above "sounds interesting" that says "HOLY COW IM SOILING MYSELF IN DISBELIEF!" :pogo :rollin :garg :dopefish
Image
"I don't trust players. Not one bit." - Levellass

User avatar
tulip
Flower Pot
Posts: 2520
Joined: Thu Aug 21, 2008 12:50
Location: Hamburg, Germany
Contact:

Post by tulip »

I'll go with sounds interesting.
I just tried it out, the physics need a little bit of adjustment but are generally not bad, as well as the moving while shooting problem.
I'm looking forward to this being developed further.
Image You crack me up little buddy!

User avatar
DaVince
lazy/busy Keener
Posts: 1476
Joined: Thu Nov 01, 2007 15:34
Location: Amsterdam, Netherlands
Contact:

Post by DaVince »

Sounds wicked awesome. It's cool that you're extracting and using the original resources.

Perhaps this could be merged with CloneKeenPlus at some point... It plans to have Keen 4-6 support at some point and this sounds like a really good addition to all that, especially since you're already doing a lot of the hard work (platforming system, resource extraction etc).
Wow look at me I'm lurking

User avatar
Deltamatic
Vorticon Elite
Posts: 1418
Joined: Sun Apr 26, 2009 12:55
Location: Shreveport, Louisiana

Post by Deltamatic »

I wonder what the competition would be for. Would people be trying to reach somewhere, collect x amount of items? Would a neural stunner shot kill you or knock you out like a Vortikid? Would there be different characters available (like Keen, Mort, Spot, Lindsey...)? Is so, would they act as characters (specifically in the only one per game area) or classes?

User avatar
KeenRush
Android Dummy
Posts: 2554
Joined: Sat Oct 27, 2007 20:57
Location: KEEN1.EXE
Contact:

Post by KeenRush »

I think it sounds cool -- something I've always wanted to see which has never been done yet, a true multiplayer Keen which plays over the net. :) I think different game mods would be nice.
My newest mod - Planet Of Agony: https://pckf.com/viewtopic.php?t=4165 | codename H.Y.E.N.A.

youkai
Grunt
Posts: 4
Joined: Sat Oct 10, 2009 9:47

Post by youkai »

Deltamatic wrote:I wonder what the competition would be for. Would people be trying to reach somewhere, collect x amount of items? Would a neural stunner shot kill you or knock you out like a Vortikid? Would there be different characters available (like Keen, Mort, Spot, Lindsey...)? Is so, would they act as characters (specifically in the only one per game area) or classes?
My first idea is, that you will have to fetch more than one bullet to get killed. I like your idea, that you get hit and knocked out. But then I think other bullets would have to ignore you. Otherwise you would be defenseless and it would be no fun at all. =)

I just added a link to the change log to my first post.

Ciao

User avatar
Bonevelous
Vorticon Elite
Posts: 458
Joined: Fri Mar 27, 2009 0:11

Post by Bonevelous »

I like how it sounds, for sure.

:begging
Check out Flixxy the Fox: viewtopic.php?f=4&t=6378

Image

User avatar
Commander Spleen
Lord of the Foobs
Posts: 2376
Joined: Wed Oct 31, 2007 22:54
Location: Border Village
Contact:

Post by Commander Spleen »

Too complicated to get this running at the moment. But I'll have some time tomorrow to get it sorted and give it a whirl.

What are you planning for the network layer?

youkai
Grunt
Posts: 4
Joined: Sat Oct 10, 2009 9:47

Post by youkai »

Commander Spleen wrote:What are you planning for the network layer?
Well, your question is quite "abstract". =) I will implement a client-server-architecture communicating connectionless with UDP packets for the real-time part. I will do it like the guys at Valve. Okay, I'll try to. ^^

Ciao

User avatar
Levellass
S-Triazine
Posts: 5261
Joined: Tue Sep 23, 2008 6:40

Post by Levellass »

BEWARE! Long post!


*How Keenwave extracts Keen 4-6 type sounds*


The first step is decompressing the sounds. To do this you need the AUDIOHEAD and AUDIODCT files from the executable. If Keenwave cannot find these it runs a search subroutine. You *could* use hard coded values for this (Like Modkeen) but since Keenwave is to work with all versions, it manually searches the executable.

To find the AUDIOHEAD, look for the first dword (4 bytes) in the executable that has the value of the AUDIO.CKx size. This will be the LAST 4-byte entry in the header file. Then just move back in dwords until you come to the value 0 (File start.)

To find AUDIODCT, note that ALL ID DCTs have as the root node '$FD $01 $00 $00 $00 $00' (That is, this is the last few bytes of the 1024 byte file.) The FIRST of these DCTs is always the AUDIO one.


Next KeenWave decompresses the AUDIO data. This is hard to explain because of the difficulty BASIC has in working at the byte level (And due to speed problems I had to drastically modify Napalm's original code.) but works roughly as follows.

All you need from AUDIODCT is the 255 huffman nodes, built into the Huffman tree. (If you don't understand how Huffman works, check online or at the Patch Index under 'File Formats-> Keen 4-6' ) KeenWave stores this as NODE

To get the compressed data note that each dword in AUDIOHED is an address to a sound in AUDIO.CKx, so the first is $00000000, the second $0000000D, and so on. If you do this right, the location in AUDIO.CKx will have a dword giving the length of the UNCOMPRESSED data (So even in a hex editor it's pretty simple to see where sounds start.)

After getting the compressed data start reading it into the Huffman tree, bit by bit, outputting bytes as you go, until you reach the uncompressed length. (For BASIC this is time consuming as I must manually travel down the tree for each byte. I am considering a hash table.)


Hopefully you now have perfectly sensible Raw Data. For IMFs, you can play them in Adplug. Adlib sounds, I can do nothing with yet as I have no idea where to even start.

For PC sounds you have the following structure:

Code: Select all

-------------------------------------------------------------------------------
FILE STRUCTURE:
0   4    Length      Length of sound data in bytes
+4  2    Priority    Sounds of a high priority interrupt those with equal or lesser priority
                     (So the 'Got a life' sound will be long, loud and interrupt all other
                     sounds, while the 'walking' sound will get interrupted all the time.)
+6  x    Data        Sound data. Each byte is an inverse-frequency datum lasting about
                     0.07s, much like the Keen 1-3 sounds but using 1-byte entires instead
                     of 2 (Since PC sounds are less important here.)
+x  1    Terminator  $00, ends the sound
-------------------------------------------------------------------------------

What will matter to you is the data, a series of values between 1-255 (Or 0, which is silent.) to play these I use the SOUND command, SOUND [Frequency] [Duration] where the frequency is 1193180 / x * 75 (In this case because the single byte values of Keen 4-6 sounds are 75x less than Keen 1-3 sounds.) and the duration is 1 / 128 * 18.2 (I.e 1/128th of a second.)


Any questions?
What you really need, not what you think you ought to want.

User avatar
lemm
Blorb
Posts: 688
Joined: Fri Jul 03, 2009 10:18
Location: canada lol

Post by lemm »

whoa... we could have tournaments, or team levels... :drool

This could usher in a whole new era of keening!

youkai
Grunt
Posts: 4
Joined: Sat Oct 10, 2009 9:47

Post by youkai »

@levellass

Thanks for your instructions. :)

Ciao

User avatar
Commander Spleen
Lord of the Foobs
Posts: 2376
Joined: Wed Oct 31, 2007 22:54
Location: Border Village
Contact:

Post by Commander Spleen »

The reason I asked about the networking thing is that I'm doing a lot of network coding for some of my own projects, and might be able to contribute if you're interested.

User avatar
Shilor
Vortininja
Posts: 84
Joined: Tue Oct 06, 2009 7:26
Location: Australia
Contact:

Post by Shilor »

This does seem very interesting. Hope to see more development :)

Post Reply