www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - =?UTF-8?Q?remake_of_remake_of_Konami=27s_Knightmare?=

reply ketmar <ketmar ketmar.no-ip.org> writes:
recently i worked on remake of DOS remake of Konami's Knightmare game[0]. 
the game is playable now, it has music from original MSX Knightmare, and 
sfx/gfx/levels from DOS remake. it is written in D, of course, and it is 
FOSS. you can find the sources here[1].

as usual, you'll need my IV modules[2], and Adam's ARSD modules[3].
the code won't work on 64-bit arches, tho (due to some bugs in sdpy/iv). 
but it can be compiled for 32-bit GNU/Linux, and 32-bit windows.

here is windows binary for those who cannot (or don't want to) build the 
binary[4].

WARNING! the code is a partial port of old DOS turbo pascal sources, so it 
is *very* far from something even remotely sane.

it is not polished yet, but that should not stop you! play this excellent 
classic shooter while it is hot! ;-)

some tech info: arsd.simpledisplay is used for video (with OpenGL backend), 
arsd.simplesound for audio (with my AY-8910 emulator), iv.vfs for VFS 
support. as the game designed for 20 FPS, i didn't bother avoiding GC (that 
is, the engine allocates like crazy).

enjoy, and happy hacking!


[0] https://en.wikipedia.org/wiki/Knightmare_(1986_video_game)
[1] http://repo.or.cz/knightmare.git
[2] http://repo.or.cz/iv.d.git
[3] https://github.com/adamdruppe/arsd
[4] http://files.catbox.moe/z19j91.7z
Nov 23 2017
next sibling parent reply =?UTF-8?Q?Martin_Dra=c5=a1ar?= <drasar ics.muni.cz> writes:
Dne 23.11.2017 v 13:18 ketmar via Digitalmars-d-announce napsal(a):
 recently i worked on remake of DOS remake of Konami's Knightmare
 game[0]. the game is playable now, it has music from original MSX
 Knightmare, and sfx/gfx/levels from DOS remake. it is written in D, of
 course, and it is FOSS. you can find the sources here[1].
 
 as usual, you'll need my IV modules[2], and Adam's ARSD modules[3].
 the code won't work on 64-bit arches, tho (due to some bugs in sdpy/iv).
 but it can be compiled for 32-bit GNU/Linux, and 32-bit windows.
 
 here is windows binary for those who cannot (or don't want to) build the
 binary[4].
 
 WARNING! the code is a partial port of old DOS turbo pascal sources, so
 it is *very* far from something even remotely sane.
 
 it is not polished yet, but that should not stop you! play this
 excellent classic shooter while it is hot! ;-)
 
 some tech info: arsd.simpledisplay is used for video (with OpenGL
 backend), arsd.simplesound for audio (with my AY-8910 emulator), iv.vfs
 for VFS support. as the game designed for 20 FPS, i didn't bother
 avoiding GC (that is, the engine allocates like crazy).
 
 enjoy, and happy hacking!
 
 
 [0] https://en.wikipedia.org/wiki/Knightmare_(1986_video_game)
 [1] http://repo.or.cz/knightmare.git
 [2] http://repo.or.cz/iv.d.git
 [3] https://github.com/adamdruppe/arsd
 [4] http://files.catbox.moe/z19j91.7z
Neat! Instead of working, I was spamming shift like crazy... Now, when you say a partial port, did you make some automated translation or it is just a manual labor with lotta love? Martin
Nov 23 2017
parent ketmar <ketmar ketmar.no-ip.org> writes:
Martin DraĊĦar wrote:

 Neat! Instead of working, I was spamming shift like crazy...
glad that you liked it! this little thingy is very addictive. ;-)
 Now, when you say a partial port, did you make some automated
 translation or it is just a manual labor with lotta love?
fully manual work. ah, except some simple regexps to replace "=" to "==", ":=" to "=" and such. i ported all monster and movement logic, and wrote new video, audio and game state management subsystems from scratch.
Nov 23 2017
prev sibling next sibling parent reply bauss <jj_1337 live.dk> writes:
On Thursday, 23 November 2017 at 12:18:38 UTC, ketmar wrote:
 recently i worked on remake of DOS remake of Konami's 
 Knightmare game[0]. the game is playable now, it has music from 
 original MSX Knightmare, and sfx/gfx/levels from DOS remake. it 
 is written in D, of course, and it is FOSS. you can find the 
 sources here[1].

 [...]
This is pretty neat, good job!
Nov 23 2017
parent ketmar <ketmar ketmar.no-ip.org> writes:
bauss wrote:

 On Thursday, 23 November 2017 at 12:18:38 UTC, ketmar wrote:
 recently i worked on remake of DOS remake of Konami's Knightmare 
 game[0]. the game is playable now, it has music from original MSX 
 Knightmare, and sfx/gfx/levels from DOS remake. it is written in D, of 
 course, and it is FOSS. you can find the sources here[1].

 [...]
This is pretty neat, good job!
thank you!
Nov 23 2017
prev sibling next sibling parent ketmar <ketmar ketmar.no-ip.org> writes:
latest binary. some fixes, nicer title screen, alt now shoots too...

http://files.catbox.moe/k7xxn0.7z
Nov 24 2017
prev sibling next sibling parent reply ketmar <ketmar ketmar.no-ip.org> writes:
quickfix. forgot to properly set requested OpenGL version.

http://files.catbox.moe/lx02hz.7z
Nov 24 2017
parent reply "Nick Sabalausky (Abscissa)" <SeeWebsiteToContactMe semitwist.com> writes:
On 11/24/2017 08:28 PM, ketmar wrote:
 quickfix. forgot to properly set requested OpenGL version.
 
 http://files.catbox.moe/lx02hz.7z
Very cool! Works under wine for me. Not a game I was familiar with, so it's cool learning hands-on about more of Konami's back catalog from one of the best gaming eras.
Nov 27 2017
next sibling parent ketmar <ketmar ketmar.no-ip.org> writes:
Nick Sabalausky (Abscissa) wrote:

 On 11/24/2017 08:28 PM, ketmar wrote:
 quickfix. forgot to properly set requested OpenGL version.
 http://files.catbox.moe/lx02hz.7z
Very cool! Works under wine for me. Not a game I was familiar with, so it's cool learning hands-on about more of Konami's back catalog from one of the best gaming eras.
thank you! then you prolly can try this remake too: http://www2.braingames.getput.com/mog/default.asp this is Knightmare 2: a very different style, but great still great game. p.s.: the same codebase is working with GNU/Linux too. just rdmd it, with the proper -I settings. tnx to iv.vfs and arsd.sdpy, the code itself doesn't care about underlying OS. ;-)
Nov 28 2017
prev sibling parent reply Mengu <mengukagan gmail.com> writes:
On Tuesday, 28 November 2017 at 07:47:14 UTC, Nick Sabalausky 
(Abscissa) wrote:
 On 11/24/2017 08:28 PM, ketmar wrote:
 quickfix. forgot to properly set requested OpenGL version.
 
 http://files.catbox.moe/lx02hz.7z
Very cool! Works under wine for me. Not a game I was familiar with, so it's cool learning hands-on about more of Konami's back catalog from one of the best gaming eras.
chrome starts the download and then prevents it. would it be because if 7z?
Nov 28 2017
parent ketmar <ketmar ketmar.no-ip.org> writes:
Mengu wrote:

 On Tuesday, 28 November 2017 at 07:47:14 UTC, Nick Sabalausky (Abscissa) 
 wrote:
 On 11/24/2017 08:28 PM, ketmar wrote:
 quickfix. forgot to properly set requested OpenGL version.
 http://files.catbox.moe/lx02hz.7z
Very cool! Works under wine for me. Not a game I was familiar with, so it's cool learning hands-on about more of Konami's back catalog from one of the best gaming eras.
chrome starts the download and then prevents it. would it be because if 7z?
this. or, maybe, "catbox.moe" is "bad site" in some chrome filter. sorry, i don't know.
Nov 28 2017
prev sibling next sibling parent reply ketmar <ketmar ketmar.no-ip.org> writes:
major update: entity logic is completely driven by external scripts now! ;-)

most of "monsters.d" code moved to MES scripts. also, entity (actor in the 
terms of the engine) management was completely rewritten, so it mostly 
doesn't allocate in game loop.

"what is MES?", one may ask. ok, MES is a scripting engine, writen 
specifically for scripting simple games. it has only one object type 
(Actor), but it is statically typed, supports UFCS and function pointers 
(and some syntactic sugar), so it may look like procedural or OOP language 
(at your choice). it is compiled to virtual machine code (3-operand 
instructions). compiler doesn't use AST, but does one extra pass over a 
source to collect functions/globals/fields definitions, so there is no need 
to write any forward declarations.

so why i did it, and why it is better than old D code? the answer is very 
simple: because i can! ;-)

you're welcome to study MES compiler implementation if you like. it is 
contained in one file (mesengine.d), and is not that hard to follow.
Dec 11 2017
parent reply Taylor Hillegeist <taylorh140 gmail.com> writes:
On Monday, 11 December 2017 at 19:34:56 UTC, ketmar wrote:
 major update: entity logic is completely driven by external
...
 you're welcome to study MES compiler implementation if you 
 like. it is contained in one file (mesengine.d), and is not 
 that hard to follow.
I hope you didn't write that all in one sitting, I thought it was going to be a bit shorter.
Dec 14 2017
parent ketmar <ketmar ketmar.no-ip.org> writes:
Taylor Hillegeist wrote:

 On Monday, 11 December 2017 at 19:34:56 UTC, ketmar wrote:
 major update: entity logic is completely driven by external
 ...
 you're welcome to study MES compiler implementation if you like. it is 
 contained in one file (mesengine.d), and is not that hard to follow.
I hope you didn't write that all in one sitting, I thought it was going to be a bit shorter.
i am not even finished! actually, here[0] is the main repository for MES developement. you can track my progress there, starting from the very first commit. it doesn't meant to be public, tho, hence it is marked "OBSOLETE". [0] http://repo.or.cz/mes.d.git
Dec 14 2017
prev sibling parent reply Murilo <murilomiranda92 hotmail.com> writes:
On Thursday, 23 November 2017 at 12:18:38 UTC, ketmar wrote:
 recently i worked on remake of DOS remake of Konami's 
 Knightmare game[0]. the game is playable now, it has music from 
 original MSX Knightmare, and sfx/gfx/levels from DOS remake. it 
 is written in D, of course, and it is FOSS. you can find the 
 sources here[1].
Hi, I would like to see your source code please because I am making a game myself and I need to learn how to do it, I figured I could read your code and learn from it.
Sep 27 2019
parent reply sarn <sarn theartofmachinery.com> writes:
On Saturday, 28 September 2019 at 02:59:20 UTC, Murilo wrote:
 On Thursday, 23 November 2017 at 12:18:38 UTC, ketmar wrote:
 recently i worked on remake of DOS remake of Konami's 
 Knightmare game[0]. the game is playable now, it has music 
 from original MSX Knightmare, and sfx/gfx/levels from DOS 
 remake. it is written in D, of course, and it is FOSS. you can 
 find the sources here[1].
Hi, I would like to see your source code please because I am making a game myself and I need to learn how to do it, I figured I could read your code and learn from it.
The post you quoted links to the git repo. You can clone it with "git clone http://repo.or.cz/knightmare.git", or view the code online at https://repo.or.cz/knightmare.git/tree (includes a link to download the tarball).
Sep 27 2019
parent Murilo <murilomiranda92 hotmail.com> writes:
 The post you quoted links to the git repo.  You can clone it 
 with "git clone http://repo.or.cz/knightmare.git", or view the 
 code online at https://repo.or.cz/knightmare.git/tree (includes 
 a link to download the tarball).
Thanks. I see it now.
Sep 28 2019