;
This is the home of bad.el, boxing after dark, which is an Emacs Lisp graphics program for GNU Emacs. It comes with a drawing program, the studio, plus ascii games and interactive demos.
bad-el.rss
↓ what's new 2025-01-24 ↓
The bad.el studio is a drawing program for GNU Emacs.
bad.el runs on top of Emacs but doesn't look like it.
image: SDXL
Imported ascii drawings, building a shelf and a table. The shelf not accidentally so.
This is the `defun' of my life.
image: SDXL
The studio running in a no-graphics terminal, the poor man's transparency works in mysterious ways.
At the opposite end: running in kitty, that only runs in X.
Ascii art produced with the bad.el interactive editor that still has many features yet to be implemented.
A minimal demo of bad.el. Draw ascii art in and from Lisp, insert into a buffer.
This isn't just another demo.
ascii pyramid: __20h__
gradient: color.el by Drew Adams & Julien Danjou
An animated ascii game with a puzzle to be solved. The skyline of Toronto in a new version of an old work.
original ascii art: jgs
The familiar snake game, looking unfamiliar.
ascii art: josuah
It is known that in ancient Egypt, they used 3D geometry and algebra.
Inspired by the 1985 game Déjà Vu.
image: Dalle
If you'd like to contribute to bad.el, there are many areas where it can be improved.
Here are a bunch of resources from other Emacs projects as I stumble upon them or people tell me about them - new items are appended, so it isn't sorted other than that.
I'm happy to integrate awesome features and neat modules into bad.el. Neat means one is able to call a function, be it a `defun' or `cl-defmethod', and something interesting immediately happens - this is by far the best way. The second best way is: one is able to call a function, then useful and/or interesting data is returned for further inspection 😄
I'm currently working on a minimal [1] version of bad-el. This version already runs much faster thanks to more cognitive algorithms for drawing. But this isn't yet a release. I have other ideas before it skyrockets.
bad.el now has transparency. If you don't believe me, take a look at the above screenshot. And I have been pretty open about it!
The screenshot shows 8 boxes that are transparent both on the foreground and background levels. They show the ansi colors - in the expected order, only I shifted it one step all around to make it start with white, instead of ending with it - for aesthetic reasons 😄
The quote in the box is from a manga about the immense Japanese manga/anime industry itself - a meta-manga if you will - a business which is mechanical and automated to an amazing degree BTW, on the tech - as expected - but also on the human level, what they do and how they work and how it is all organized and carried out in practice, and they describe it very well in the comic - as a programmer, and as a man, that impressed me a lot. Anyway, drawing is done, and in a boxed way, and the quote reads:
The world is all about money and intelligence.
Maybe!
The algorithm works like this. Simple, it polls the below color whenever it draws a transparent object on top of it. Then it makes a mix out of the old, below, and the new, above, color, this by adding the RGB components one by one, multiplying by a factor to specify what weight to assign each color. What is seen in the screenshot, there is only a slight advantage (56.25%) given to the upper color.
Advantages:
A simple and robust solution; gives an honest result for an
easy-to-fathom definition of transparency, and it is a definition that
makes sense for this application; it looks good, and it gives you the
possibility to experiment with color blending.
Downside:
Performance. Especially if one moves a large transparent object around
and over such a stack as seen in the screenshot, the FPS drops big.
Everyone does their own computing and polling so it builds up.
Conclusion: [updated 2025-02-05] This project ... [RSN]
[1]
Minimal software isn't longer than
8 files * 256 lines/file =
2^3 files * 2^(2^3) lines/file =
2^(3 + 2^3) = 2^(3 + 8) = 2^11 = 2048 lines.
But this software doesn't qualify. Maybe I could make pass as not minimal but small software, where the same rules would apply only not for 2^3 but for 2^4, which would mean not more than 2^4 = 16 files with each no longer than 2^(2^4) = 65 536 lines.
Thanks for reading this far! See you around 😄
send a mail
↑ start over ↑