Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: [1] 2

Author Topic: [0.95.1a-RC6] Combat Multiplayer Project  (Read 7779 times)

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
[0.95.1a-RC6] Combat Multiplayer Project
« on: May 07, 2022, 01:33:44 PM »

Allow a user to host a multiplayer combat session that other users may connect to via direct IP address and participate in. Built on an custom-written netcode architecture.
no guarantee the nightly builds wont just crash on launch, requires beta cmutils from the git repository, console commands, lazylib

Discord server for development and discussion here

Features:
- 255 player server limit (realistically much less)
- currently supports:
  - ships (basic data available through ShipAPI)
    - armour grid state
    - shield state (currently janky, known flickering)
    - engine states (flameouts, damage)
  - missiles
  - projectiles (rays and regular)
  - beams
  - mutable ship variant synching and on-demand loading
  - weapons (basic behaviours: rotation, arcs, damage)
  - simulates player control
    - a client cannot 'directly' control their ship, instead their inputs are sent to the server before effects on their current ship appear
    - weapon group switching
    - autofire toggling
    - ship system usage, venting, shooting, fighter toggle
    - regular/shift mode movement controls
    - mouse cursor
    - shield toggle (currently janky)
 - additional features
    - netcode architecture modeled on the source sdk
    - simple linear interpolation mode for data records (used in e.g. ship positions, rotation)
    - lots of bit packing to reduce packet sizes
    - in-game text chat with custom usernames (edit in settings.json)
    - uses dual UDP/TCP servers for priority data such as variants needed to preload combat and real-time data sync
    - custom UI
        - join game, host game
        - ship selection, currently an instant switch (including enemy ships)
« Last Edit: October 09, 2023, 09:58:00 AM by tomatopaste »
Logged

mrpras

  • Lieutenant
  • **
  • Posts: 54
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #1 on: May 07, 2022, 02:37:35 PM »

 8) can't wait!
Logged

AppleMarineXX

  • Lieutenant
  • **
  • Posts: 57
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #2 on: May 07, 2022, 10:30:06 PM »

Oh boy, I was just thinking about the feasibility of Star Control-like Super Melee the other day. Excited to hear that you're working on it!

6chad.noirlee9

  • Captain
  • ****
  • Posts: 368
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #3 on: May 10, 2022, 02:12:54 PM »

very cool.  having a persistent setup has always been a dream of mine, something like dreadnaughts assault game mode (whatever the one is with base ships) except in this case you would have stations
you would need a larger than normal map to make it feasible, maybe, depending on the scale and considering making modded ships a possibility

having an option to fight smaller battles for those who dont have a strong enough computer to handle 500 dp battles would be nice
Logged
edit: edit: maybe were just falling with style LOL.  make a bubble, make the space in front of it smaller and just fall forward

LinWasTaken

  • Commander
  • ***
  • Posts: 189
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #4 on: May 13, 2022, 03:42:50 AM »

what happens when one player uses a phase ship but the other doesn't?

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #5 on: May 14, 2022, 05:13:00 AM »

what happens when one player uses a phase ship but the other doesn't?

simulation runs at server speed, so if host phases, time slows down for clients. if client phases, they don't experience any time slowdown but ship will move at higher speed
Logged

LinWasTaken

  • Commander
  • ***
  • Posts: 189
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #6 on: May 15, 2022, 02:03:29 AM »

what happens when one player uses a phase ship but the other doesn't?

simulation runs at server speed, so if host phases, time slows down for clients. if client phases, they don't experience any time slowdown but ship will move at higher speed
that's so one-side lol

brm

  • Ensign
  • *
  • Posts: 7
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #7 on: May 17, 2022, 05:45:25 PM »

This looks great. Was always what I kind of hoped "Co-op" would be, just being able to play the combat.
Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #8 on: September 08, 2022, 10:45:07 PM »

Development is active, new debug utitilities introduced into CMUtils.

Logged

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #9 on: September 11, 2022, 03:02:33 AM »

Bit compression is working using the inbuilt jdk ZLIB deflator algorithm, current compression ratio of on average 75% at the highest speed / lowest compression setting.
Logged

Liral

  • Admiral
  • *****
  • Posts: 717
  • Realistic Combat Mod Author
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #10 on: September 13, 2022, 06:21:29 PM »

simulation runs at server speed, so if host phases, time slows down for clients. if client phases, they don't experience any time slowdown but ship will move at higher speed

For the sake of fairness, could the 'server' player play through a 'client'?

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #11 on: September 14, 2022, 05:10:43 PM »

simulation runs at server speed, so if host phases, time slows down for clients. if client phases, they don't experience any time slowdown but ship will move at higher speed

For the sake of fairness, could the 'server' player play through a 'client'?

Haven't got that far yet, but I think I get what you're describing there; you're suggesting that the 'true' simulation speed switches from one computer to another when the host tries to phase? Unfortunately I don't think that's logically possible with multiple clients connected, and is also incompatible with the way the mod handles data.

The mod as I have designed it so far can't magically replicate every variable and random number function, it can only send specific data such as ship ids, locations, velocities etc. that can be accessed through the API (plus some hax). The effect of that is that it is impossible to transfer server ownership to another client.
Logged

Liral

  • Admiral
  • *****
  • Posts: 717
  • Realistic Combat Mod Author
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #12 on: September 14, 2022, 05:33:28 PM »

Haven't got that far yet, but I think I get what you're describing there; you're suggesting that the 'true' simulation speed switches from one computer to another when the host tries to phase? Unfortunately I don't think that's logically possible with multiple clients connected, and is also incompatible with the way the mod handles data.

You're right.  Time cannot run faster for my ship than for your ship but also the same speed for both of us; phase must slow time for all other non-phased ships or hasten time on phased ships.  The latter seems fairer to me.

Quote
The mod as I have designed it so far can't magically replicate every variable and random number function, it can only send specific data such as ship ids, locations, velocities etc. that can be accessed through the API (plus some hax). The effect of that is that it is impossible to transfer server ownership to another client.

The unseeded RNG is the real killer and can be fixed only by Alex himself with a global refactor.  I wonder if a 'real' server instance of Starsector that lacked RNG and would receive commands from and deliver updates to 'gameboard-and-piece' client instances that would do only what they were told could alleviate this problem.

tomatopaste

  • Captain
  • ****
  • Posts: 306
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #13 on: September 14, 2022, 11:10:27 PM »

Haven't got that far yet, but I think I get what you're describing there; you're suggesting that the 'true' simulation speed switches from one computer to another when the host tries to phase? Unfortunately I don't think that's logically possible with multiple clients connected, and is also incompatible with the way the mod handles data.

You're right.  Time cannot run faster for my ship than for your ship but also the same speed for both of us; phase must slow time for all other non-phased ships or hasten time on phased ships.  The latter seems fairer to me.

Quote
The mod as I have designed it so far can't magically replicate every variable and random number function, it can only send specific data such as ship ids, locations, velocities etc. that can be accessed through the API (plus some hax). The effect of that is that it is impossible to transfer server ownership to another client.

The unseeded RNG is the real killer and can be fixed only by Alex himself with a global refactor.  I wonder if a 'real' server instance of Starsector that lacked RNG and would receive commands from and deliver updates to 'gameboard-and-piece' client instances that would do only what they were told could alleviate this problem.

these are solved problems
Logged

Liral

  • Admiral
  • *****
  • Posts: 717
  • Realistic Combat Mod Author
    • View Profile
Re: [0.95.1a-RC6] Combat Multiplayer Project
« Reply #14 on: September 15, 2022, 06:19:47 AM »

Pages: [1] 2