michael-lazar / playscii Goto Github PK
View Code? Open in Web Editor NEWFork of playscii
Home Page: https://heptapod.host/jp-lebreton/playscii
License: MIT License
Fork of playscii
Home Page: https://heptapod.host/jp-lebreton/playscii
License: MIT License
Using Playscii's functionality, I have imported a bitmap image as described within the following YouTube video:
https://www.youtube.com/watch?v=nr49LV0Ks_Y
When exporting the generated piece of art in "AMS" text format as described within the video, I get a text file which is auto-detected as "ANSI" (e.g. using Notepad++). Looking at the generated characters, I see loads of differences to "ordinary" ANS files, as their format is defined here:
https://en.wikipedia.org/wiki/ANSI_escape_code#SGR
Part of an example export file generated with Playscii:
<ESC>[0;29;39m<NULL><ESC>[0;30;42md<ESC>[0;30;43m<NULL>...
There are some formal elements (e.g. "" characters and non-standard select graphics rendition parameters) which don't seem to fit to the "normal" ANS format. They seem to suppress / disturb a proper art display within the command line. On Windows systems, ANS files can be directly opened (viewed) using the "type" command:
type <ANSI-ART-FILE>.ans
This notmally results in properly colored ANSI art contents when fed with proper ANS files. Very nice. But with exported text files looking as the one sketched above, the output does not have anything in common with the original piece of art visible within Playscii.
Which formal specification does the ANS export feature follow? Is there a way to display the ANS exports within the "normal" Windows command line (e.g. using the "type" command) or are there any general obstacles to this?
I'm on NixOS 23.11 (unstable channel). I'm getting this error when trying to run Playscii.
UserWarning: Using SDL2 binaries from pysdl2-dll 2.28.4
/home/fearlessgeek/playscii/playscii/playsciienv/lib/python3.11/site-packages/sdl2/dll.py:273: DLLWarning: OSError('libstdc++.so.6: cannot open shared object file: No such file or directory')
warnings.warn(repr(exc), DLLWarning)
/home/fearlessgeek/playscii/playscii/playsciienv/lib/python3.11/site-packages/sdl2/dll.py:273: DLLWarning: OSError('libstdc++.so.6: cannot open shared object file: No such file or directory')
warnings.warn(repr(exc), DLLWarning)
Playscii v9.17.1
Loading config from /home/fearlessgeek/.config/Playscii/playscii.cfg...
Config loaded.
Detecting hardware...
CPU: x86_64
GPU: Intel - Mesa Intel(R) HD Graphics 5500 (BDW GT2)
OpenGL detected: 4.6 (Compatibility Profile) Mesa 23.0.3
GLSL detected: 4.60
Vertex Array Object support found.
Maximum supported texture size: 16384 x 16384
Detected screen resolution: 1366 x 768, window: 1092 x 614
Detecting software environment...
OS: Linux-6.1.62-x86_64-with-glibc2.38
Python: 3.11.5 (main, Aug 24 2023, 12:23:19) [GCC 12.3.0] (64bit)
Modules: PySDL2 0.9.16, numpy 1.26.2, PyOpenGL 3.1.7, appdirs 1.4.4, PIL 10.1.0
SDL: 2.28.0 SDL-release-2.28.4-0-gcc016b004, SDLmixer: 2.6.1
Loaded key binds from /home/fearlessgeek/.config/Playscii/binds.cfg
Traceback (most recent call last):
File "/home/fearlessgeek/playscii/playscii/playscii.py", line 1170, in
app = Application(config_dir, documents_dir, cache_dir, logger,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fearlessgeek/playscii/playscii/playscii.py", line 366, in init
self.cursor.pre_first_update()
File "/home/fearlessgeek/playscii/playscii/cursor.py", line 260, in pre_first_update
self.reposition_from_mouse()
File "/home/fearlessgeek/playscii/playscii/cursor.py", line 245, in reposition_from_mouse
self.x, self.y, _ = vector.screen_to_world(self.app,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fearlessgeek/playscii/playscii/vector.py", line 119, in screen_to_world
start_x, start_y, start_z = GLU.gluUnProject(screen_x, screen_y, z1, vm, pjm)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fearlessgeek/playscii/playscii/playsciienv/lib/python3.11/site-packages/OpenGL/latebind.py", line 63, in call
return self.wrapperFunction( self.baseFunction, *args, **named )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fearlessgeek/playscii/playscii/playsciienv/lib/python3.11/site-packages/OpenGL/GLU/projection.py", line 55, in gluUnProject
result = baseFunction(
^^^^^^^^^^^^^
File "/home/fearlessgeek/playscii/playscii/playsciienv/lib/python3.11/site-packages/OpenGL/platform/baseplatform.py", line 423, in call
raise error.NullFunctionError(
OpenGL.error.NullFunctionError: Attempt to call an undefined function gluUnProject, check for bool(gluUnProject) before calling
Hi,
I became interested in PLAYSCII but still confused about the fact that there seem to be at least two repositories used for hosting current source code:
which one is the "right" one? does anybody know why this situation (two repos) is the case?
Commentary on the Itch storefront seems to hint as much: https://itch.io/post/4747062 But I'm having trouble running it on Monterey/12.4. Specifically, I get the same error in response to python3 playscii.py
on this repo that I do on the main repo from Heptapod, which is:
Traceback (most recent call last):
File "/Users/brendan/Library/Mobile Documents/com~apple~CloudDocs/Code/playscii-source/env/lib/python3.9/site-packages/sdl2/sdlmixer.py", line 79, in <module>
dll = DLL("SDL2_mixer", ["SDL2_mixer", "SDL2_mixer-2.0"],
File "/Users/brendan/Library/Mobile Documents/com~apple~CloudDocs/Code/playscii-source/env/lib/python3.9/site-packages/sdl2/dll.py", line 194, in __init__
raise RuntimeError("could not find any library for %s (%s)" %
RuntimeError: could not find any library for SDL2_mixer (PYSDL2_DLL_PATH: .)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/brendan/Library/Mobile Documents/com~apple~CloudDocs/Code/playscii-source/playscii.py", line 31, in <module>
from sdl2 import video, sdlmixer
File "/Users/brendan/Library/Mobile Documents/com~apple~CloudDocs/Code/playscii-source/env/lib/python3.9/site-packages/sdl2/sdlmixer.py", line 82, in <module>
raise ImportError(exc)
ImportError: could not find any library for SDL2_mixer (PYSDL2_DLL_PATH: .)
I have no experience with SDL, so I'm fumbling in the dark here, but I have tried setting the PYSDL2_DLL_PATH environment variable to point to (eg) the sdl2dll directory tucked away in python3.9/site-packages in this copy of the code, which doesn't seem to affect anything.
Are you able to run Playscii on 64-bit Mac OS? Have you seen this issue before?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.