|
Post by Janne Kivilahti on Jul 26, 2010 12:20:17 GMT -5
Behold! Some of you have asked for it, and here it finally is: The source codes of PK2 in all of it's spaghetti-like glory. And it's not just PK2's sources, but also the level editor's sources too! But be warned: Whom ever is about to open this package will face over 10 thousand lines of poorly documented, cryptic C++ code, with every variable and method name in Finnish language. And I can't promise I'll find time to help everyone who want's to ask something about the code. Besides the sources also DirectX 7 libraries are needed as well as the resources (graphics, music etc.) of the game and the editor. There also might be all sorts of weird documents left in the folders since I pretty much packaged everything as is from my Visual Studio folders. The package consists of 4 projects: Pekka Kana 2 is the main game project + a "sprite creator" program (don't get too excited, it just generates all the sprites of the game). PisteEngine is responsible of handling all the DirectX stuff. This would be the main target if someone wants to take a shot at updating the game to understand modern graphics cards. EDIT: Forgot that you also need the MIDAS Sound library (or today Housemarque sound library) header files as well. PK2LevelEditor is the level editor's project. PisteLanguage is a small project who's class is used to read the language files of the game. Have fun with it! ;D
|
|
|
Post by The Evil One on Jul 26, 2010 13:07:25 GMT -5
I am speechless. ... AT LAST WE'VE BEEN WAITING THIS FOR A LONG TIME. Thank you. I'm poor with C++ at the moment but maybe not after a while...  Btw, your first post this year, Janne.  EDIT: Now, when I look at the code, I know that any non-Finnish could propably not understand that; there is so much Finnish there that even I can understand some codes...
|
|
|
Post by lsudny on Jul 26, 2010 13:59:48 GMT -5
HOLY TITS! That's great! I can't code C++, but that's awesome! Those are some cool news, men.  We all are happy. And by the way - you haven't posted in a loooong time. What's with PK3? 
|
|
|
Post by piotrulos on Jul 26, 2010 14:47:36 GMT -5
I have a question becouse have a compile error.
Which packages are needed? I think DirectX SDK and somenthing else?
|
|
|
Post by Xfactor21 on Jul 26, 2010 17:32:05 GMT -5
Enjoy it people. I remember when i saw the code over Janne's house and i was like d**n. I couldn't understand it because it is in finnish lol. But do not go crazy people when you set it 
|
|
|
Post by piotrulos on Jul 27, 2010 3:52:19 GMT -5
yeah, all is in Finnish. But now I success compiled this code, so we (pk2lib team) have an idea to make support for directX 9 and I think this fixes problems with modern graphic cards and windows (Vista and 7) without killing the explorer.exe
|
|
|
Post by sahwar on Jul 27, 2010 6:38:46 GMT -5
Those are GREAT news, I'm thrilled! Even though I don't understand Finnish, piotrulos and The Evil One do and hopefully, they'll manage to translate the language strings and compile everything into a stable and working version (i.e. with English source code). Wow, PK2 is now open source. I'm still speechless. Thanks a billion, Janne, Piste Gamez team! P.S. I have a question: is PK2 open source completely, including the graphics and the sound and music files? I know that you still retain all copyrights over the game and everything else when you release something as open source, so I'd advise you to put a simple .txt file in the .zip that explains this and explicitly states that Piste Gamez should be mandatory credited in any modifications of PK2. I know that many people take this for granted, but it'd be good if it was mentioned anyway, in case someone doesn't know. P.P.S. Janne, did you receive an e-mail from me? I sent you one with a 2nd Bulgarian translation of the game. I'd appreciate if you consider adding it to the downloads section of PK2's page. Also, putting the source codes for downloading there as well will be good. Thanks in advance! If I misunderstood anything, please, don't hesitate to correct me by explaining. 
|
|
|
Post by piotrulos on Jul 27, 2010 14:40:51 GMT -5
So updating to directX should fix (for me fixed) black bacground in sprites, on modern graphic cards. But what about color issue on windows 7 or sometime vista? This is problem, now only help closing the explorer.exe process, so I wrote script in bat file and include to pk2.exe (Button kill explorer.exe) when you press this button, it automatically close explorer.exe and you can click play button. After playing you can restore explorer.exe by pressing any key in cmd window.
So now it's good way to run PK2 on windows with directX 11
|
|
|
Post by lsudny on Jul 29, 2010 3:53:46 GMT -5
Well, wait.
Does that all mean that you stopped PK3 works? Will you release the Piste Editor?
|
|
|
Post by Janne Kivilahti on Jul 30, 2010 15:27:51 GMT -5
Well, wait. Does that all mean that you stopped PK3 works? Will you release the Piste Editor? PK3 is still in the works. It's just that we get side tracked to other projects all the time... 
|
|
|
Post by Xfactor21 on Jul 30, 2010 18:00:17 GMT -5
I would love to release the piste editor. But there are so many quirks in there that i need to fix, that i really believe it is not ready for public use yet. Oh yeah Pk3 will never die. 
|
|
|
Post by piotrulos on Jul 31, 2010 3:38:23 GMT -5
So piste editor will be release before PK3 or after?
|
|
tusam
New Member
science ftw!
Posts: 9
|
Post by tusam on Sept 4, 2010 8:48:20 GMT -5
Ehlo ppl, heard the great news that Pekka Kana had gone free-range and finally had some time to take a look at it. Here's www.filefront.com/17262092/pk2-mingw32.patch/ a patch to get it all built on mingw32 with cmake build files for cross-compiling in linux. (Tried to put it in a pastebin but all of them deleted DOS carriage returns.) Apply it normally by "patch -p0 <pk2-mingw32.patch" and once you have DX7 directory and midas stuff in "Pekka Kana 2" dir, compile with "cmake .; make". DX7 libraries+headers are available from bcb-tools.com/Downloads.htm#DirectX7 (guess the newer ones up to DX10 would backwards compatible also) and midas from ftp.sac.sk/pub/sac/sound/midas111.zipLevel editor and engine demo works fine (though sfx?.wav and wormz2.bmp is missing), but PK2.exe seems to be crashing on something, will check it out in a debugger later. Also, Janne, what is the release license for PK2 sources? Could you (or someone) upload it in a public repository somewhere for contributions, github, google code? Btw in case you're interested, here's vogons.zetafleet.com/viewtopic.php?t=25799 that dosbox patch I mentioned last sunday over Gears of War at Antti's (how about LAN rematch, seven?  )
|
|
|
Post by Janne Kivilahti on Sept 6, 2010 11:14:42 GMT -5
Hey,
There is a license.txt inside the source code package. It says:
"This package contains the source codes for the game Pekka Kana 2, written by Janne Kivilahti. The game and it's code are copyrighted by Janne Kivilahti, but you can modify and use the code freely as long as the original author is mentioned."
So it basically means, that you can do whatever you want with it as long as I'm credited as the original author.
I haven't really investigated public repositories for open source code, so I don't know what would be the best, but it sounds like a good idea. If someone want's to do that, then go ahead.
|
|
tusam
New Member
science ftw!
Posts: 9
|
Post by tusam on Sept 6, 2010 12:32:36 GMT -5
Duh, silly question I guess.  It's not that I mind of course, but you mean you'd really be ok with people e.g. selling the game as it is, or somehow modified utilizing the source code, without any sort of licensing model? Or, in a less paranoid scenario, by "using it freely" could I release a modified version of the sources relicensed under GPL, so that people who use that version would be obliged to contribute back their changes? By the way in PK2.cpp PK_Alusta_Tilat() it's trying to load some language/fonts/ScandicBig?.txt files that don't exist, I guess this is some in development code? Worked just fine by commenting them out and restoring the pk2stuff.bmp fonts though.
|
|