news.volyx.in

A first person shooter in 571 lines of GNU Awk (2016) (github.com)

514 points by nequo · 1324 days ago · 106 comments on HN

Article summary

A first-person shooter game called Awkaster has been created using GNU Awk in 571 lines of code. The game uses ray casting for wall rendering and adds monsters and projectiles as sprites. It can be run using gawk version 4.0.0 or higher. The game's objective is to navigate a map, activate an exit elevator, and kill monsters.

Main themes

  • AWK programming language
  • Game development
  • Text processing
  • Embedded extension languages
  • JavaScript influence
  • Alternative uses for AWK

What commenters say

  • AWK is an under-appreciated language with a lot of functionality and a highly orthogonal interface.
  • A programmatic interface for AWK, such as a 'libawk', would be useful for tasks like text processing and packet filtering.
  • AWK's syntax and functionality are similar to JavaScript, which was influenced by AWK.
  • The use of AWK as an embedded extension language is a viable alternative to Lua.
  • The implementation of Awkaster is impressive and readable, despite being written in a language not typically used for game development.
  • AWK has survived well as a language and its similarity to JavaScript may encourage younger people to take a look at it.
  • A JSON mode for AWK, similar to CSV mode, would be a useful addition for processing JSON data.