A 3D engine powered by ASCII art

Overview

asciimare

A 3D engine powered by ASCII art.

alt text

asciimare uses ASCII characters to display 3D graphics directly in the terminal. It is powered by python curses, and renders by raycasting on voxels.

asciimare utilizes the combination of 95 printable ASCII characters 8 ANSI colors in the terminal to emulate a variety of hues and brightness. It first analyzes a given font and generate a continous and uniform range of shades, e.g.

> >>lllll???iiiccv[]ttzzjj7*ff{{}ssYYTJJJ111unnnnyyyyIIFFFFFFF oooooowe22h3Zaa44XXX%%%555PPPP$$$mmGGAAUUUUbbbppKKK96O##H&&D DDDRRRRRRQQ88888800000000WWWWMMMBBB@@@@@@@@@@@@@NNNNNNNNNNNN ">
Menlo.ttc
          ````````````````````````'''''''''''''......-------
-,,,,,______::::::::^^^^^!!~~~"""""";;;;;;rrrrr++++||()\==>>
>>lllll???iiiccv[]ttzzjj7*ff{{}ssYYTJJJ111unnnnyyyyIIFFFFFFF
oooooowe22h3Zaa44XXX%%%555PPPP$$$mmGGAAUUUUbbbppKKK96O##H&&D
DDDRRRRRRQQ88888800000000WWWWMMMBBB@@@@@@@@@@@@@NNNNNNNNNNNN

and then plays with some color theory to create an illusion of depth.

Dependencies

  • PyPy 2 (pypy.org) (Python works but will be slow)

Usage

Try it out by typing

$ pypy demo.py

or

$ pypy explore.py -i maps/demo.txt

in your terminal.

Loading models

You can explore different maps by loading them into the second command. Currently, asciimare supports models exported from Goxel (plain text) or a batch of csv files each describing a slice along the y-axis. Alternatively, you can procedurally generate models using built-in functions.

Importing asciimare as a module

To use asciimare as a module, place the asciimare subfolder under your project folder and simply do import asciimare. Then, you can define your game class with some standard events and asciimare will figure out the rest. See demo.py for details.

import asciimare

class game(asciimare.GameTemplate):
  def start(self): pass         # use this for initialization
  def update(self): pass        # update called once per frame
  def draw(self): pass          # things to render upon redraw
  def keypressed(self,c): pass  # get pressed key
  
# run the game!
asciimare.run(game)
Owner
Lingdong Huang
Lingdong Huang
A Python3 rewrite of my original PwnedConsole project from almost a decade ago

PwnedConsoleX A CLI shell for performing queries against the HaveIBeenPwned? API to gather breach information for user-supplied email addresses. | wri

1 Jul 23, 2022
Create argparse subcommands with decorators.

python-argparse-subdec This is a very simple Python package that allows one to create argparse's subcommands via function decorators. Usage Create a S

Gustavo José de Sousa 7 Oct 21, 2022
An open-source CLI tool for backing up RDS(PostgreSQL) Locally or to Amazon S3 bucket

An open-source CLI tool for backing up RDS(PostgreSQL) Locally or to Amazon S3 bucket

1 Oct 30, 2021
Simple and convenient console ToDo list app

How do you handle remembering all that loads of plans you are going to realize everyday? Producing tons of paper notes, plastered all over the house?

3 Aug 03, 2022
Voidlx is a terminal cli apps launcher made in python

Voidlx is a terminal cli apps launcher made in python

2 Nov 13, 2021
Low-Cost Open Source Ventilator or PAPR

Last updated 2020/04/19 Low-Cost Open-Source Ventilator-ish Device or PAPR NOTE: This is currently an independent project not affiliated with any comm

Johnny Lee 1.7k Dec 21, 2022
A python script that enables a raspberry pi sd card through the CLI and automates the process of configuring network details and ssh.

This project is one script (wpa_helper.py) written in python that will allow for the user to automate the proccess of setting up a new boot disk and configuring ssh and network settings for the pi

Theo Kirby 6 Jun 24, 2021
CLI for SQLite Databases with auto-completion and syntax highlighting

litecli Docs A command-line client for SQLite databases that has auto-completion and syntax highlighting. Installation If you already know how to inst

dbcli 1.8k Dec 31, 2022
A set of libraries and functions for simplifying automating Cisco devices through SecureCRT.

This is a set of libraries for automating Cisco devices (and to a lesser extent, bash prompts) over ssh/telnet in SecureCRT.

Matthew Spangler 7 Mar 30, 2022
Chat with Rem in Terminal!

Chat with Rem in Terminal!

bariscodefx 1 Dec 19, 2021
Python CLI script to solve wordles.

Wordle Solver Python CLI script to solve wordles. You need at least python 3.8 installed to run this. No dependencies. Sample Usage Let's say the word

Rachel Brindle 1 Jan 16, 2022
CLI tool to develop StarkNet projects written in Cairo

⛵ Nile Navigate your StarkNet projects written in Cairo. Installation pip install cairo-nile Usage Install Cairo Use nile to install a given version o

Martín Triay 305 Dec 30, 2022
This is the public repo for the VS Code Extension AT&T i386/IA32 UIUC-ECE391 Syntax Highlighting

AT&T i386 IA32 UIUC ECE391 GCC Highlighter & Snippet & Linter This is the VS Code Extension for UIUC ECE 391, MIT 6.828, and all other AT&T-based i386

Jackgetup 1 Feb 05, 2022
asciinema - Terminal session recorder 📹

asciinema - Terminal session recorder 📹

asciinema 11.1k Dec 27, 2022
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

Ayush Soni 1 Nov 05, 2021
Install python modules from pypi from a previous date in history

pip-rewind is a command-line tool that can rewind pypi module versions (given as command-line arguments or read from a requirements.txt file) to a previous date in time.

Amar Paul 4 Jul 03, 2021
A curated list of awesome things related to Textual

Awesome Textual | A curated list of awesome things related to Textual. Textual is a TUI (Text User Interface) framework for Python inspired by modern

Marcelo Trylesinski 5 May 08, 2022
A simple script that outputs the current date on the user interface/terminal.

Py-Date A simple script that outputs the current date on the user interface/terminal. How to Run Open your terminal and cd into the folder containi

Arinzechukwu Okoye 1 Jan 13, 2022
pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget

Currently, all the work is being done inside the refactoring branch. pyNPS - A cli Linux and Windows Nopaystation client made with python 3 and wget P

Everton Correia 45 Dec 11, 2022
A dec-bin converter uses 2's complement.

2's Complement Dec-Bin Converter A dec-bin converter uses 2's complement. Visit my Medium Post. What is 2's complement? Two's complement is the most c

Khaw Chi Hun (Jacky) 9 Mar 01, 2022