Re:Show HN: Kandria, an action RPG made in Common Lisp is no...
by Shinmera on Wednesday January 11, 2023 @11:19AM
(#34340131)
I had to do a little bit to avoid insane amounts of consing, but honestly not a lot. And the optimisations I just did after the fact, gradually.
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.
Re:Show HN: Kandria, an action RPG made in Common Lisp is no...
by agentultra on Wednesday January 11, 2023 @11:25AM
(#34340221)
Nice! Thanks for sharing!
Re:Show HN: Kandria, an action RPG made in Common Lisp is no...
by Shinmera on Wednesday January 11, 2023 @12:40PM
(#34341482)
Hmmm. I might have to take another look at optimisation for the deck, then.
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.
Re:Show HN: Kandria, an action RPG made in Common Lisp is no...
by int_19h on Wednesday January 11, 2023 @06:47PM
(#34346802)
I always wondered if CLOS multimethods would be particularly useful in gamedev - it feels like it would be most natural to model arbitrary and unpredictable interactions between many different entities. How common is multiple dispatch in practice in your codebase?
Re:Show HN: Kandria, an action RPG made in Common Lisp is no...
by Shinmera on Thursday January 12, 2023 @02:52AM
(#34350452)
Very common.
Re:Show HN: Kandria, an action RPG made in Common Lisp is no...
by trenchgun on Wednesday January 11, 2023 @01:27PM
(#34342333)
What was the Haskell game if you dont mind me asking?
Re:Show HN: Kandria, an action RPG made in Common Lisp is no...
by agentultra on Wednesday January 11, 2023 @02:11PM
(#34343030)
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?