Fork me on GitHub
#clojure-gamedev
<
2016-07-03
>
rorydouglas15:07:06

anyone here using play-clj?

rorydouglas15:07:24

i’m adapting an example app that uses brute and play-clj (https://github.com/markmandel/brute-play-pong)

rorydouglas15:07:40

i noticed that if i upgraded the dependencies, some reflective calls fail

rorydouglas15:07:54

the existing app uses Clojure 1.6 and old versions of play-clj & libgdx

rorydouglas15:07:15

upgrading to Clojure 1.8 & latest play-clj and libgdx results in some interop calls failing

rorydouglas15:07:21

unless I type-hint everything

rorydouglas15:07:34

just trying to figure out if it’s a Clojure 1.8 change or somethign

markmandel15:07:45

Is it a play-clj problem, or a brute problem?

rorydouglas15:07:56

hey the man himself

rorydouglas15:07:01

no i highly doubt it’s a brute problem

rorydouglas15:07:10

it’s a (.draw font… etc call on BitmapFont

rorydouglas15:07:18

works fine in your example, fails after updating the deps

markmandel15:07:19

There isn't much to brute really 😃

rorydouglas15:07:43

i can make it work, but i have to type-hint everything and make the ints explicit floats

markmandel15:07:00

Send be a PR with updated deps if you get it working

rorydouglas15:07:00

not sure if it’s because there are more overloads of that method in libgdx 1.9.3 than there were in 1.0.0

markmandel15:07:22

Quite possible

markmandel15:07:35

Play-clj wrappers may take care of the type conversion

rorydouglas15:07:20

yeah i tried that there’s a (bitmap-font! font :draw ) form you can use

rorydouglas15:07:28

but internally it only type-hints the font

rorydouglas15:07:34

so call still fails

rorydouglas15:07:08

i should probably check if it’s just specific to BitmapFont and it’s many draw() overloads

markmandel15:07:25

That seems very likely

rorydouglas15:07:49

yeah, you’re also using ShapeRenderer.rect() that has 5 overloads, and that’s not breaking even though it has no type-hints

markmandel15:07:31

From memory, that had different argument counts?

markmandel15:07:57

I wrote the code a while ago 😋

rorydouglas15:07:07

yeah i think the arg counts are all different

rorydouglas15:07:23

so maybe it’s the duplicate arities with different types that’s the issue

rorydouglas15:07:38

for BitmapFont

rorydouglas15:07:14

it has 2 4-arity draw() methods, differing only in the type of the 2nd arg

rorydouglas15:07:18

let me try just hint that

rorydouglas15:07:20

have to type hint everything else it fails

rorydouglas15:07:44

even, weirdly, the BitmapFont arg itself, which is explicitly type-hinted inside the (bitmap-font!) macro