Author Topic: I've begun networking in D Lix  (Read 11742 times)

0 Members and 1 Guest are viewing this topic.

Offline RubiX

  • Posts: 430
  • Amiga <3 The memories
    • View Profile
Re: I've begun networking in D Lix
« Reply #15 on: December 19, 2016, 04:34:24 PM »
wow yea u did work a lot on it continously!

Offline NaOH

  • Posts: 191
    • View Profile
Re: I've begun networking in D Lix
« Reply #16 on: December 19, 2016, 05:51:09 PM »
Wow, that solid chunk between December and the end of March is really something. :lem-shocked:

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: I've begun networking in D Lix
« Reply #17 on: December 29, 2016, 12:21:19 PM »


This is D Lix, playing a replay from C++ Lix. Hatches and goals are distributed according the replay's player permutation.

Several bugs still in: Wrong icon, albeit in correct color, on top of exits. Some exits aren't assigned any color, if your lixes enter such an exit, they're removed from play, but nobody gets points. No tape recorder buttons shown during replay. Lix in info panel is a garden lix, but should be blue instead. Can't start a networked game, only look at replays.

I'd rather not release anything with such bugs. You can't play networked anyway. The cut-off arrows in the screenshot are regular screen tearing, not a bug in Lix.

Re solid chunk: The github streak from 2015-12-24 to 2016-04-01 lasted exactly 100 days. :lix-evil: Shortly after, github stopped displaying streaks.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: I've begun networking in D Lix
« Reply #18 on: January 17, 2017, 05:30:08 AM »


Slow progress, this box is the only result from the past 2 weeks. I'm getting multiplayer replays in shape. I haven't played any networked games yet, this replay was an old C++ Lix replay.

<SimonNa> my sleep cycle is busted again, I'm not awake enough for a stream, but can't sleep either. Programming might be more suitable. JJ is harder than writing code <_<

Starting a game from the lobby is next. During play, there are some UI design problems left over from C++ Lix: How to display names? I'm considering to keep the score graph name-free, but when hovering the mouse cursor over the score graph, the game prints names and score numbers above the graph, into the playing area.

-- Simon
« Last Edit: January 17, 2017, 05:46:00 AM by Simon »

Offline RubiX

  • Posts: 430
  • Amiga <3 The memories
    • View Profile
Re: I've begun networking in D Lix
« Reply #19 on: January 18, 2017, 03:31:38 PM »
I really like the idea of keeping names out of view until you hover over it.  Much less clutter.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: I've begun networking in D Lix
« Reply #20 on: March 06, 2017, 03:43:13 PM »
I played a test game with geoo 3 days ago. Bugs and missing features:
  • Starting games is OK, but I haven't written code for end of game yet. The network connection times out after one game.
  • Server doesn't send time-syncing packets yet. Players will time-shift against each other due to network lag and FPS.
  • You can cancel other people's replay actions by clicking into air, like in singleplayer. This desyncs the replays.
  • geoo experienced outdated terrain graphics on correct physics, even in singleplayer. Not good.
But we were able to play a meaningful opening with interaction. :lix-grin:

The game server on lixgame.com is only up whenever I test. In theory, anybody can build the source, host their own server, and play bugged games there. In practice, I want to fix the descyncing and other heavy infrastructure bugs, then announce test games on IRC in a couple weeks.

-- Simon

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: I've begun networking in D Lix. First test on 2017-03-19
« Reply #21 on: March 10, 2017, 04:28:06 AM »
I wrote more client-side handling today: You can't cancel anybody's replay assignments during networked play. After a game, you land back in the lobby/room dialog, you can start right another game from there. I'm not yet done with sending time-syncing packets, but I expect to have that within a week.

I'd like to test this next week! Don't expect rock-solid games yet, there will be bugs and missing features, but I want to see whether this is playable. :lix-grin:

Who is up for a smoke test on Sunday, 2017-03-19 at 18:00 UTC?

-- Simon

Offline RubiX

  • Posts: 430
  • Amiga <3 The memories
    • View Profile
Re: I've begun networking in D Lix. First test on 2017-03-19
« Reply #22 on: March 11, 2017, 04:20:50 AM »
Might be at my sisters place, but if not i'll certainly hope to be able to test also.

Offline NaOH

  • Posts: 191
    • View Profile
Re: I've begun networking in D Lix. First test on 2017-03-19
« Reply #23 on: March 13, 2017, 07:24:08 AM »
sure! :lix-smile:

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: I've begun networking in D Lix. First test on 2017-03-19
« Reply #24 on: March 13, 2017, 12:09:40 PM »
I can't promise I'll be available at that time, but I'll be happy to join in the testing if I am. :) I can test both Windows and Linux builds (though Linux would be via a VM, since I'm not entirely sure where my Linux laptop is at the moment).
« Last Edit: March 13, 2017, 03:54:36 PM by namida »
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: I've begun networking in D Lix. First test on 2017-03-19
« Reply #25 on: March 16, 2017, 12:10:01 AM »
Okay, cool, networking session on 2017-03-19 18:00 UTC, join IRC quakenet.org #lix around then. I'll release earlier that day. Edit: Lix 0.6.28 released.

Planned design of the time syncing: The server counts physics updates (PUs) since game start. Every couple seconds, the server sends to each client the number of PUs since game start. The client adds his connection's lag to that value, then speeds up or slows down physics slightly to match the lag-adjusted PU.

The desired effect is that everybody tries to be at the same PU during the same UTC-datetime. Does the design accomplish that, or should we account for lag somehow differently?

-- Simon
« Last Edit: March 18, 2017, 09:20:19 AM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: I've begun networking in D Lix. First test on 2017-03-19
« Reply #26 on: March 16, 2017, 11:09:35 PM »
How was it accounted for in C++ Lix? Despite playing on laggy connections sometimes, I don't recall encountering anything beyond the normal symptoms of lag there (in particular, no desyncs, I think?).
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: I've begun networking in D Lix. First test on 2017-03-19
« Reply #27 on: March 17, 2017, 12:35:07 AM »
Yeah, are we saying this planned design is new from how C++ Lix accomplished the desired effect? (or maybe it never did?)  What are the alternatives (if any) that have been considered?  It's been a long while so I don't remember any details.

Anyway, conceptually it sounds reasonable.  Client uses the info and timing of the server's PU data to estimate how much its current local count of physics update is lagging/leading, then modify the speed accordingly to try to compensate.  The important thing is to actually try it out to make sure it plays out okay, like the player doesn't notice any a lot of frequent and possibly abrupt fluctuations in speed.

For testing out effects of longer lags it may be useful to try a VPN.

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: I've begun networking in D Lix. First test on 2017-03-19
« Reply #28 on: March 17, 2017, 01:41:33 AM »
C++ Lix has this same basic design: Server sends syncing info, client adds lag, client adjusts speed to approach this sum. But the C++ Lix client was stupid in some details, it didn't bother to re-adjust the speed once it has caught up, but happily overshot until the next server sync.

I wrote the D impl yesterday, improving on this:
  • Server sends milliseconds, not PUs, because milliseconds are more precise. Client still adds lag normally.
  • Server syncs rapidly during early game, especially before first lix spawns. Then syncs less frequently later.
  • Client remembers how many frames it must ultimately skip/insert between PUs, and stops adjusting before the next syncing packet arrives.
I've never considered anything else yet. <_<

Will see how it feels after the test. We won't do 6+ people yet, which produced lots of felt lag (might have been network or local computation) in C++ Lix.

Get Lix 0.6.28 to join the test on 2017-03-19 at 18:00 UTC.

-- Simon
« Last Edit: March 18, 2017, 09:21:04 AM by Simon »

Offline Simon

  • Administrator
  • Posts: 3878
    • View Profile
    • Lix
Re: I've begun networking in D Lix
« Reply #29 on: March 20, 2017, 06:33:24 AM »
We had a test yesterday.

Lots of bugs and missing features! NaOH has the same bug as geoo with outdated terrain graphics, but correct physics. Agonizing, because I can't repro the bug for my life, yet it hits them both frequently. We filed 9 bugs in total. :8:()[:

I want to hack on the bugs, and get back on reallife. I can't tell when we should test again. Next Sunday is too early, some issues will take time and are important.

Nonetheless, I'll leave the server running, for whoever wants to play buggy games. :-]

-- Simon