A bullet hell game written in bash

104 points
1/20/1970
4 months ago
by taviso

Comments


nine_k

So, the game is written in bash much like AI stuff is written in Python.

The heavy lifting is done by a native-code library, while the bash code provides the glue and the overall control logic. (Much like having heavy lifting done by PyTorch with Python code providing general guidance.)

And this is completely fine, to my mind. Bash is intended to be a glue language orchestrating execution of native code. Usually it starts processes, but here it interacts with a native-code library.

See:

https://github.com/taviso/ctypes.sh/

https://github.com/raysan5/raylib

4 months ago

Lockal

I don't agree that the comparison is correct. In modern AI, Python is either used to describe a graph built of predefined operations or as a language that is translated into this graph (or into C++/CUDA, potentially through multiple intermediate representation languages). Once the translation is done, Python, with its GIL and object-based model, is almost not involved.

In contrast, game uses an imperative, immediate rendering library, where the developer directly controls every sprite with something like `pos += velocity * dt`. It's very classic, and it reminds me of the Touhou PC-98 Restoration Project - https://github.com/nmlgc/ReC98/blob/master/th05/main/boss/b1...

4 months ago

PaulHoule

That ctypes.sh makes me think of Microsoft Powershell which is able to script COM objects much as Visual Basic. It's the moral equivalent of ctypes, although ctypes is in the wild and wooly world of C where there isn't any concept of memory safety, garbage collection and all that, whereas COM provides an OO-like API that looks horribly overengineered from the C world.

4 months ago

luma

Anyone got a link to the repo? Another twitter thread where most of the detail is locked behind a login. Why anyone uses this platform for publishing today is beyond me.

4 months ago

alwa

4 months ago

gregopet

bash.. the developer's and the player's experience can't be that different.

4 months ago

forrestthewoods

Hideous, I hate-love it.

Has anyone made Doom in bash?

4 months ago

eep_social

I think Doom in ascii is the closest yet https://github.com/wojciech-graj/doom-ascii

4 months ago

s3arch

telnet doom.w-graj.net 666

4 months ago

andybak

I swear this is a post title I saw the LLM that was trained on HN archives come up with.

4 months ago

bitwize

It'd be peak hackernews (in a good way) if someone saw that AI headline and thought, "Hey, I think I'll actually write that!"

4 months ago

hkc88hkc

Bash, but amazing, lol

4 months ago

fc15004

[flagged]

4 months ago

fc15004

[flagged]

4 months ago

fc15004

[flagged]

4 months ago