Compare commits

...

3 Commits

Author SHA1 Message Date
bb633a93c8 start writin words 2022-12-19 19:34:16 +00:00
34988c272e add debian package name 2022-12-19 19:33:00 +00:00
f0eb8bc2a2 gpt game dialogue 2022-12-17 20:36:32 +00:00
8 changed files with 103 additions and 1 deletions

View File

@ -9,7 +9,9 @@ There are other ways to do this, but as my machines predimonantly run Debian- or
This post is largely based on the description on the [ArchWiki](https://wiki.archlinux.org/title/NFS#As_systemd_unit). This post is largely based on the description on the [ArchWiki](https://wiki.archlinux.org/title/NFS#As_systemd_unit).
My NAS' hostname is `sleeper-service`, and I'll be mounting the `Music` shared folder. My NAS' hostname is `sleeper-service`, and I'll be mounting the `Music` shared folder.
You'll need the `nfs-utils` package to mount NFS filesytems. You'll need the appropriate package to mount NFS filesytems.
On Arch Linux, `nfs-utils` is what you'll be after.
On Debian, the client pckage is `nfs-common`, which may already be installed.
You may also need to configure security on your NAS to allow NFS connections from your local machine's IP. You may also need to configure security on your NAS to allow NFS connections from your local machine's IP.
## Initial mount ## Initial mount

View File

@ -0,0 +1,58 @@
# Game dialogue with ChatGPT
[ChatGPT](https://chat.openai.com/chat) has become the latest AI application to enjoy viral popularity.
At time of writing it's a closed-source research tool developed by OpenAI, with the only access being via their web portal.
Users have to create an account to interact with the bot, and have no API access, though they no doubt have one internally.
I think given its capabilities, this is probably a good idea for now, but I'd like to outline the impact it can already have in game development, even in its fairly limited form.
However, it can already be made immensely useful for content generation, without any kind of API access.
Generally, characters come in two flavours: main characters, whose motivations and actions shape the story; and generic NPCs, who exist to fill out the world for the player.
For the story to carry the author's intent (which they might not necessarily care about), it would probably be best not to leave ChatGPT to generate a plotline on its own.
Its susceptibilty to bias is a problem - try generating men or women and count how often they're describing as petite, as having chiseled jaws or as wearing form-fitting dresses.
It can be coaxed out of this with enough description, but lots of manual intervention defeats any content generation technique.
The other group of characters, though, I think represents ripe pickings.
Often in a game world, background dialogue quickly becomes stale, as lines are reused.
ChatGPT can already easily be used as a supporting writer to generate a huge amount of less-than-critical dialogue.
Take, for example, a merchant.
![generating merchant dialogue](merchant_prompt.png)
This psuedo-format is instantly combatible with a simple templating system.
It would be trivial to generate variations using perfectly traditional programming techniques.
This prompt took a minute to write, and includes specific about the character's context, as well as a slightly more than default personality.
We've instantly generated 8 perfectly workable dialogue options for our character, from some basic and mostly templated information about their context.
However, we notice that our item choices weren't included in the output, though we described them.
So we ask:
![merchant items](merchant_items.png)
And, instantly, another 8 lines.
We now have, after a modicum of input, 16 possible lines for a background merchant character to respond with when interacted with.
With some templated prompt generation, this could be made even faster than the description given here.
It's also capable of going beyond just lines dialogue.
[Ibralogue](https://github.com/Ibralogue/Ibralogue)'s developer taught it the syntax, had it generate an example and then taught it a new feature:
![sprite prompt](sprite_prompt.png)
![sprite response](sprite_response.png)
All that's left is to copy the output and paste it into a text file for a game to use.
---
This is barely even a scratch on what ChatGPT or systems like it are already capable of.
At present, the website gets overloaded, you can't save and reload conversations, and its content filtering is very much evolving problem.
However, even with those limitations it's an extraordinarily powerful tool, and this is just one very minor example of an application.
That's it from me, but I'd love to read more discussion about use cases and the ethical issues at play.
If you have anything interesting, please [get in touch](mailto:me@ktyl.dev)!

BIN
blogs/2022/12/17/merchant_items.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
blogs/2022/12/17/merchant_prompt.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
blogs/2022/12/17/sprite_prompt.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
blogs/2022/12/17/sprite_response.png (Stored with Git LFS) Normal file

Binary file not shown.

4
communal-music-server.md Normal file
View File

@ -0,0 +1,4 @@
For the communal music player, means of access is also something to consider.
I'm personally quite comfortable with the minimal MPD client, [ncmpcpp](https://github.com/ncmpcpp/ncmpcpp), but the aim of a _communal_ music system is to entice others, potentially houseguests to use it too.
To ask them to use a TUI system whose name doesn't even contain vowels would be an exercise in the obtuse.
Therefore, I also want a means to interact with this music player which is ideally as straightforward as Spotify.

View File

@ -0,0 +1,26 @@
# Setting up a network media drive with an NFS-enabled NAS and a Raspberry Pi
I have a large digitised collection of music, and have been experimenting with ways to set up a communal music player in my living room without defaulting to Spotify, or any other such streaming platform.
Thus far I have used an old laptop with as much music as it will fit loaded onto it, running [MPD](https://www.musicpd.org/) and plugged into some speakers.
This is an OK solution, but has a few drawbacks: I'm limited to the disk of the laptop, the laptop uses more power than it needs to, and I kind of want that laptop back as a laptop!
I also have a desktop machine from which I often work from home, and would like my music collection available there too.
Ideally, these should be stored in the same place, to save having to manage duplicate files and manually synchronising locations, since I am likely to add to my collection from a variety of locations.
I have spent enough time `rsync`ing albums between machines, life is too short even on a gigabit local network.
I've recently had the good fortune to acquire a Synology NAS, so I'm going to use that to host my music collection.
Nothing I'm doing should be specific to Synology's hardware or software, as we'll be using [NFS](https://wiki.archlinux.org/title/NFS) to mount remote drives - but exposing an NFS shared folder to the network is therefore out of scope for this post.
I also had the luck to grab a Raspberry Pi from a pop-up store a few weeks ago, and felt that would make a perfect, low-power, unintrusive box to attach to the speakers.
Ostensibly, the Pi is overkill for just playing music, but it's better than a whole laptop and I'm sure I'll find other jobs for it to do as time goes on.
## Set up a shared folder
The first step is to centralise my music storage.
To do this, I created a shared folder from my NAS' web interface, and exposed it to the network.
In my case, I had to specifically add permission for other devices to access the folder via NFS - such as the Pi, my desktop and my laptop.
It was therefore prudent to assign each of these machines a static IP on my network, so that the NAS can continue to recognise them.
I also had to set it to map all users to admin, but this is almost certainly a misconfiguration on my part - don't follow me for security advice, I am just tinkering!
## Setting up the Pi