<@UCPE53KPW> take a look at this example. I'm pos...
# tornadofx
c
@Stefan Beyer take a look at this example. I'm posting an EventBus event back to the UI. It MUST be run on the UI thread which is the runLater() line
s
nice, this helps already 🙂 i will try to keep the "business logic" and the gui part separate though, since the application should also work without the gui. but for that i should be able to just replace the actual file watcher stuff in the
runAsync
block with reading from a coroutine channel that the core app will write into. trying this now 🙂
i think my main problem is that i want an optional GUI layer but this system is not meant for that. so if i get a frankensteinian monster at the end, it is me that is to blame 😄
r
If something is meant to run 24/7 uninterrupted don't put a desktop app in it
You could as actually use fxlauncher and have the backend distribute the frontend
s
these apps are not meant to run independent of the user, but they usually dont need user interaction. here are some examples of what apps i have that could make use of some dashboard gui: • an app that makes a backup of savegame files while the game is running to prevent loss of progress in case the game crashes while writing the savegame (i am currently writing this one for sekiro : shadows die twice ^^) • a ping stats tool that continually pings 8.8.8.8 and gives me stats for my connection over time • a game framework that is used in coding competitions. every participant codes a bot and these bots play against each other in a game simulation. these all are started by the user, but then run with little to no user input until the user decides to close the app 🙂
r
I actually do something like that in keepassfx (I know still not released) it mimizes into the tray
The last example you give sounds like robocode
s
yes its similar 🙂 the company i work for regularly hosts coding contests. for that i wrote a framework ("arena framework") that does all the "game engine" stuff without being tailored to a specific game. with that i can churn out many different games, each of them becoming a library where the actual participants then code their bot against ^^
with all the smaller projects i make i want to learn how to integrate as much as possible of the gui part into the arena framework, my goal would be that when i make a new contest game, i only need to write how the particular game state is rendered and the rest (state management, window, ect.) is handled by the framework