[WIP] sponge-clj

Yeah, this is the Clojure DSL for Sponge and something else…

What it already can:

  • Call any Java method and full power of Sponge (because it’s Clojure and it can do it out of box!)
  • Define custom items with custom actions on it (now it can only handle “item use”, but more will be in future)
  • Define custom mobs with flexible stats and droplist that will be finnaly defined on mob spawn (or not)
  • Naturally spawn your awesome custom mobs with flexible conditions!
  • Define your own triggers! Actually it is like event handling, but with some extra params to make them easier to use for newbies (i hope)
  • It has built in key-value storage to store any of your custom data (file-base now, will be migrated to LevelDB)
  • Of course there are some implemented functions that ease your interaction with sponge (you don’t need to call Java directly

What i plan to do:

  • Custom skills for mobs
  • Custom actions for items
  • DSL for defining new commands
  • LOTS of docs and examples
  • Add more and more Sponge calls
  • And something else to make it awesome :slight_smile:

Why Clojure but not JavaScript/YAML/Groovy/yourownlanguage?
Because I can!

But if you want long answer:

  • Clojure provides awesome Java interoperability and awesome runtime perfomance (close to Java)
  • It is good to define DSL’s, if you look for examples for my plugin, you will find that simple examples as nearly simple as you will define then in YAML, but you still have ability to define VERY complex solutions with it
  • It is very interesting and functional :slight_smile:

So, for now it is VERY raw, but you already can look for example

And here is the source code

2 Likes

Gotta say. When I think ‘newbie scripting language’, LISP is not the first thing that jumps to mind.

This post gets the fox seal of approval.

I’ll add reasons and commentary when I get back home.