Fork me on GitHub
#announcements
<
2023-06-21
>
genmeblog18:06:04

The King! There are not too many games written in Clojure. so I (re)wrote one. Originally I've created it for some fantasy console (pico-8 here) http://itch.io jam (links in readme). Game is simple but may be demanding. Call to play: clj -Sdeps '{:deps {io.github.Clojure2D/clojure2d-examples {:git/sha "de93d39e9ef43e269d14381f066c85de7207dab7"}}}' -X games.the-king.the-king/run-game Controls: z/x and arrows Source and more info: https://github.com/Clojure2D/clojure2d-examples/tree/master/src/games/the_king

👑 25
clojure-spin 12
❤️ 7
pez19:06:13

Exciting! However, I get this when trying it:

Cloning: 
Checking out:  at e7d3fa73bab1bc3e27dba30f2b5b7b40b5622ef1
Downloading: sicmutils/sicmutils/0.22.0/sicmutils-0.22.0.pom from clojars
...
Downloading: org/bytedeco/openblas/0.3.10-1.5.4/openblas-0.3.10-1.5.4-windows-x86.jar from central
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
src/games/the_king/font/pico-8-mono-reversed.ttf (No such file or directory)

genmeblog19:06:59

let me check it...

genmeblog19:06:10

Fonts moved to the resources, sha updated, should work on every platform (I hope) now.

jpmonettas19:06:17

great! works fine for me now!

👍 1
🚀 1
Lucas Teles21:06:13

Very nice, I played a bit using ClojureCLR and MonoGame https://github.com/lucasteles/monogame-clojure-hotreload/tree/flappy-bird, very nice experience

vemv06:06:18

Running the command failed for me with:

Syntax error (UnsupportedOperationException) compiling at (fastmath/kernel.clj:866:1).
Can't type hint a primitive local

genmeblog07:06:14

Thanks. Which version of Clojure? I'm chasing such hints.

genmeblog07:06:24

Also, can you verify fastmath version you have on classpath, please? kernel.clj is less than 800 loc

vemv07:06:37

it also can help to run Eastwood with :boxed-math and :performance linters enabled (they're disabled by default) in a CI matrix (different jvms, clojures). Since it essentially runs the Clojure compiler, you should get the very same errors. Here's a fresh example of all of that https://github.com/clojure-emacs/logjam/commit/b3e7d8943d98abd15c81c7371cbcac048a684c93

👍 4
genmeblog07:06:06

Great, I'll take a look at this tomorrow. Usually I compile everything but against current Clojure version. Tolerance for primitive hinting changed a couple of times as I observed.

genmeblog13:06:17

@U45T93RA6 there is a problem indeed (tricky one) with the Clojure 1.10.3, 1.11.1 works, so until I fix it play the game on the latest Clojure 🙂 And eastwood is really cool (I used it in the past but stopped for unknown reason)

vemv13:06:16

Yeah... probably I'm running an old clojure cli? But that shouldn't matter given this declaration https://github.com/Clojure2D/clojure2d-examples/blob/3f1564897d4cd62b232c94643555dfd068a39c31/deps.edn#L2 Eastwood often failed to run in a given project a few years ago. It's gotten an strengthening + misc features since

genmeblog14:06:20

Your setup replaces clojure2d-examples version. Local deps take the precedence.

zane21:06:44

This is great, @U1EP3BZ3Q! Nice work.

🙏 2