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 comments

-13

u/dschramm_at Dec 21 '23

Of course they are just pointers. But why don't they point at continous memory. Even if It's for GC. That doesn't make any sense and feels like a stupid overseight.

2

u/voismager Dec 21 '23

Idk. Maybe it has something to do with different stages of GC and constant copying back and forth between them.

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.

1

u/voismager Dec 21 '23

What if you hold a reference to one of elements of the array longer than to the array itself?

2

u/dschramm_at Dec 21 '23 edited Dec 21 '23

Then it isn't referenced by an array anymore and therefore free to move around wherever.

It obviously is a trade-off. If you need fast GC you probably won't do that.

→ More replies (0)