Show HN: Kandria, an action RPG made in Common Lisp, is now out (store.steampowered.com)
Kandria, an open world action RPG platformer written in Common Lisp is now out and available!
A prior discussion of Kandria can be found here: https://news.ycombinator.com/item?id=32043026.
I'm the lead developer and sole programmer for the project. Would be happy to answer any questions about it!
132 comments
[ 3.1 ms ] story [ 216 ms ] threadAlso thanks for the SteamDeck support!
You can find more info on the dev process here: https://reader.tymoon.eu/article/413 And the source code for the engine, Trial, and the game, Kandria, are both on our GitHub under Shirakumo.
You can run arbitrary lisp snippets to form conditions, branching, and effects in the game. This makes integration and extension very easy, and I don't have to constantly extend some special purpose scripting API to expose new bits.
The heavy use of CLOS is another good example, and of course the interactive development. Shaders, assets, etc can be reloaded while the game is running, not to mention all game behaviour.
Mac version isn't supported because I got tired of Apple constantly breaking things and making them way more difficult, while still having the worst documentation on the planet. I don't have it in me anymore to chase that.
But, if anyone else wants to fix things up, the engine and game are OSS.
So, I install sbcl, installed quicklisp and then used quicklisp to install your game after cloning and cc'ing into your directory. It looks like your game would work if you (or someone) looked into why your "Harmony" sound engine isn't working (line 28-29 in your package.lisp file). I attempted to load from your github/Harmony directory and this is the error -
* (ql:quickload '(harmony cl-mixed-coreaudio)) To load "harmony": Load 1 ASDF system: harmony ; Loading "harmony" ............. debugger invoked on a LOAD-FOREIGN-LIBRARY-ERROR in thread #<THREAD "main thread" RUNNING {7008640253}>: Unable to load any of the alternatives: ("libmixed2.dylib" "libmixed.dylib" "mac-arm64-libmixed.dylib")
I tested the other audio implementations suggested as well and they don't work either. Is there a way to play this game without sound? That might fix the problem. I don't know how much I'm willing to dig into this, because cl-mixed is it's own library and it looks like it would start to become a rabbit hole.
It looks cool though!
Looking at the Kickstarter right now:
"Stretch Goal 3: Modding Support
This goal includes three things in specific:
The game source code will be publicly available! ... The code will be released under a license that prohibits using it for any commercial activities, and requires you to share-alike any modifications you make. The release will also not include any assets, so you'll still need a copy of the official game to play it."
The license for the code is zlib now, but the assets remain closed. I think that is a fair trade.
https://github.com/Shirakumo/trial
[1] http://planet.lisp.org/
I've been following the progress since I've been learning Common Lisp here and there over the past year or so.
I'd love to see the source code. Assuming this is not OSS, I wonder what's a good example of a code base, ideally one that is hackable and could be used for educational purposes?
The code base isn't great for learning though, I'd say. Game development usually does not leave the time to architect things neatly, rewrite large chunks, or document stuff deeply.
Recently saw one in Haskell too. And there have been several in Javascript over the years.
Did you find you had to manually manage the GC? Did you take advantage of CLOS?
I use CLOS a lot for everything. The event system is literally just an array of handlers and a generic function called HANDLE that takes the event object and the handler object, for instance.
The source code for the engine, Trial, and the game, Kandria, are both on our GitHub under Shirakumo.
Update Bought a copy, definitely my jam. Played on the steam deck, noticed that the first time I used an action (move, jump, attack) there was a noticeable pause/stutter but has been smooth as butter afterwards.
PS: are you able to talk about the steam integration? I assume it's a C or C++ library of sorts and fairly straight-forward to extend; curious if you plan on releasing to another platform if it's possible to keep similar "achievments."
Also, kudos on the accessibility settings; changing damage and game speed, etc! Nice.
Sure. I use the cl-steamworks library I wrote. https://shinmera.github.io/cl-steamworks/ Their API frankly sucks and getting the integration going was a big pain. However, if all you want is the minimum, like achievos, you can omit all of that and just do a couple C calls.
The engine has abstracted support for achievements and such integrations, so it is possible to integrate with other platforms, too, should we ever release on GOG or EGS.
Did you generate an executable machine code image with it?
How are you drawing graphics with Lisp (SDL, DirectX, OpenGL, something else)?
Developing and shipping a full-fledged video game requires a lot of hard work and dedication. And writing a custom game engine and tool chain at the same time is really a heroic feat. Hats off to everyone, especially to Shinmera!
Object Oriented Shader Composition Using CLOS https://raw.githubusercontent.com/Shinmera/talks/master/els2...
Shader Pipeline and Effect Encapsulation using CLOS https://raw.githubusercontent.com/Shinmera/talks/master/els2...
...I just looked up where the macros are defined, this is fascinating:
> ;; This package was written by Dave Gillespie; it is a complete
> ;; rewrite of Cesar Quiroz's original cl.el package of December 1986.
Congrats to the Sandra team, sorry about the off topic.
I'm not sure what you mean by "that direction," but if it implies doing CL, writing emacs lisp won't get you there, even if it might give you a head start from cl-lib, eieio, and general lisp ideas.
That was an exclusive playstation title, probably the third biggest title in terms of sales on the playstation, and it was written in Lisp.
The game posted here appears to be written in Common Lisp from the engine up.
All of which makes Kandria even more refreshingly welcome.
(It's probably more interesting than all the "X, a clone of Y but in Rust" posts, at least.)
It's a bonus that it's written in something a bit more interesting than your average game.
"I wanted to create something bigger, and had just finished playing through Celeste"
Ah that explains it! Congrats on shipping on Steam!
Thanks!
Is it more like Knytt than Celeste ? I didn't Celeste.
There are accessibility options that let you toggle infinite dashes on and off at any time, which lets you bypass most of the challenges pretty easily should you get frustrated.
(I meant to write "didn't enjoy Celeste")
Will it be available for Linux, maybe on GOG?
Thanks!
You need a full copy of the game from Steam or somewhere else to hack the game. You can get the source code here: https://github.com/shirakumo/kandria and hack on it that way.
You can also just look at the asset files in the install folder and mess around with those. Nothing's encrypted.
I've been looking into making my own game using the Trial engine but I was a bit scared off by the warnings about API stability and lack of documentation. Now that Kandria is released, is the API stabilized? And I guess the Kandria source code can work as documentation on how to set things up..