Git Product home page Git Product logo

Comments (5)

ERmilburn02 avatar ERmilburn02 commented on May 18, 2024

Riptide isn't designed for sending huge amounts of data, maybe try sending the save over http instead. It will be faster, more secure, and in theory can be any size.

from riptide.

Eleocraft avatar Eleocraft commented on May 18, 2024

Sorry, I normally make singleplayergames. how would I do that?

from riptide.

tom-weiland avatar tom-weiland commented on May 18, 2024

So I wanted to ask: is there a possibility to send bigger chunks of data with riptide? and if this isn't possible: is there a reason for it not to be possible?

You could modify the source code to increase the limit. The reason messages are limited to that size is because Riptide is built for speed, and larger messages are more likely to take longer to send. In order for message instances to be reusable, they need a pre-allocated byte array which requires setting some kind of maximum size, and 1250 is less than MTU but bigger than most games will ever need a message to be.

there is a lot of stuff that isn't stored on the server, but on the clients

What kind of stuff are clients storing that the server doesn't know about?

because of this when the game gets saved I need to send a relatively big JSON savefile from every client to the server.

Sending the raw data and making the server create the JSON file locally will be more efficient than creating the JSON file on the client and sending that whole thing over.

from riptide.

Eleocraft avatar Eleocraft commented on May 18, 2024

Sending the raw data and making the server create the JSON file locally will be more efficient than creating the JSON file on the client and sending that whole thing over.

Yes I realized this. I fixed the problem by making a generic class, that can split a bytearray into several bytearrays with an index, and then put them together in the right order. It works fine, and I can send big chunks of data with many small messages.

What kind of stuff are clients storing that the server doesn't know about?

this is my first ever multiplayer game, and it will only be playable with friends cooperatively. So I don't need to keep track of for example player-abilities, loadouts or just inventorys on the server. Instead I just send it as a savefile when needed.

and larger messages are more likely to take longer to send.

I figued as much. that's why I didn't want to do this.

from riptide.

tom-weiland avatar tom-weiland commented on May 18, 2024

7f67328 adds the ability to modify the max payload size for messages and will be part of v1.3.0, so you could use that to avoid having to split data. However, the aforementioned considerations still apply, so it may still not be something that you actually want to do.

from riptide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.