Coder Social home page Coder Social logo

Comments (2)

lucaspoffo avatar lucaspoffo commented on August 18, 2024

Without code it's hard to know the problem, you might be doing something wrong because it should send more messages. Are you using the example code as base? You can check the bevy_demo also

from renet.

VisualEhrmanntraut avatar VisualEhrmanntraut commented on August 18, 2024

@lucaspoffo I cross-referenced the bevy and chat examples to get started with using this crate.

let transport = NetcodeServerTransport::new(server_config, socket).unwrap();
App::new()
    .add_plugins((
        MinimalPlugins.set(ScheduleRunnerPlugin::run_loop(Duration::from_secs_f64(
            1.0 / 120.0,
        ))),
        LogPlugin::default(),
        RenetServerPlugin,
        NetcodeServerPlugin,
        AssetPlugin::default(),
        PhysicsPlugins::default(),
        WorldPlugin,
    ))
    .insert_resource(server)
    .insert_resource(transport)
    .add_systems(Update, handle_events)
    .run();

The app is created as in the above snippet. Messages are transported later, in an Update system, which has a for loop that sends a bunch of messages on every iteration. Every tick of the schedule runner, the bevy crate sends only one message, instead of as many as possible, which is not what I expected. Do note that I am new at game development, so there might be something I'm doing that's not common practice, or something.

from renet.

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.