Hurray! Another multiplayer clone project. :)

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

Re: Hurray! Another multiplayer clone project. :)

Post by jrb00001 »

kcd.Spektor wrote:What do you mean "glitched" ships?
Glitched how?
You can see the hull and the systems but not the rooms.
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Post by kcd.Spektor »

jrb00001 wrote: You can see the hull and the systems but not the rooms.
Are there still some ships like this?
So I can have a look at them?
jrb00001
Posts: 201
Joined: Fri Jan 15, 2016 2:22 pm

Re: Hurray! Another multiplayer clone project. :)

Post by jrb00001 »

kcd.Spektor wrote:
jrb00001 wrote: You can see the hull and the systems but not the rooms.
Are there still some ships like this?
So I can have a look at them?
I tried to find one but I did not find any.

I found a server side bug which happens if a client connects and the server has some huge station:

Code: Select all

Exception in thread "Server" java.nio.BufferOverflowException
	at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
	at com.esotericsoftware.kryo.io.ByteBufferOutputStream.write(Unknown Source)
	at com.esotericsoftware.kryo.io.Output.flush(Unknown Source)
	at com.esotericsoftware.kryo.io.Output.require(Unknown Source)
	at com.esotericsoftware.kryo.io.Output.writeInt(Unknown Source)
	at com.esotericsoftware.kryo.util.DefaultClassResolver.writeClass(Unknown Source)
	at com.esotericsoftware.kryo.Kryo.writeClass(Unknown Source)
	at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Unknown Source)
	at com.esotericsoftware.kryonet.KryoSerialization.write(Unknown Source)
	at com.esotericsoftware.kryonet.TcpConnection.send(Unknown Source)
	at com.esotericsoftware.kryonet.Connection.sendTCP(Unknown Source)
	at com.esotericsoftware.kryonet.Server.update(Unknown Source)
	at com.esotericsoftware.kryonet.Server.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:745)
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Post by kcd.Spektor »

jrb00001 wrote: I found a server side bug which happens if a client connects and the server has some huge station:
Can you give me the database with this station, so I can check this?
jrb00001
Posts: 201
Joined: Fri Jan 15, 2016 2:22 pm

Re: Hurray! Another multiplayer clone project. :)

Post by jrb00001 »

kcd.Spektor wrote:
jrb00001 wrote: I found a server side bug which happens if a client connects and the server has some huge station:
Can you give me the database with this station, so I can check this?
The station is not in the database, it is just a model with a size of 80x80.
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Post by kcd.Spektor »

jrb00001 wrote: The station is not in the database, it is just a model with a size of 80x80.
Well then it's not much of a bug, but rather an overkill with the model :)
Perhaps there is sense in making a limit on the size of the ship model.
I could increase the network packet size, so it would fit the data of such a ship.
But this would cause a lot of problems in several diferent places.
So I think it would be best to just limit the ship sizes to, let's say - 20x20?
jrb00001
Posts: 201
Joined: Fri Jan 15, 2016 2:22 pm

Re: Hurray! Another multiplayer clone project. :)

Post by jrb00001 »

kcd.Spektor wrote:
jrb00001 wrote: The station is not in the database, it is just a model with a size of 80x80.
Well then it's not much of a bug, but rather an overkill with the model :)
Perhaps there is sense in making a limit on the size of the ship model.
I could increase the network packet size, so it would fit the data of such a ship.
But this would cause a lot of problems in several diferent places.
So I think it would be best to just limit the ship sizes to, let's say - 20x20?
20x20 should be big enough for ships but stations should be much bigger. As soon as you introduce npc wars, you need a way to defend important planets. My design should be able to win against a fleet with 20x10 burst 3 lasers.

The increase of the packet size should not have a big impact but it is a waste of memory. I see these two ways:
  • Pack that huge String in a bit field. That should reduce the size to 1/4.
  • Do not send the designs to the client. Everybody has all designs with the launcher and it is easy to distribute the designs in private games. That would also make the "Downloading server data..." phase faster.
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Post by kcd.Spektor »

jrb00001 wrote: 20x20 should be big enough for ships but stations should be much bigger. As soon as you introduce npc wars, you need a way to defend important planets. My design should be able to win against a fleet with 20x10 burst 3 lasers.
For that you should use more than 1 station, also there can be modular stations - for example: 1 big station consisting of 4 smaller ones.
The increase of the packet size should not have a big impact but it is a waste of memory.
The issue with big ships is not in the packet size but in many other places - for example: you won't be able to install, uninstall systems on a ship that is too big.
And so on, lot's of places/mechanics will not work with ships that are too big.
Ofcourse these things can be fixed/adjusted to work with huge ships, but that would take too much time.
Right now I still have a lot of basic mechanics to add to the game, but perhaps later I may return to this.
Do not send the designs to the client. Everybody has all designs with the launcher and it is easy to distribute the designs in private games.
This will work only with your launcher, but I have another launcher planned for the game.
That would also make the "Downloading server data..." phase faster.
"Downloading server data..." phase takes too long not because of the models, but because of the universe size.
And I also have a plan on how to fix that later.
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Post by kcd.Spektor »

Latest update:

Just finished adding the install/uninstall system mechanic.

In the piloting screen the systems page is now accessible.
It shows the ship layout with installed systems.
Image

You can select a system and press uninstall.
If you uninstall a system that was upgraded - you will loose the upgrades.
Image

When the system is uninstalled it is placed in the cargo hold of the ship.
If cargo hold is full - the system will be jettisonned.
Also, in the cargo hold page, when you select a cargo item that is a ship system, you can press install button to install it.
Image

If you click the install button you will see the ship layout where you can select where you want to install the new system.
Image

After you select where you want the system to be installed,
it will appear on the ship, but will be unaccessible for some time(10 sec default)
Image
kcd.Spektor
Posts: 586
Joined: Thu Nov 26, 2015 8:21 am

Re: Hurray! Another multiplayer clone project. :)

Post by kcd.Spektor »

Btw.
Jrb can you make your launcher to download the client to the folder where the launcher is executed?
Post Reply