Coder Social home page Coder Social logo

Comments (9)

CharlesHD avatar CharlesHD commented on July 22, 2024

That's a fun fact. Was about to post about the same thing about this engine.
Would love to define custom actions.

from advenjure.

facundoolano avatar facundoolano commented on July 22, 2024

I'm sorry for the delayed answer, I just saw this (forgot to turn on the notifications for this project). I'm glad to see advenjure being used!

There are already mechanics to easily add custom actions (that is, actions that do nothing by default but execute the pre and post conditions, or print a message). What's missing is the ability for the library user to extend the verb map, so you can add those custom commands without having to change the source of the lib. I planned to add that at some point, and should be fairly straightforward, so let me take a look at it and get back at you.

In the meantime, if you have some sort of list of actions you'd like to see supported out of the box, do send them, I can add them right away and publish a new version of the lib.

from advenjure.

facundoolano avatar facundoolano commented on July 22, 2024

About the other feature (interactive objects), it sounds interesting but would require a bit more effort to implement. I'm currently working on other open source projects so I'm not sure when I'll be able to start adding features to this one again.

Although if I see there's people using this lib actively I'll definitely switch back to it as soon as I can.

from advenjure.

facundoolano avatar facundoolano commented on July 22, 2024

Ok @katafrakt @CharlesHD the custom commands was a simple enough change. I've published a new advenjure version to clojars, now you can pass a custom verb map to game/run, with your own verb definitions.

In the example game you can see the verb definitions and how to react with custom code through post conditions.

If you dig a bit on the source code of this repo, you can also see how to make fully functional verbs so you are not forced to put the custom logic in the pre/post conditions.

Closing this one, open a new issue if you have any other feature request.

from advenjure.

CharlesHD avatar CharlesHD commented on July 22, 2024

Cool ! I'm not going to use your library right now, but it's marked as a really promising one for a future project.
Thanks for being that reactive !

from advenjure.

katafrakt avatar katafrakt commented on July 22, 2024

Agreed. Thank you a lot! I will try that out.

from advenjure.

facundoolano avatar facundoolano commented on July 22, 2024

Hey @katafrakt and @CharlesHD I've been doing more development on this project and finally added the user input feature you requested.

There's a prompt-value function to do it, you can see it used here.

from advenjure.

katafrakt avatar katafrakt commented on July 22, 2024

Thats just awesome! Thanks @facundoolano!

from advenjure.

CharlesHD avatar CharlesHD commented on July 22, 2024

Yeehee !

from advenjure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.