Mythruna

General Category => Tech Support => Topic started by: KevinT on April 06, 2012, 04:19:38 PM



Title: Auto Start option for server program?
Post by: KevinT on April 06, 2012, 04:19:38 PM
Is there a way to have the server program start without having to click on the GUI interface?
I'm wanting to run a dedicated server, but without having to enter GUI each time to start it.
A command line version would be great!


Title: Re: Auto Start option for server program?
Post by: pspeed on April 06, 2012, 04:39:10 PM
Is there a way to have the server program start without having to click on the GUI interface?
I'm wanting to run a dedicated server, but without having to enter GUI each time to start it.
A command line version would be great!

You are supposed to be able to run the server from the command line by passing the -nogui argument.  It's only supposed to pop up the settings window if there is no existing database.

I just tried it and it seems to be broken.  I'll try to fix it for the next release.

Sorry.


Title: Re: Auto Start option for server program?
Post by: KevinT on April 08, 2012, 04:06:08 PM
Wow that is great thanks!
Are there any other specific command line variables to use that can configure parts of the server(IP, Port)?


Title: Re: Auto Start option for server program?
Post by: pspeed on April 08, 2012, 04:18:50 PM
Wow that is great thanks!
Are there any other specific command line variables to use that can configure parts of the server(IP, Port)?


Nah, all of those options are configured through the GUI the first time and then reused on subsequent runs.  I tried to keep the command line relatively simple.  The only other option is -db for setting a different DB directory other than mythruna.db

It's also possible to change the port and stuff in the server's config file.  After the first time you run and saves settings, there is a mythruna.db/world-info.json with the configuration in it.  This is what the server loads at start up... even the GUI version.


Title: Re: Auto Start option for server program?
Post by: KevinT on April 08, 2012, 06:26:31 PM
Very cool! I did not notice that.  That is pretty much it.
Is it possible to have it bind to a certain IP, instead of 0.0.0.0 / All ?


Title: Re: Auto Start option for server program?
Post by: pspeed on April 08, 2012, 08:08:31 PM
Very cool! I did not notice that.  That is pretty much it.
Is it possible to have it bind to a certain IP, instead of 0.0.0.0 / All ?

Not currently.  Is that a huge problem?


Title: Re: Auto Start option for server program?
Post by: KevinT on April 08, 2012, 10:25:46 PM
Nothing major since the port can be set.
A low priority future feature perhaps :) especially having them statically set via the command linein case the json files get complex later on.


Title: Re: Auto Start option for server program?
Post by: pspeed on April 10, 2012, 12:45:07 AM
Just a heads up, the -nogui option will definitely be fixed in the next release (hopefully Monday) since I just fixed it and committed it to my source tree. :)


Title: Re: Auto Start option for server program?
Post by: KevinT on April 16, 2012, 08:14:53 PM
Thanks :D
I'll be ready to test it out.


Title: Re: Auto Start option for server program?
Post by: KevinT on April 25, 2012, 12:06:37 AM
When using -nogui I get this:

Uncaught exception from thread:Thread[LWJGL Renderer Thread,5,main]
org.lwjgl.LWJGLException: Pixel format not accelerated
   at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
   at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
   at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:210)
   at org.lwjgl.opengl.Display.createWindow(Display.java:306)
   at org.lwjgl.opengl.Display.create(Display.java:873)
   at org.lwjgl.opengl.Display.create(Display.java:782)
   at com.jme3.system.lwjgl.LwjglDisplay.createContext(LwjglDisplay.java:137)
   at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:113)
   at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)
   at java.lang.Thread.run(Unknown Source)
Application was not initialized.


Title: Re: Auto Start option for server program?
Post by: pspeed on April 25, 2012, 12:29:55 AM
When using -nogui I get this:

Uncaught exception from thread:Thread[LWJGL Renderer Thread,5,main]
org.lwjgl.LWJGLException: Pixel format not accelerated
   at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
   at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
   at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:210)
   at org.lwjgl.opengl.Display.createWindow(Display.java:306)
   at org.lwjgl.opengl.Display.create(Display.java:873)
   at org.lwjgl.opengl.Display.create(Display.java:782)
   at com.jme3.system.lwjgl.LwjglDisplay.createContext(LwjglDisplay.java:137)
   at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:113)
   at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)
   at java.lang.Thread.run(Unknown Source)
Application was not initialized.


You are running the client and not the stand-alone server.

The stand-alone server doesn't do any openGL stuff at all.


Title: Re: Auto Start option for server program?
Post by: KevinT on April 25, 2012, 09:46:18 AM
Sorry about that, on my monitor the downloads section cuts off right above the server area.
Works great!

In the future, having the ability to set the IP, Port and world name to use via command line or config file would be useful.
Also, a way to auto generate a world without having to load the GUI first (though that is a very minor thing, since clients can just upload the .db I assume from a local instance).


Title: Re: Auto Start option for server program?
Post by: pspeed on April 25, 2012, 10:08:56 AM
Sorry about that, on my monitor the downloads section cuts off right above the server area.
Works great!

In the future, having the ability to set the IP, Port and world name to use via command line or config file would be useful.
Also, a way to auto generate a world without having to load the GUI first (though that is a very minor thing, since clients can just upload the .db I assume from a local instance).


Yeah, and even in the server version you only have to run the gui once to configure the port and stuff... then you can do -nogui from that point on.