unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* bad.el - ascii art games [package] [screenshots] [video]
@ 2024-09-20 10:35 Emanuel Berg
  2024-09-21  0:04 ` Emanuel Berg
  2024-09-23  3:02 ` Richard Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Emanuel Berg @ 2024-09-20 10:35 UTC (permalink / raw)
  To: emacs-devel

I have written a package, bad.el, that is something quite
spectacular. Unique - maybe - at least I didn't see anything
like that. It can already do interactive games and demos
with graphics.

It only uses one uncommon library, eieio. It doesn't use
gamegrid or anything like that.

Here is a demonstration video what it can do:

  https://dataswamp.org/~incal/bad/meta/bad.mkv

Here are a bunch of screenshots:

  https://dataswamp.org/~incal/bad/meta/toronto.png
  https://dataswamp.org/~incal/bad/meta/cat.png
  https://dataswamp.org/~incal/bad/meta/egypt.png
  https://dataswamp.org/~incal/bad/meta/studio.png

How to get it:

  https://dataswamp.org/~incal/bad

  $ git clone https://dataswamp.org/~incal/bad.git

I'd like it to be added to GNU ELPA, which already has
`ascii-art-to-unicode' BTW. If that is okay, I will start
adding necessary docstrings and stuff.

Fun fact: There are at least 458 packages in GNU ELPA at
this point.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-20 10:35 bad.el - ascii art games [package] [screenshots] [video] Emanuel Berg
@ 2024-09-21  0:04 ` Emanuel Berg
  2024-09-21 21:00   ` Emanuel Berg
  2024-09-23  3:02 ` Richard Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Emanuel Berg @ 2024-09-21  0:04 UTC (permalink / raw)
  To: emacs-devel

> Here is a demonstration video what it can do:
>
>   https://dataswamp.org/~incal/bad/meta/bad.mkv
>
> Here are a bunch of screenshots:
>
>   https://dataswamp.org/~incal/bad/meta/toronto.png
>   https://dataswamp.org/~incal/bad/meta/cat.png
>   https://dataswamp.org/~incal/bad/meta/egypt.png
>   https://dataswamp.org/~incal/bad/meta/studio.png
>
> How to get it:
>
>   https://dataswamp.org/~incal/bad
>
>   $ git clone https://dataswamp.org/~incal/bad.git

Well, did anyone try?

Thanks to user foxdie several bugs were found and hopefully
corrected, just do 'git pull' if you did the above.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-21  0:04 ` Emanuel Berg
@ 2024-09-21 21:00   ` Emanuel Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg @ 2024-09-21 21:00 UTC (permalink / raw)
  To: emacs-devel

> How to get it:
>
>   https://dataswamp.org/~incal/bad
>
>   $ git clone https://dataswamp.org/~incal/bad.git

A bunch of guys have tried this now and we discovered
a misconfiguration so the git command didn't work unless you
had a certain configuration, I had it so didn't notice - THAT
SAID, now it should for everyone, use the git command:

$ git clone https://dataswamp.org/~incal/bad.git

The git method is better, but you can also do 

  $ wget https://dataswamp.org/~incal/tmp/bad.zip

and then 'uzip bad.zip'.

You run the cloned/downloaded result with the 'so', 'eo',
'to', and 'po' scripts. The scripts must be executable, do
'chmod -x' if necessary. You can try to compile with 'co' and
especially 'no', that will make it much faster and smooth.

Note that if your 'emacs' refer to some old or defunct version
of 'emacs', you must rewrite the scripts manually so they will
run an as modern an Emacs as possible.

Other problems that arised during testing appeared to be
something out of nothing.

If nothing else, you can watch the movie bad.mkv in the
meta/ directory where there also are nice screenshots.

Remember, there are maybe life even on other *planets* :O

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-20 10:35 bad.el - ascii art games [package] [screenshots] [video] Emanuel Berg
  2024-09-21  0:04 ` Emanuel Berg
@ 2024-09-23  3:02 ` Richard Stallman
  2024-09-25 16:07   ` Emanuel Berg
  1 sibling, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2024-09-23  3:02 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > I have written a package, bad.el, that is something quite
  > spectacular. Unique - maybe - at least I didn't see anything
  > like that. It can already do interactive games and demos
  > with graphics.

  > It only uses one uncommon library, eieio. It doesn't use
  > gamegrid or anything like that.

Could you plase ell us, in a few lines, _what_ this program does?
what sort of input does it use, and what sort of putput does it generate,
and how are they related to each other?


-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-23  3:02 ` Richard Stallman
@ 2024-09-25 16:07   ` Emanuel Berg
  2024-09-25 23:44     ` Emanuel Berg
  2024-09-29  2:14     ` Richard Stallman
  0 siblings, 2 replies; 13+ messages in thread
From: Emanuel Berg @ 2024-09-25 16:07 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1998 bytes --]

Richard Stallman wrote:

>> I have written a package, bad.el, that is something quite
>> spectacular. Unique - maybe - at least I didn't see
>> anything like that. It can already do interactive games and
>> demos with graphics.
>>
>> It only uses one uncommon library, eieio. It doesn't use
>> gamegrid or anything like that.
>
> Could you plase ell us, in a few lines, _what_ this program
> does?

No problems at all, it is an OO(P) framework or development
kit for graphics. Right now, only ascii is supported but the
sky is the limit. Any game, application or other framework
that draws can benefit from using it. You can draw, you can
move, you can animate, you can play the game.

It uses eieio.el and that is what has made it all possible.
I wrote the framework and then no less than four interactive
very-small-but-still demos/applications in only 1 month and 1
day. One of these, the studio, is a drawing program and will
need many times the number of features, but it is there even
now, operation. The others are more or less done demos
demonstrating bad.el. eieio.el makes Elisp _a
pleasure_!

> what sort of input does it use, and what sort of putput does
> it generate, and how are they related to each other?

Yes, okay, in terms of Emacs one could say it is a combination
of `animate-birthday-present' (you wrote that), `gamegrid' and
`artist-mode'.

But it still isn't that because when you draw, you can rotate,
flip, transpose, change size, move, and whatever you can think
of. Because it is all objects with methods, just add a new
method for every idea. And after you draw a thing, you can
draw something else, a hundred other things, and then return
to the first and start over, because it is still live.

Here are a web page (that now works) with a bunch of
screenshots as well as how to get it. The text isn't
important, just look at the screenshots for now. There is
a video, but I realize now I should have done it longer,
more clear.

https://dataswamp.org/~incal/bad-www


[-- Attachment #2: studio.png --]
[-- Type: image/png, Size: 2165 bytes --]

[-- Attachment #3: Type: text/plain, Size: 61 bytes --]


-- 
underground experts united
https://dataswamp.org/~incal

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-25 16:07   ` Emanuel Berg
@ 2024-09-25 23:44     ` Emanuel Berg
  2024-09-26  5:50       ` Emanuel Berg
  2024-09-29  2:14     ` Richard Stallman
  1 sibling, 1 reply; 13+ messages in thread
From: Emanuel Berg @ 2024-09-25 23:44 UTC (permalink / raw)
  To: emacs-devel

> Yes, okay, in terms of Emacs one could say it is
> a combination of `animate-birthday-present' (you wrote
> that), `gamegrid' and `artist-mode'.

And how can a drawing program be all that at once?

It is because you don't just draw what things are - "they are
like this" (the bitmap/raster way) - or "they are like this as
some data system, devised to express them, to save disk space
and be zoomable" (the vector way) - no, this way is different
because what is also included is _how they behave_.

After you draw (even while you draw), they are not dead, so
you can shout: BE ALIVE! and then you have an animation.
or shout BE AT WAR! and you have game. Or BE NORMAL! and it is
a simulation.

Okay, I'll do a new video! Huge mistake by me, this, not
taking it really slow showing and explaining. The video will
show everything, God willing. But I am now not at the level
when I wrote all that code, so be patient as I know you are
and it will come - I don't know when it will come.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-25 23:44     ` Emanuel Berg
@ 2024-09-26  5:50       ` Emanuel Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg @ 2024-09-26  5:50 UTC (permalink / raw)
  To: emacs-devel

Here is another example. It is called "The graphic Object
Editor" and is described as "Interactive edition of
hierarchical properties of graphic objects".

https://help.scilab.org/docs/2024.1.0/en_US/object_editor.html

It starts

  [It] provide[s] graphic editing operations for the different
  kind of graphics objects (see graphics entities for more
  details), including the enabling them, disabling them, and
  editing their properties, before or after they have
  been drawn.

  Internally, each graphic window, and the drawing it
  contains, are represented by a hierarchy of entities.
  The hierarchy top level is the Figure. Each Figure defines
  at least one child of type Axes. [...]

The details are not cut in stone but they speak of exactly the
same editor type and model to deal with graphics in a way that
is - very good. Infinitely more powerful and maybe we can even
reinvent the thing by combining with the input interface of
`artist mode'. Self-documenting, self-balancing...

Yes, hierarchy! I even showed you the pyramid I had, with
boxes in boxes in boxes.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-25 16:07   ` Emanuel Berg
  2024-09-25 23:44     ` Emanuel Berg
@ 2024-09-29  2:14     ` Richard Stallman
  2024-09-29  4:20       ` Emanuel Berg
  1 sibling, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2024-09-29  2:14 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

It sounds interesting, and leads me to a few more questions.

* Does it define its own system for classes and methods?
If not, what does it use for that?

* What non-basic facilities of Emacs does it depend on?

* Is its display done using characters, like `animate-birthday-present',
or can it be draw in terms of pixels?

* does every kind of visual object _have to_ have is own data type?

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-29  2:14     ` Richard Stallman
@ 2024-09-29  4:20       ` Emanuel Berg
  2024-09-29  7:50         ` Emanuel Berg
                           ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Emanuel Berg @ 2024-09-29  4:20 UTC (permalink / raw)
  To: emacs-devel

Richard Stallman wrote:

> * Does it define its own system for classes and methods?

Not sure what you mean, it has its own system which begins at
the `elem' (element) base class, but the OO part is provided
by eieio.el as mentioned.

> * What non-basic facilities of Emacs does it depend on?

My own, and

(require 'cl-lib)
(require 'eieio)
(require 'subr-x)

> * Is its display done using characters, like
> `animate-birthday-present', or can it be draw in terms
> of pixels?

Chars, but pixels is the next step, I would like to do that!

> * does every kind of visual object _have to_ have is own
> data type?

No, you can draw or type any way you want, as long as you don't
tell the program to overwrite it. You can also draw manually,
if you will, via the program, by manipulating a "data" member
and then let the program draw it.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-29  4:20       ` Emanuel Berg
@ 2024-09-29  7:50         ` Emanuel Berg
  2024-09-29 13:20         ` Emanuel Berg
  2024-10-01 14:41         ` Richard Stallman
  2 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg @ 2024-09-29  7:50 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1410 bytes --]

>> does every kind of visual object _have to_ have is own
>> data type?
>
> No, you can draw or type any way you want, as long as you
> don't tell the program to overwrite it. You can also draw
> manually, if you will, via the program, by manipulating
> a "data" member and then let the program draw it.

Here is how it looks - 

;;; -*- lexical-binding: t -*-

(require 'bad-box)
(require 'bad-box-draw)
(require 'bad-draw)
(require 'bad-mode)
(require 'bad-move)
(require 'bad-rotate)
(require 'bad-size)
(require 'bad-triangle)
(require 'bad-write)

(defun bad-run-mini ()
  (let ((bg  (box :w 11 :h 9 :spc '(?\s)))
        (tri (triangle)))
    (draw bg)

    (size tri 7)
    (mov  tri 2 1)
    (rotate tri)
    (write-over bg tri)

    (let* ((i 35)
           (line (oref bg w)))
      (write-index bg i                ?G)
      (write-index bg (cl-incf i line) ?N)
      (write-index bg (cl-incf i line) ?U)

      (write-index bg (cl-incf i (* 2 line)) ?E)
      (write-index bg (cl-incf i)            ?m)
      (write-index bg (cl-incf i)            ?a)
      (write-index bg (cl-incf i)            ?c)
      (write-index bg (cl-incf i)            ?s))

    (draw-to-buf bg)
    (pop-to-buffer (bad-mode-buffer))
    (delete-other-windows)))

(provide 'bad-mini)

;; +---------+
;; | ####### |
;; |  ###### |
;; | G ##### |
;; | N  #### |
;; | U   ### |
;; |      ## |
;; | Emacs # |
;; +---------+


[-- Attachment #2: gnu-emacs.png --]
[-- Type: image/png, Size: 473 bytes --]

[-- Attachment #3: Type: text/plain, Size: 61 bytes --]


-- 
underground experts united
https://dataswamp.org/~incal

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-29  4:20       ` Emanuel Berg
  2024-09-29  7:50         ` Emanuel Berg
@ 2024-09-29 13:20         ` Emanuel Berg
  2024-10-01 14:41         ` Richard Stallman
  2 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg @ 2024-09-29 13:20 UTC (permalink / raw)
  To: emacs-devel

>> Is its display done using characters, like
>> `animate-birthday-present', or can it be draw in terms
>> of pixels?
>
> Chars, but pixels is the next step [...]

Well, it doesn't have to be. Let me take that back and just
answer the question. No, it only does chars, and no pixels.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-09-29  4:20       ` Emanuel Berg
  2024-09-29  7:50         ` Emanuel Berg
  2024-09-29 13:20         ` Emanuel Berg
@ 2024-10-01 14:41         ` Richard Stallman
  2024-10-01 17:08           ` Emanuel Berg
  2 siblings, 1 reply; 13+ messages in thread
From: Richard Stallman @ 2024-10-01 14:41 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Thanks for the answer.

-- 
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: bad.el - ascii art games [package] [screenshots] [video]
  2024-10-01 14:41         ` Richard Stallman
@ 2024-10-01 17:08           ` Emanuel Berg
  0 siblings, 0 replies; 13+ messages in thread
From: Emanuel Berg @ 2024-10-01 17:08 UTC (permalink / raw)
  To: emacs-devel

Richard Stallman wrote:

> Thanks for the answer.

On the contrary, my pleasure.

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-10-01 17:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-20 10:35 bad.el - ascii art games [package] [screenshots] [video] Emanuel Berg
2024-09-21  0:04 ` Emanuel Berg
2024-09-21 21:00   ` Emanuel Berg
2024-09-23  3:02 ` Richard Stallman
2024-09-25 16:07   ` Emanuel Berg
2024-09-25 23:44     ` Emanuel Berg
2024-09-26  5:50       ` Emanuel Berg
2024-09-29  2:14     ` Richard Stallman
2024-09-29  4:20       ` Emanuel Berg
2024-09-29  7:50         ` Emanuel Berg
2024-09-29 13:20         ` Emanuel Berg
2024-10-01 14:41         ` Richard Stallman
2024-10-01 17:08           ` Emanuel Berg

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).