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 command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

18.6k Dec 30, 2022
A tool to manage the study of courses at the university.

todo-cli A tool to manage the study of courses at the university

Quentin 6 Aug 01, 2022
Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Website

🤖 rover Rover is a command line interface application that allows through browse through mission data, images, metadata from the NASA Official Websit

Saketha Ramanjam 4 Jan 19, 2022
A Tempmail Tool for Terminal and Termux.

A Tempmail Tool for Terminal and Termux.

MAO-COMMUNITY 8 Oct 19, 2022
Simple Terminal Styling for Python

escape Escape is a very simple terminal styling library largely inspired by the excellent javascript chalk library. There are other terminal styling l

Syed Abbas 8 Sep 03, 2019
CLI Utility to encode and recursively recreate directories with ffmpeg.

FFenmass CLI Utility to encode and recursively recreate directories with ffmpeg. Report Bug · Request Feature Table of Contents Getting Started Prereq

George Av. 8 May 06, 2022
Simple CLI interface for linear task manager

Linear CLI (Unmaintained) Simple CLI interface for linear task manager Usage Install: pip install linearcli Setup: Generate a pe

Mike Lyons 1 Jan 07, 2022
CLI tool to view your VIT timetable from terminal anytime!

VITime CLI tool to view your timetable from terminal anytime! Table of contents Preview Installation PyPI Source code Updates Setting up Add timetable

16 Oct 04, 2022
Library and command-line utility for rendering projects templates.

A library for rendering project templates. Works with local paths and git URLs. Your project can include any file and Copier can dynamically replace v

808 Jan 04, 2023
MiShell is a multi-platform, multi-architecture project based on the first version (MiShell32)

MiShell is a multi-platform, multi-architecture project based on the first version (MiShell32), which offers super super small reverse shell payloads great for injection in buffer overflow vulnerabil

Kamyar Hatamnezhad 0 Oct 27, 2022
Simple Python Library to display text with color in Python Terminal

pyTextColor v1.0 Introduction pyTextColor is a simple Python Library to display colorful outputs in Terminal, etc. Note: Your Terminal or any software

Siddhesh Chavan 1 Jan 23, 2022
Python and data science snippets on the command line

Python Snippet Tool A tool to get Python and data science snippets at Data Science Simplified on the command line. You can read my article to learn ho

Khuyen Tran 19 Dec 21, 2022
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
Python script to tabulate data formats like json, csv, html, etc

pyT PyT is a a command line tool and as well a library for visualising various data formats like: JSON HTML Table CSV XML, etc. Features Print table o

Mobolaji Abdulsalam 1 Dec 30, 2021
Play videos in the terminal.

Termvideo Play videos in the terminal (stdout). python main.py /path/to/video.mp4 Terminal size: -x output_width, -y output_height. Default autodetect

Patrick 11 Jun 13, 2022
organize your books on the command line

organize your books on the command line

Ben Winston 19 Jan 21, 2022
A python package to display progress of loops to the user

ProgressBars A python package to display progress of loops to the user. Installation This package can be installed using pip. pip install progressbars

Matthias 3 Jan 16, 2022
📦 A command line utility to put text in a box.

boxie A command line utility to put text in a box. Installation pip install boxie If you are on Linux you may need to use sudo to access this globally

Eliaz Bobadilla 10 Jun 30, 2022
PyArmor is a command line tool used to obfuscate python scripts

PyArmor is a command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts.

Dashingsoft 2k Jan 07, 2023
A CLI for advanced management of your notes with simple commands

PyNoteManager This is a CLI for advanced management of your notes with simple co

3 Dec 30, 2021