Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/themozg/awk-raycaster
Pseudo-3D shooter written completely in gawk using raycasting technique
https://github.com/themozg/awk-raycaster
3d awk game raycast
Last synced: 7 days ago
JSON representation
Pseudo-3D shooter written completely in gawk using raycasting technique
- Host: GitHub
- URL: https://github.com/themozg/awk-raycaster
- Owner: TheMozg
- License: mit
- Created: 2016-01-12T20:54:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T20:26:06.000Z (about 2 years ago)
- Last Synced: 2025-01-29T00:49:42.738Z (7 days ago)
- Topics: 3d, awk, game, raycast
- Language: Awk
- Homepage:
- Size: 42 KB
- Stars: 2,426
- Watchers: 44
- Forks: 72
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# awkaster
Bring some old-school fun to your terminal! Explore the dungeon and shoot monsters in this pseudo-3D game inspired by the classic Wolfenstein 3D and Doom.![Screenshot](screenshot.png)
# Running the game
`gawk -f awkaster.awk`You need `gawk` version >= `4.0.0`
OS X users must install `gawk` first. The easiest way to do this is to use [Homebrew](http://brew.sh/). Once it has been installed, run the following commands:
```
brew update
brew install gawk
```NetBSD users require `gawk`. The easiest way to do it is install it with [pkgin](http://pkgin.net):
```
pkgin install gawk
```Alternatively install from sources using the [pkgsrc framework](https://pkgsrc.org/):
```
cd /usr/pkgsrc/lang/gawk && make install
```OpenBSD users require `gawk`. The easiest way to do it is install it with [pkg_add](http://man.openbsd.org/OpenBSD-current/man1/pkg_add.1):
```
pkg_add gawk
```Alternatively install from sources using the [OpenBSD ports](http://man.openbsd.org/OpenBSD-current/man1/ports.7):
```
cd /usr/ports/lang/gawk && make install clean
```
Your machine will now be ready to run *awkaster*.# How to play
Your objective is to navigate the map and activate exit elevator, killing hordes of monsters in the process.Controls:
* WASD - movement
* J/L - turn left/right. Hold shift to turn quicker
* spacebar - shoot
* num 1-4 - change color mode
* x - activate elevator (arrives after 1000 moves)# Adjusting resolution
By default game resolution is 64x48 "pixels", which are just a pair of ASCII symbols. That means your terminal needs to be at least 128 chars wide. You may change variables `w` and `h` to your liking.# Game engine
Wall rendering is done using ray casting. Monsters and projectiles are added after that as sprites.
Ray casting is a simple rendering algorithm that doesn't require any 3d modeling or complex computation.You can find an excellent tutorial here:
http://lodev.org/cgtutor/raycasting.html