Improbable Icon

Jmonkey integration

general

#1

I’m trying to integrate with a java game engine called JMonkey. For the life of me I’m having problems just getting a worker to start up on my local launch. Looking in the logs I don’t see any errors, do I need to do some trick to get an initial worker deployed/active?

[improbable.worker.assembly.WorkerAssemblyProviderFactory] Loaded worker assemblies for these workers types: terrain.

Shows up on startup… so I know spatialos knows about my worker…


#3

I didn’t use a good title on this topic…:frowning: I haven’t even gotten to the jmonkey business part of things yet. I’ve got a simple worker who just prints hello world and touches a file in a well known directory so I can see if he started up.

If I launch it manually via a java -jar workers.jar . It starts up. I have a “managed” section in my worker json file…I’ve played with artifact_name… using workers.zip and workers@Mac.zip … but since I don’t see any errors in a log… I don’t think its even trying to start it…

"managed": {
"macos": {
  "artifact_name":"workers.zip",
  "command": "java",
  "arguments": [
    "-jar",
    "./workers.jar",
    "${IMPROBABLE_RECEPTIONIST_IP}",
    "${IMPROBABLE_RECEPTIONIST_PORT}",
    "${IMPROBABLE_API_URL}",
    "${IMPROBABLE_WORKER_ID}",
    "${IMPROBABLE_LOG_FILE}"
  ]
}

}
}


#4
"workers": [
{
  "worker_type": "terrain",
  "load_balancing": {
    "auto_hex_grid": {
      "num_workers": 20
    }
  },


#5

Hello @6418849159184384,

Welcome to the SpatialOS forums! I hope that you will find all the necessary community support and discussions that you will want for your development.

In order for a managed worker to start there needs to be at least one entity with a component that your worker needs to manage. If there is no such entity the SpatialOS runtime does not start a worker.

This entity should be part of your initial snapshot that you can create with the JavaSDK.

Hope this helps!
Duco


#6

oo… thanks for that… off to try it out!