Kolobok is moving left and right by itself. He cannot slow down or stop. If there is a hole under him, he will fall all the way down, unless down button is pressed. In this case his hover engines will hold him level. (If you have already started falling it is too late to thrust hover engines, you will still go all the way down. Hover engines just allow Kolobok to roll left and right ignoring possible holes in the floor.)

If there is a solid floor under Kolobok, he can jump all the way up using his super spring boots. For this you need to press up arrow.

The goal is, quite appropriately, to reach goal, which is represented by a '$' sign. It is kind of hard to spot on a screenshot, but in actual game it blinks, so you won't miss it.

Code and comments

Download the KOLOBOK.NSG code.

The game requires MSX2 with V9938 video chip and MSX BASIC Version 2.1 that allows WIDTH 80 command to switch to 80-character video mode. MSX BASIC does not have "documented" means to access color or blinking attributes of this mode, so it is done via direct access to V9938 registers and video RAM.

The biggest challenge was not to implement game rules, but to fit puzzle-maze definition in 3 lines less than 255 bytes each. Each stretch of 7 characters is packed into 7 bits and highest bit is set to insure that the resulting character is printable. The resulting string is stored in 2 DATA statements.


For those of you who do not know that already, Kolobok is popular folklore hero who ran away from home while still young, met and challenged awful beasts and finally found his grave when one of those beasts outsmarted him. Kolobok from the story did not have hover engines or super-spring boots, but I felt it is appropiate for him to equip them for this game.
Rst7 brought rules of this game from somewhere and surprisingly it caught up within the circle. Not before long everybody was writing his own version and designing his own puzzles for it. Typical implementation had several levels ranging from trivial to complex to incredibly complex. I remember we even ran a contest to design most complex puzzle and Alex Garmash won. I used whole lots of tricks from his winning entry as well as adding quite a few of my own and came up with what I considered MEGA PUZZLE worth implementing as .NSG.
[ MSX BASIC | << Previous | Next >> | Feedback ]