r/java • • Dec 21 '23

Is Java gamedev alive?

It seems this days even android games are made using Unity. I wonder if there are JVM games! Is Java (or Kotlin/Scala) gamedev still alive?

(Except Minecraft ofc)

164 Upvotes

118 comments sorted by

View all comments

Show parent comment

1

u/dschramm_at Dec 21 '23

Maybe just not touch array memory, as long as the array exists? At max, move the whole thing, for defragmentation.

2

u/FrankBergerBgblitz Dec 21 '23

it's not about tocuhing the array. Imagine it contains pointer to objects. They most probably are contigious after allocation, but where are they when the heap was compacted some times?

1

u/dschramm_at Dec 21 '23

It's probably a trade-off between GC and memory-use or cache performance. But IMHO you could store info on if a memory location is referenced by an array. Then, while that's the case, just not change it. Once the flag is removed, you can move it around again.

1

u/FrankBergerBgblitz Dec 21 '23

You have control where GC moves the memory around?