clojure-gamedev

rorydouglas 2016-07-03T15:09:06.000014Z

anyone here using play-clj?

rorydouglas 2016-07-03T15:09:24.000015Z

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

rorydouglas 2016-07-03T15:09:40.000017Z

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

rorydouglas 2016-07-03T15:09:54.000018Z

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

rorydouglas 2016-07-03T15:10:15.000019Z

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

rorydouglas 2016-07-03T15:10:21.000020Z

unless I type-hint everything

rorydouglas 2016-07-03T15:10:34.000021Z

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

markmandel 2016-07-03T15:10:45.000022Z

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

rorydouglas 2016-07-03T15:10:56.000023Z

hey the man himself

rorydouglas 2016-07-03T15:11:01.000024Z

no i highly doubt it’s a brute problem

rorydouglas 2016-07-03T15:11:10.000025Z

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

rorydouglas 2016-07-03T15:11:18.000026Z

works fine in your example, fails after updating the deps

markmandel 2016-07-03T15:11:19.000027Z

There isn't much to brute really 😃

rorydouglas 2016-07-03T15:11:43.000028Z

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

markmandel 2016-07-03T15:12:00.000029Z

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

rorydouglas 2016-07-03T15:12:00.000030Z

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

markmandel 2016-07-03T15:12:22.000032Z

Quite possible

markmandel 2016-07-03T15:16:35.000034Z

Play-clj wrappers may take care of the type conversion

rorydouglas 2016-07-03T15:17:20.000035Z

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

rorydouglas 2016-07-03T15:17:28.000036Z

but internally it only type-hints the font

rorydouglas 2016-07-03T15:17:34.000037Z

so call still fails

markmandel 2016-07-03T15:17:40.000038Z

😞

rorydouglas 2016-07-03T15:18:08.000039Z

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

markmandel 2016-07-03T15:19:25.000040Z

That seems very likely

rorydouglas 2016-07-03T15:22:49.000041Z

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

markmandel 2016-07-03T15:23:31.000042Z

From memory, that had different argument counts?

markmandel 2016-07-03T15:23:57.000043Z

I wrote the code a while ago 😋

rorydouglas 2016-07-03T15:25:07.000044Z

yeah i think the arg counts are all different

rorydouglas 2016-07-03T15:25:23.000045Z

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

rorydouglas 2016-07-03T15:25:38.000046Z

for BitmapFont

rorydouglas 2016-07-03T15:26:14.000047Z

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

rorydouglas 2016-07-03T15:26:18.000048Z

let me try just hint that

rorydouglas 2016-07-03T15:30:14.000049Z

nope

rorydouglas 2016-07-03T15:30:20.000050Z

have to type hint everything else it fails

rorydouglas 2016-07-03T15:30:44.000051Z

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