Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
/ Asciin.py Public archive

Featherweight 3D / 2D Ascii console game engine for Python 3.5+ written in pure Python with Zero external dependencies.

License

Notifications You must be signed in to change notification settings

Rickaym/Asciin.py

Repository files navigation

pipenv support release platform documentation status

logo

A 2D and 3D Ascii Game Engine written purely in Python from ground up with zero external dependencies. Supports Python versions starting from 3.5.3.

Status Demo

  1. Matrix Patterns
    Uses PixelPainters and Matrix. code

  1. Colors and Collisions NEW in 0.2.0 unreleased
    Uses Color, Square and collides_with for basic 2D planes. code

  1. Screen Saver NEW in 0.2.0 unreleased
    Makes a DVD Logo model from scratch and uses Color. code

Installing

I highly discourage using version 0.1.7, please wait for 0.2.0!

Python 3.5.3 or higher is required

// Windows
py -m pip install -U asciin.py

// Linux/macOS
python -m pip install -U asciin.py

Quick Start

  1. Instantiate a Asciinpy.Window class with the desired values.

  2. Define your game loop and decorate it with the Asciinpy.Window.loop decorator that should accept one parameter of type Screen.

  3. Write some fancy code with or without built-in models to render.

  4. Call the Asciinpy.Window.run method!

from Asciinpy.screen import Screen, Window
from Asciinpy.values import Resolutions
from Asciinpy._2D import Square

# Define a window
window = Window(resolution=Resolutions.Basic)

@window.loop()
def game_loop(screen: Screen) -> None:
    square = Square(coordinate=(0, 0), length=8, texture="%")
    while True:
        screen.blit(square)
        screen.refresh()

if __name__ == "__main__":
   window.run()

About

Featherweight 3D / 2D Ascii console game engine for Python 3.5+ written in pure Python with Zero external dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages