Hurray! Another multiplayer clone project. :)

Discuss and distribute tools and methods for modding. Moderator - Grognak
jrb00001
Posts: 201
Joined: Fri Jan 15, 2016 2:22 pm

Re: Hurray! Another multiplayer clone project. :)

Postby jrb00001 » Tue Apr 26, 2016 3:24 pm

Srul wrote:Launcher doesn't seem like it's working...
Image

Did you kill the launcher while it was starting? Did you delete some files / directories in the temp/tachyonuniverse directory? I can not see any other reason for this exception.

The launcher now deletes and downloads the repo again instead of throwing that exception. Does it work?
User avatar
Srul
Posts: 209
Joined: Wed Feb 17, 2016 7:32 pm

Re: Hurray! Another multiplayer clone project. :)

Postby Srul » Tue Apr 26, 2016 3:48 pm

jrb00001 wrote:Did you kill the launcher while it was starting? Did you delete some files / directories in the temp/tachyonuniverse directory? I can not see any other reason for this exception.

The launcher now deletes and downloads the repo again instead of throwing that exception. Does it work?

I deleted Temp folder and it started working.
And i don't terminate the process while it's starting nor delete any files (except for this time)
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Postby kcd.Spektor » Tue Apr 26, 2016 4:53 pm

Srul wrote:
jrb00001 wrote:Did you kill the launcher while it was starting? Did you delete some files / directories in the temp/tachyonuniverse directory? I can not see any other reason for this exception.

The launcher now deletes and downloads the repo again instead of throwing that exception. Does it work?

I deleted Temp folder and it started working.
And i don't terminate the process while it's starting nor delete any files (except for this time)

That's one of the reasons I asked for the launcher to download the data to the same folder or somewhear near.
Also I personally hate it when some application downloads something somewhere without me knowing about it and being unable to find the downloaded files to see/check them.
jrb00001
Posts: 201
Joined: Fri Jan 15, 2016 2:22 pm

Re: Hurray! Another multiplayer clone project. :)

Postby jrb00001 » Tue Apr 26, 2016 5:41 pm

kcd.Spektor wrote:
Srul wrote:
jrb00001 wrote:Did you kill the launcher while it was starting? Did you delete some files / directories in the temp/tachyonuniverse directory? I can not see any other reason for this exception.

The launcher now deletes and downloads the repo again instead of throwing that exception. Does it work?

I deleted Temp folder and it started working.
And i don't terminate the process while it's starting nor delete any files (except for this time)

That's one of the reasons I asked for the launcher to download the data to the same folder or somewhear near.
Also I personally hate it when some application downloads something somewhere without me knowing about it and being unable to find the downloaded files to see/check them.

The "same folder" is dependent on the web start implementation. With the Oracle implementation, it is somewhere in the temp directory. There is no way to get that directory in an implementation independent way.

I might add a settings dialog to choose that directory and change the sound volume. But I do not know how to warn the players that they should not edit anything in this directory. All modifications are automatically rolled back on each launch. I do not want anybody complain because he has lost hours of work.
jrb00001
Posts: 201
Joined: Fri Jan 15, 2016 2:22 pm

Re: Hurray! Another multiplayer clone project. :)

Postby jrb00001 » Tue Apr 26, 2016 6:56 pm

jrb00001 wrote:
kcd.Spektor wrote:That's one of the reasons I asked for the launcher to download the data to the same folder or somewhear near.
Also I personally hate it when some application downloads something somewhere without me knowing about it and being unable to find the downloaded files to see/check them.

The "same folder" is dependent on the web start implementation. With the Oracle implementation, it is somewhere in the temp directory. There is no way to get that directory in an implementation independent way.

I might add a settings dialog to choose that directory and change the sound volume. But I do not know how to warn the players that they should not edit anything in this directory. All modifications are automatically rolled back on each launch. I do not want anybody complain because he has lost hours of work.

I added that dialog. You can choose the base directory and change all settings of tachyon. If you want to know where the settings are saved, read that: http://stackoverflow.com/questions/1320709/preference-api-storage.
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Postby kcd.Spektor » Tue Apr 26, 2016 7:17 pm

jrb00001 wrote:I added that dialog. You can choose the base directory and change all settings of tachyon. If you want to know where the settings are saved, read that: http://stackoverflow.com/questions/1320709/preference-api-storage.


Why can't the launcher just download the missing images and run the clinet.jar/exe?
jrb00001
Posts: 201
Joined: Fri Jan 15, 2016 2:22 pm

Re: Hurray! Another multiplayer clone project. :)

Postby jrb00001 » Tue Apr 26, 2016 7:21 pm

kcd.Spektor wrote:
jrb00001 wrote:I added that dialog. You can choose the base directory and change all settings of tachyon. If you want to know where the settings are saved, read that: http://stackoverflow.com/questions/1320709/preference-api-storage.


Why can't the launcher just download the missing images and run the clinet.jar/exe?

That is exactly what it does?!?
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Postby kcd.Spektor » Tue Apr 26, 2016 8:05 pm

jrb00001 wrote:
kcd.Spektor wrote:
jrb00001 wrote:I added that dialog. You can choose the base directory and change all settings of tachyon. If you want to know where the settings are saved, read that: http://stackoverflow.com/questions/1320709/preference-api-storage.


Why can't the launcher just download the missing images and run the clinet.jar/exe?

That is exactly what it does?!?

No, currently launcher clears all your settings, asks you to input your settings again, downloads the whole client(+some server files for some reason), to some folder, launches the client application, clicks 2 buttons.
(perhaps something else?)

What I mean is a launcher app that is just another jar/exe.
Which you just put in the same folder as the client jar/exe.
And when you run the launcher it just changes the server ip in the GameData.dat file to the needed one.
Checks if inside the data folder all ship images, shield images, ship icons are present, if not - download them from the server.
And then just run the client jar/exe.

In my opinion launcher is just a helper application.
It shouldn't delete your game folder and redownload the game every time when you run it.
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Postby kcd.Spektor » Tue Apr 26, 2016 8:15 pm

Small update:

1. I've more or less defined for my self what will be the new MMO scenario.

2. I've finished selecting/preparing the ship images.

3. Now I'm generating the new GenShips for the world generator and for the events.

4. After that I will be creating a bunch of event files for random encounters.

5. Then I will test this whole thing so that there are no bugs.

6. Then there 100% will be something that I have forgotten right now :)

7. And then the 0.4 will be out. :mrgreen:

This are some details of the last point in the TODO list :)
There is actually more in there, but it's more technical and too long to describe :P

All in all, everything is looking good. :D
jrb00001
Posts: 201
Joined: Fri Jan 15, 2016 2:22 pm

Re: Hurray! Another multiplayer clone project. :)

Postby jrb00001 » Wed Apr 27, 2016 4:32 pm

kcd.Spektor wrote:No, currently launcher clears all your settings, asks you to input your settings again, downloads the whole client(+some server files for some reason), to some folder, launches the client application, clicks 2 buttons.
(perhaps something else?)

What I mean is a launcher app that is just another jar/exe.
Which you just put in the same folder as the client jar/exe.
And when you run the launcher it just changes the server ip in the GameData.dat file to the needed one.
Checks if inside the data folder all ship images, shield images, ship icons are present, if not - download them from the server.
And then just run the client jar/exe.

In my opinion launcher is just a helper application.
It shouldn't delete your game folder and redownload the game every time when you run it.

It does exactly that:
  • Show the settings dialog
  • Backup the database
  • Download the repository if there is no local repo or it is damaged
  • Download and apply the changes if there is already a local repo
  • Restore the database
  • Download the client.jar / server.jar if there is no local copy
  • Verify the client.jar / server.jar
  • Write the Data/GameData.dat
  • Write the launcher.jnlp that can be used to connect to the server
  • Download itself because there is no way to get the current jar
  • Verify the launcher.jar
  • Start a new process
  • Show the security warning dialog
  • Detect the tachyon version and handle the launch (click through the menus / just launch your main class depending on the version)

As you can see, there is no unnecessary download except the download of itself. But there is no way to avoid that.

The launcher is used to launch the server and the client. That is why a few files are duplicated. It would be great if you could merge the client and the server directory somehow. It is also the reason why the client reverts to the same version as the server even if there is a newer version available. It might be unnecessary but it helps to avoid problems.