Fork me on GitHub
#clojure-gamedev
<
2022-01-28
>
mister_m20:01:16

Hi - sort of a very open ended question, but I am interested in trying to make a tetris clone in clojure but I am not sure where to start in terms of graphics or "game" libraries. I've never made one before. Should I find a wrapper for something like the LWJGL or is there a particular game lib or engine you'd recommend to get started with? Thanks.

phronmophobic20:01:57

It depends on your goals. • Are you targeting specific platforms? • Are you more interested in learning or having a product you can deploy somewhere?

Joshua Suskalo20:01:59

So if you want to just make a game in clojure and you don't care about what's sitting underneath, there's the arcadia project https://github.com/arcadia-unity/ArcadiaGodot This has a full game engine, godot, and allows you to use clojure code to implement game logic, but you're still bound by the structure the game engine imposes. There's quil which is good for 2d stuff on both the web and native, but it's 2d only https://github.com/quil/quil There's also play-cljc which provides lower-level OpenGL and WebGL stuff, but it's still pretty high-level compared to using LWJGL because you don't need to do any memory management. https://github.com/oakes/play-cljc Then if you want more stuff than these but less than a full game engine you could use LibGDX, which is a java library that provides all the pieces you need for a game engine to build yourself, but without imposing a particular structure (besides the least common denominator between windowing systems and android) https://libgdx.com/ If you want to write games from scratch with as much control as possible, you can go for LWJGL which gives you everything you need to build a game engine from the ground up, but at a much lower level than LibGDX. https://www.lwjgl.org/ And separate from basically all of these, and potentially useful to you, is my library, cljsl, which can allow you to write Clojure-ish code that compiles to GLSL with dependency management. https://github.com/IGJoshua/cljsl

mister_m20:01:48

This is very helpful, thank you.

mister_m20:01:17

I am just targeting my local linux desktop I guess. I have no plans to deploy anything

phronmophobic20:01:02

Are you more familiar with cljs or clj?

mister_m20:01:38

I am only familiar with clj