Blog

  Game dev progress: Day & Night lighting, prototype enemies & weapons   Mar. 29th, 2018

I've been busy with writing a new game engine in the low-level programming language Nim. Nim really is a beautiful language that combines the best aspects of all kinds of programming and scripting language into one. It offers powerful low-level access - however, it does so in much more modern and intuitive ways than C or C++. It then combines this power with the elegant syntax and best ideas we find in many different scripting languages.

I am also using the popular multi-platform layer SDL, which is nicely wrapped by Vladar4's sdl2_nim, to which I contributed a wrapper for grimfang4's SDL_gpu, which is an amazing library to help with the implementation of hardware-accelerated rendering using shader programs. Other than these and the Nim standard library, I've not been messing with any 3rd-party code.

Here's a clips of the game so far. All graphical assets are quick and dirty programmer art that is to be replaced.

You may notice that it slowly becomes darker during this minute of gameplay demonstration. The game uses a dynamic day & night system, where the entire world is shrouded in darkness when it becomes night. The player has then to rely on light sources to keep on navigating the world. Some early prototype centipede enemies and test weapons are also being shown. The centipedes can split into several smaller centipedes when hit.

All higher gameplay functionality like the behavior of the enemies, player controls and weapons are based on runtime compiled scripts. This means that I can code these things without the need of recompiling - even without restarting the application. The scripting language is NimScript, which is basically Nim in (almost) all its glory running in a VM included with the compiler.

This game is planned to one day become a story driven adventure with extremely juicy risk & reward based action combat.

Comments