This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-09
Channels
- # aleph (1)
- # announcements (7)
- # asami (1)
- # beginners (44)
- # calva (54)
- # cherry (24)
- # cider (6)
- # clj-kondo (19)
- # cljsrn (27)
- # clojure (119)
- # clojure-europe (61)
- # clojure-gamedev (38)
- # clojure-germany (7)
- # clojure-nl (1)
- # clojure-norway (104)
- # clojure-portugal (4)
- # clojure-spec (4)
- # clojure-uk (1)
- # clojurescript (38)
- # cursive (18)
- # datomic (11)
- # emacs (9)
- # events (1)
- # fulcro (4)
- # holy-lambda (7)
- # introduce-yourself (7)
- # jobs (1)
- # malli (6)
- # off-topic (4)
- # pathom (4)
- # pedestal (16)
- # podcasts-discuss (1)
- # polylith (27)
- # portal (17)
- # releases (2)
- # shadow-cljs (46)
- # squint (1)
- # xtdb (9)
Looks pretty cool! Any plans to write up some documentation?
Link to libgdx, http://libgdx.badlogicgames.com/, is broken. Looks like maybe it should be to https://libgdx.com/ instead?
What kind of documentation would you suggest ? Function docs, a wiki page and more demos ? Maybe demo code would be self explaining
Well, when i open the code directly, core.clj has multiple TODOs, commented out code, empty functions. And there are both engines and test files with trailing underscores. The whole thing feels in progress. So any sort of example or demonstration would be nice.
@U0ALH6R89 tried to start it up as on the README and got this
Compiling 4 source files to /Users/raymcdermott/dev/engine/target/classes
engine.repl
Started nrepl server on port 7888.
Execution error (IllegalStateException) at org.lwjgl.glfw.EventLoop/<clinit> (EventLoop.java:30).
GLFW may only be used on the main thread and that thread must be the first thread in the process. Please run the JVM with -XstartOnFirstThread. This check may be disabled with Configuration.GLFW_CHECK_THREAD0.
Full report at:
/var/folders/gy/0hq5_8w14p1c3js2xp_56nch0000gn/T/clojure-7944764583082658076.edn
➜ engine git:(main) java --version
openjdk 17.0.7 2023-04-18
OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7)
OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (build 17.0.7+7, mixed mode)
➜ engine git:(main) uname -a
Darwin Rays-MacBook-Air.local 22.5.0 Darwin Kernel Version 22.5.0: Mon Apr 24 20:53:44 PDT 2023; root:xnu-8796.121.2~5/RELEASE_ARM64_T8103 arm64
It's required for libgdx to run on Mac. Oh and don't use the latest commit 'WIP'. I hacked some stuff together last days
Ok. Will let you know how it goes. Thanks for responding so quickly. Very eager to learn about your project!
commit ec3fd98d85fe416c1d0b6a8715d44769de51d9d1
Author: Michael Sappler <[email protected]>
Date: Fri Jun 16 19:04:06 2023 +0545
A bunch of changes
* Added raycaster
* Improved image performance
* Move camera-position out of render-map
* Remove special tiled map generation code out of the engine
But it fails with a different error
lein run -m engine.repl
engine.repl
Started nrepl server on port 7888.
Starting Lwjgl3Application
Execution error (ArityException) at engine.input-test/render* (input_test.clj:15).
Wrong number of args (7) passed to: engine.graphics/render-readable-text
Full report at:
/var/folders/gy/0hq5_8w14p1c3js2xp_56nch0000gn/T/clojure-18265034290915869168.edn
I guess I'm at the wrong commit. Could tell me which commit to be at or make a tag for the "working" version.
Maybe I should get to the point though: I want to make pong. Will it be simple with this engine?
There are two coordinate systems, the GUI and world. Here i call two functions to render in the respective coordinate systems: https://github.com/damn/engine/blob/77658650490ce59ca5402e5750525f5c343cd6e4/test/engine/simple_test.clj#L93
The point of this is because I am making an rpg game on top of this , so i can work directly with world coordinates/zoom/etc.
Yeah for pong just don't use the map/world coordinate system, you can render everything in gui
I wanted to write some tutorial or explanation for the engine but didn't have time yet. Because there is really nothing for games in clojure yet
The main thing you have to know is the Game screen protocol: https://github.com/damn/engine/blob/main/src/engine/core.clj#L36
@U080181PF made a talk in 2014 to suggest gamedev was important but it seems to have fizzled
Also I am just using a minimal thin layer of clojure on top of the libgdx classes/methods i required for my game, so if you want to dive deeper check out more of libgdx. But this should theoretically work fine for 2d games
There is, called play-clj. But it is more like a wrapper implementing all or trying to implement all Java code. With my library i tried to keep it focuses on 2d games and very minimal and simple, you shouldn't need to know too much libgdx stuff.
Probably should write some nice documentation and examples for the library, maybe pong 😉
Ha - maintained still by @U080181PF :man-facepalming::skin-tone-2:
You should be able to close the window and the. The dev-loop namespace calls refresh all on your code, loading all changed files without restarting the jvm