一个类似Doom的游戏引擎,可以将ascii和输出呈现给终端!

一个类似Doom的游戏引擎,可以将ascii和输出呈现给终端!

Python 命令行工具

访问GitHub主页

共162Star

详细介绍

Terminal Dungeon Preview 3

Now with Sprites!:

Terminal Dungeon Sprite Preview

This engine was used to power a maze solving robot during Advent of Code 2019:

Maze Solver

(see code here: AoC Raycaster)

Terminal Dungeon

A Doom-like game engine that renders to ascii and outputs to terminal!

  • 'esc' to exit

  • 't' to turn off textures

  • 'wasdqe' or arrow-keys to move

  • 'space' to jump


Depending on your terminal font, Renderer.ascii_map may need to be adjusted. If you'd like to make an ascii map more suitable to your terminal's font, check my Snippets repository for a script that grabs mean brightness of unicode characters.

Values stored in textures should range from 0-9. Values below 6 are subtractive and above 6 are additive.


This project wouldn't have been possible without the following valuable resources:

Lode's Computer Graphics Tutorial

PyRay - Python Raycasting Engine

pygame-raycasting-experiment

推荐源码