Hey, this is cool. We need more games written in Prolog. Maaany more.
I’ve got some code I use to print out and walk through grids of ASCII symbols. It was originally used to generate the figures and animations on this project:
There’s a video at the top of the page that will take a while to load because I’m a dork and I didn’t know how to make it smaller while retaining quality.
Anyway there’s a newer, more light-weight version of this library that I use to create images like this one:
I thought I could use the same library to create the maps for a roguelike or similar kind of ASCII-graphics based game that could run on a terminal with a rule engine in Prolog.
Do you think that could work with your game? Interested in collaborating? I have some free time!
P.S. I’m a complete beginner in graphics and I’m probably doing it all in the most inefficient way possible. For example in the screenshot above the image is created by stitching together smaller images (the ones with the green squares and gray dots). You can see the “seams” between images and the direction in which a new image is stuck to a previous one in the lines of yellow arrows. The whole thing just loops through the images to stitch together and takes one as a reference, then one of eight compass direction for all the remaining ones. The blue lines show where the composite images are stuck together in a longer row. It’s very primitive and I’m sure there must be much better ways to do, e.g. use a ncurses-like library however I didn’t have much luck with a Python ncurses clone I tried so I rolled my own in Prolog. Suggestions welcome!
