Woo my MUD has its first NPC

grapevine.haus/games/emsMUD/pl

Attached is a screenshot of the code that makes her, which is really rough and verbose because well, its the first one!

But, she can send messages to players in the same room as her, and move herself room to room.

@emsenn at least personally, one of things I like about lisp is that getting from "it doesn't work at all" to "it kinda works" is easier than in many other languages.

also "A: What's the code like? Is it good code?" "B: It's better than good: it's done!"

@emacsomancer I have /never/ been able to actually do what I want in a language like any given LISP lets me do.

And it's so powerful for this sort of programming: nearly every part of the code started as code for working with one or two things, and then things got generalized out - a lot of times legit just copying hacky procedures into the main files, cause they work well enough!

And like, that any given NPC can be programmed from the ground-up like that? verbose right now, sure, but with hacky procedures i'm sure to make it'll get more terse, and also, wow! any npc can do p much anything! which is a cool freedom in worldbuilding.

@emacsomancer like there's so much fluidity! the mass quality defined here... actually only ever exists in one other place, kind of, where there's a check for things with that quality when you "look"

Other than that, it's just... just add it and use it! It's kinda like... emacs in that way? loosely extensible, yo ucould add a emacsomancer-score quality to any given thing and work with it however you wanted.

(And you can define proper checks like to make sure the score is only ever an int.)

(I am kinda proud of this engine as a whole I'll be honest. for a hobbyist hack effort, it's cool!)

@emsenn I'm of course coming at all of this from a hobbyist perspective too: and I think there's something to that.

Other than a potential barrier of lisp being syntactically different from other languages that a user may have previous encountered, I think that lisps are easier for people to wrap their heads around enough to be able do something significant and innovative than is the case for lots of other programming 'paradigms'.

@emacsomancer *nod* I look to early MUD history and say, if those folk who sometimes came into being MUD developers just because they were expert players and had no programming experience, could make some of those cool systems, using a weird C derivative, then folk can probably do at least as well with a LISP.

I don't really care about people who are already programmers they can use one of the many other MUD engines :D

@emsenn Yeah, I'd definitely contend that it's likely that the translation from "I don't know anything about programming but I like MUDs" to "I'm a MUD developer" would be quicker, easier, and more enjoyable with a lisp than lots of other languages.

@emacsomancer I will say, I've probably written like 20 different versions of "make the world map" code, but like, without ever really needing to think or work too hard about it and I think that more shows how un-locked-into-one-way things are.

@emacsomancer (if you or anyone else is curious this is the current way that it's done: the objects are prebuilt with "area-id" qualities that are each unique, and then sorted into a hash-table where each key is that id and each value is the corresponding thing.

Then exits are added, using those IDs to find things.

It wouldn't scale well for a world of thousands of rooms, but this isn't that sort of MUD!

@emsenn I wonder about the scaling. Hash table lookups should be pretty computationally cheap, right?
Follow

@emacsomancer i don't know about any of that, but it only looks them up in the hash table to set the exits up, once they're set it points directly to the thing that is the room you'd move into

@emsenn Yeah, I'm not sure. But I'm guessing it might scale better than one might think.

@emacsomancer The main issue with scale I see is actually just the human error of it being hard to manually map the exits of several thousand rooms without errors.

Luckily this way of map-building errors on build, /not/ when a person tries to use an exit that is broken.

@emsenn Ah, I see. Presumably, if desired, one could add some sort of sanity check procedure which occurred before the room-exit associations were created. Or even a different 'front-end' of some sort for doing these associations which got translated into the hash table entries.

@emacsomancer *nod*

I'm planning on handwriting this universe of my own library and stuff but for the game-MUD I'm planning I've actually had a change of heart towrad generated worlds, because I think that's the only way I can get the sort of ecological complexity that I crave.

@emsenn Writing code for generated worlds I think would be fun and interesting to do too!

@emacsomancer Yea! I was looking at the source behing azgaar.github.io/Fantasy-Map-G and it made it seem accessible enough to get started with.

@emsenn I've seen the generator before (it seems pretty cool), but I didn't try digging into the source at all.

@emacsomancer It is! And it's in active development and getting more sophisticated - it's a LOT more sophisticatedthan it looks at glance, in terms of building cultures and stuff.

But at the end of the day it's a mapping app and I'd love to have something similar that makes a living world you can then step into.

@emsenn I have a personal love of maps, especially 'fantasy' type ones, and so there's something really enchanting about this sort of automated generation of a potential infinity of maps of such worlds.

I really haven't dug into the culture-building and other aspects - that's really cool - I was entranced just looking at the maps! But having those other things make it even more interesting.

@emacsomancer Right? At the moment it's all fairly simple but I'd love to see like, it plugged into some of the conlang generators out there so that your cultures could like, develop languags over time/dispersal, and other shit like that.

@emsenn And even if one wanted to do a lot 'hand-crafting' of a world, having a generated base to work from could be very useful.

@emacsomancer You'd think so but if there's any sort of mechanic interplay between like the world's climate simulation and the plants that grow in an area, making a village grow apple sfor cider because you think that'd look cool can just, fail.

@emsenn So you're thinking of pretty advanced procedural generation then? I hadn't thought about climates and ecologies and that sort of thing.

@emacsomancer From looking at how Azgaar does it, they achieve pretty impressive results with pretty simple code, so yea, I would be when I played with that sorta stuff. It's not like I /also/ have to render graphics for all these procedurally generated stuff, just make sure the sentences describing stuff parses out alright.

And I've already done some tinkering on code that like, makes it rain in an area and then the ground is divided into areas that have surface area and the soil can retain water but then excess goes to whatever thing is designated the watershed, and blah blah blah.

It's all just chains of procedures and hooks, it's just a LOT to make it into any sort of cohesive thing. rn it just random rains in a barren field players can't access.

@emacsomancer (The year is 2042, my computer, made by a local artisan out of scavenged material and powered by batteries charged by a waterwheel at the creek, runs a MUD that when you make a new universe, it simulates soil accumulation and mass extinctions and fossilizations and so on. No one has logged on in eight months, but people read the debugging output to see how things are doing.

@emsenn This puts me in mind of dwarf fortress and its worldgen and simulation techniques.

@emacsomancer I mean y'know why not? I think it could be really really cool especially with text.

@emacsomancer (btw i've enjoyed our mud chatter. if you ever wanna tinker with the code let me know and I'll push my latest updates to the git repo. but again, there's no documentation yet so.)

Show more

@emacsomancer Yea exactly this sorta thing, only i'm hoping if I start with "making an environment that a player can be indigenous with" instead of "make dwarf fortress" I can kinda skew things away from "cats get drunk" to "players can barely figure out how to make alcohol" lol

Show more
@emsenn

A creek with running water in 2042? Talk about fantasies!

[I just read out of Lisp curiosity, am not into MUD's.]

@emacsomancer
Sign in to participate in the conversation
Ecosteader

This mastodon instance is dedicated to the survival of indigenous languages, plant knowledge, art, and culture outside white supremacist-controlled networks Facebook and Twitter.
Decolonize food. Decolonize medicine. Decolonize housing. Decolonize from corrupt white supremacist networks. Decolonize the US from its oligarchal form of government! European statues, place names, words, languages, and accounting systems DO NOT BELONG on Turtle Island, and are killing the whole planet. "Traditional Ecological Knowledge" (TEK) is the only thing that can help humans as colonial systems continue to sink deeper into broken, inequitable, and faulty systems that value money over Earth's many forms of life. #LivingWalls, not border walls. . Understand more... .