This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-11
Channels
- # announcements (15)
- # aws (11)
- # babashka (13)
- # babashka-sci-dev (2)
- # beginners (63)
- # calva (20)
- # cider (9)
- # clj-kondo (27)
- # clojars (3)
- # clojure (34)
- # clojure-art (4)
- # clojure-europe (21)
- # clojure-filipino (1)
- # clojure-indonesia (1)
- # clojure-my (1)
- # clojure-nl (11)
- # clojure-norway (10)
- # clojure-sg (1)
- # clojure-spec (4)
- # clojure-uk (4)
- # clojurescript (5)
- # cursive (8)
- # deps-new (2)
- # events (1)
- # exercism (2)
- # fulcro (44)
- # graphql (6)
- # gratitude (1)
- # introduce-yourself (1)
- # jobs (3)
- # leiningen (5)
- # lsp (26)
- # membrane (18)
- # missionary (9)
- # off-topic (1)
- # pedestal (5)
- # portal (1)
- # quil (24)
- # re-frame (17)
- # reagent (5)
- # remote-jobs (2)
- # reveal (3)
- # spacemacs (4)
- # tools-build (1)
- # tools-deps (12)
As posted in #announcements I've cut a first release of cljbox2d. This is a library I put a bunch of work in a bit over a year ago, but haven't really touched since then. The story is: my nephew wanted to make a game, so I started teaching him some Clojure and Quil, and started looking into how to add some more game-enginy capabilities to Quil. That's how cljbox2d came about. Then it turned out it had (for reasons) be a browser based game, so I made cljbox2d cljc compatible. In the end we ended up making a point-and-click adventure game, for which you really don't need any physics, and I went with Pixi.js instead, which became another wrapper libary (lambdaisland/puck). But I'm still really happy with cljbox2d, and the API is infintely nicer to deal with than the original (j)box2d.
Nice game :-). I dont speak the language unfortunately. Btw. It may be good to move items to the top so it doesnt block right movement when playing on small mobile screen.
@plexus this is great and works (using clojure2d
as a renderer, instead of quil
)! One minor request: is to possible to make Vec2
also Seqable (to be able to call seq
, first
, second
on it) not only Indexed
?
probably, see https://github.com/lambdaisland/jbox2d . I had to fork jbox2d in order to implement these clojure interfaces, and I don't remember how I did the deploy the clojars 🙈
But I can figure that out again, I guess I just used maven directly. PR welcome! see https://github.com/lambdaisland/jbox2d/commit/267c0ea5fe49c78e71735f5be57c34aecbc39c32
very cool that you got it working with clojure2D as well! if you have a sample (maybe a gist?) it would be great to link to in the README
ok, made it, source code is here: https://github.com/Clojure2D/clojure2d-examples/tree/master/src/box2d
if you want me to add something specific (about the licence, better description, etc.) please let me know. Source code includes a link to the original code.
This is great! Thanks a lot! How would you feel about contributing the box2d.common
code to cljbox2d?
Sure, why not! As I understand, dependency to clojure2d
should be as an alias in deps.edn
, right?