Quantcast
Channel: terminal – Hackaday
Viewing all articles
Browse latest Browse all 76

Wolfenstein in 600 Lines of Code

$
0
0

What’s more impressive, the fact that this Wolfenstein-like game is 600 lines of code, or that it’s written in AWK?

AWK is a language primarily used for text processing. But if you can write code the world bows to your wishes. [Fedor Kalugin] leverages the ability of a Linux terminal’s color options to draw his game. The 3D aspect is produced through ray-casting which generates a 2D image from 3D coordinates.

Trying out the game is extremely simple, install gawk, clone the repo, and play:


 

sudo apt-get install gawk
git clone https://github.com/TheMozg/awk-raycaster.git
cd awk-raycaster/
gawk -f awkaster.awk

We really appreciate the four different display modes which illustrate doing a lot with very little. They include: black and white text, color text, color background, and combination of color text and background. It’s an advanced texture technique with which every ansi artist is familiar.

awk-wolfenstein-textures

Don’t limit yourself to playing with the script and losing interest. Crack that thing open. Try making a spinning wireframe cube based on this framework!

[via HackerNews]


Filed under: linux hacks, slider, Software Development

Viewing all articles
Browse latest Browse all 76

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>