GRUB 3D (2009)

C, GRUB2 bootloader

GRUB 3D is a proof-of-concept pseudo-3D maze crawler that can run as a GRUB2 bootloader module.

It uses legacy VESA 2.0 video mode to display graphics. Levels are rendered by casting rays through a 2D grid of blocks. Each intersection point represents a single vertical line in the framebuffer - the further the point from the camera, the smaller each line gets thus an emulation of perspective projections is achieved. Textures are drawn with nearest-neighbour filtering and affine projection. Experimental support for non-animated sprites is present in the code but not used in the demo level.

Levels are defined as C arrays directly in the source and textures/sprites are compiled into the module file. A simple map editor runs on Linux and can read/write internal map format or export to C header file.

After booting the demo CD image type grub3d at the GRUB2 rescue prompt to play.

Links