clojure-gamedev

aaron-santos 2020-02-05T16:43:34.001200Z

Hi @zygon4 yes. I work on one as a hobby in Clojure.

zygon4 2020-02-05T18:07:18.001700Z

Fun! Do you use a specific framework or all custom? Is it open source?

zygon4 2020-02-05T18:23:36.002100Z

github is a small world, turns out

zygon4 2020-02-05T18:23:47.002400Z

you wrote a ton of code for this game

aaron-santos 2020-02-05T19:50:31.003500Z

Haha for sure! Some of the outputs have been a terminal emulator library for Clojure(zaffre), a REXPaint reader/writer(rockpick), and some color manipulation(tinter).

aaron-santos 2020-02-05T19:53:01.005500Z

I'm kind of in a weird position because I've been doing hobby solo Clojure development for years without any proper feedback system in place. So take the code with a big grain of salt. There are likely idiosyncracies that I'm not aware of.

☝️ 1
unbalanced 2020-02-06T12:35:52.019300Z

I feel ya!

aaron-santos 2020-02-05T19:57:13.007200Z

I'm interested in your plans. Are you starting on a new roguelike or chipping away at an existing project?

zygon4 2020-02-05T21:13:24.008300Z

I've written some RL code, all in Java. This would be a fresh project in Clojure. Part of the motivation is to rehash my Clojure chops, and part because I enjoy Clojure.

zygon4 2020-02-05T21:14:54.009400Z

Modelling the data isn't that bad, but the core game loop, keyboard input, threading models, which UI framework, etc. are still big questions.

zygon4 2020-02-05T21:15:17.009800Z

i could go back and use libGDX again with interop

zygon4 2020-02-05T21:15:30.010100Z

but i'd be just as interested in using something else

aaron-santos 2020-02-05T21:36:55.012100Z

I used LWJGL+glfw+stb_truetype+yoga and there is quite a bit of code which makes that happen. Kind of fun to write, but challenging to make performant.

aaron-santos 2020-02-05T21:38:22.013500Z

One of the better ideas was writing a little component+layout system based on yoga. If I squint hard enough it looks almost like writing regular React.

zygon4 2020-02-05T22:03:28.015100Z

my first RL was java+libGDX and it was an open world RL -fully open - and oh boy the performance is tricky.

zygon4 2020-02-05T22:05:53.015500Z

i was also trying for as much immutable data as possible, which sadly only goes so far

aaron-santos 2020-02-05T22:24:00.016600Z

Did you have an alloc-less render loop? That's something I'm struggling with right now. If it's something to even strive towards.

zygon4 2020-02-05T22:27:46.017Z

oh i doubt it

zygon4 2020-02-05T22:28:12.017500Z

the render loop was hard to clean up, there was a lot of copying initially

aaron-santos 2020-02-05T22:29:20.018100Z

Happen to have the code on github or elsewhere? I'd love to take a look.