Reactive Game Programming

Hey everyone, I recently watched this talk:

about the new reactive programming features of Java 8 and was thinking, how can I implement this in my game programming to maybe get some performance gains or at least to help with backend server design.

The tldr; version of the talk is that Java 8 provides you with a class called CompletableFuture, which are like normal futures that do something when they’re completed; it’s designed so that you can chain them and write non-blocking async code.

Currently I’m focused on the backend design for this (trying to write some code to bring in CompletableFutures for Spidermonkey code), but I’d like to hear your guys’ ideas about this; is it useful in game programming? How would you use it?

Cheers!

4 Likes

Nice talk :slight_smile:

I might use CompletableFuture instead of callback mechanism in some of my RMI services.
I think the lecturer was not so much into using callback mechanism that called it the hell of callback :wink:

I liked how easily this API can handle nested future calls for us with all the threading stuffs in the background.