Re: remake of remake of Konami's Knightmare

ketmar ketmar at ketmar.no-ip.org
Mon Dec 11 19:34:56 UTC 2017


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.


More information about the Digitalmars-d-announce mailing list