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

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 2731
    • View Profile
    • Lix
I've begun networking in D Lix
« on: September 08, 2016, 02:02:02 am »
Hi,

this topic is outdated: Lix 0.8 and onwards has networked multiplayer, and we've played some nice sessions already in September 2017. Get a recent Lix from the Lix homepage.



I have begun developing the networking in D Lix. Networked multiplayer is the cheese feature, Rubix and NaOH have joined LF after playing Lix multiplayer in C++ Lix. We must have multiplayer in D Lix.

Game rules: Each player has lixes in their own color. You may assign skills only to lixes of your own color. There is an exit with your color, try to get many lixes into that exit. You get a point for each lix in your exit, no matter whose lixes they were. Screenshot of multiplayer in C++ Lix.

Technical background: Each player runs Lix on their own computer, and connects to a server. When a player assigns a skill to their lix, the server relays this event to everybody else. The game calls high-level networking functions like "send assignment", "choose level", "send chat message".

I have written an abstraction layer that exposes these high-level functions. The abstraction layer sits between the game and enet, a C networking library. I get my hands dirty here, read from bare ubyte*, count precise lengths of data structures, cast data types around.

The networking layer is standalone: It doesn't include anything from the remaining game. Therefore, I can test the abstraction layer outside of the game.

How far am I: The abstraction layer has most features and is well-debugged. My next step is to write the lobby. The lobby will be a graphical user interface inside Lix, it will connect you to the server, offer a text field to chat, and buttons to choose colors and levels.

-- Simon
« Last Edit: October 04, 2017, 11:38:30 am by Simon »

Offline NaOH

  • Posts: 195
    • View Profile
Re: I've begun networking in D Lix
« Reply #1 on: September 08, 2016, 02:30:09 am »
Yayayay, multiplayer!

Some time ago, we were discussing lobbies and privilege levels. Being able to kick/force-observe inactive players would be very helpful. Did that conversation go anywhere?

Offline Simon

  • Administrator
  • Posts: 2731
    • View Profile
    • Lix
Re: I've begun networking in D Lix
« Reply #2 on: September 08, 2016, 03:52:31 am »
Several feature ideas float around:
  • Special privileges for a room owner.
  • Handicap. Force a spawn position on an unblanced map, start with fewer lix and skills.
  • Race mode, where it times your first save, or maybe your n-th save. The objective is to be fastest.
  • Survival mode, where there are no exits, and it times the death of your last lix. The objective is to outlive all opponents.
  • Avoid making too many special game modes. Clones had 5 or 6? I don't remember them all. The most important were Corral (normal game, save more than anyone else), Star Clone (save a neutral clone faster than anyone else), and CTF (bring the flag into your exit, but the clone who picks up the flag can't be assigned).
I'd like to look at them after the networking has the main features from C++ Lix: Desync-free, observer mode, and teams. Until then, the hack solution for missing room privileges is to start a fresh room.

-- Simon
« Last Edit: September 08, 2016, 04:20:52 am by Simon »

Offline ccexplore

  • Administrator
  • Posts: 5013
    • View Profile
Re: I've begun networking in D Lix
« Reply #3 on: September 08, 2016, 06:27:14 am »
Avoid making too many special game modes. Clones had 5 or 6? I don't remember them all.<snip>

For reference, the only other two Clones modes supported for MP (since Quantum Loop is strictly SP IIRC) is "Quantum Quarrel" which is basically a Worms-style kill-them-all (player with last alive clone wins) and "Multiverse Match" which is not "really" multiplayer--each player gets a copy of the otherwise basically SP map, and races to solve it the fastest (or save the most, I don't remember exactly), with no intended interactions between the copies (unless there are design errors in the level enabling such).

[edit: I just noticed "Quantum Quarrel" is exactly your "Survival mode" proposal :XD:]
« Last Edit: September 08, 2016, 06:51:40 am by ccexplore »

Offline RubiX

  • Posts: 408
  • Amiga <3 The memories
    • View Profile
Re: I've begun networking in D Lix
« Reply #4 on: September 08, 2016, 07:10:16 am »
Cool, you have done so good on the rebuild of this.
Im starting my practicum next week, gonna be nice to have some free time again, I can be more vocal around here again im sure :)

Offline Proxima

  • Posts: 3443
    • View Profile
Re: I've begun networking in D Lix
« Reply #5 on: September 08, 2016, 11:20:42 am »
"Multiverse Match" which is not "really" multiplayer--each player gets a copy of the otherwise basically SP map, and races to solve it the fastest (or save the most, I don't remember exactly), with no intended interactions between the copies (unless there are design errors in the level enabling such).

In C++ Lix, I made a 2P version of "Box Set" that works like that :lix-cool: It was great fun.

Offline RubiX

  • Posts: 408
  • Amiga <3 The memories
    • View Profile
Re: I've begun networking in D Lix
« Reply #6 on: September 08, 2016, 02:29:32 pm »
An attack and Defense automatic mode would be cool.  When the first round ends, the game then prepares you for the reversed role game, instead of just doing the manual way.   
Final score between the rounds is displayed afterwards.

Offline RubiX

  • Posts: 408
  • Amiga <3 The memories
    • View Profile
Re: I've begun networking in D Lix
« Reply #7 on: September 08, 2016, 02:42:43 pm »
For old times sake:  Here's some of our multiplayer replay videos in C++ Lix




Ghetto Wars (2v2 Team Match)
https://www.youtube.com/watch?v=Hhcv7InnP0M


Wise Decisions (5 player FFA)
https://www.youtube.com/watch?v=x7ye01tQJSM


NaOH's Arc (1v1 Attack & Defense)
https://www.youtube.com/watch?v=ASwAV8jnONw


Tower Defense 22934 (2v2 Team Match)
https://www.youtube.com/watch?v=H0I4IsRG6U8


The Safety Dance (4 Player FFA)
https://www.youtube.com/watch?v=MDnczhwEPL8

Offline Minim

  • Moderator
  • Posts: 1458
    • View Profile
Re: I've begun networking in D Lix
« Reply #8 on: September 08, 2016, 03:43:37 pm »
Love those videos, and the music in them too! The 'NaOH's Arc' video is hilarious, especially how that poor green Lix was treated when trying to bash her way home. :D
The user formerly known as minimac

Offline RubiX

  • Posts: 408
  • Amiga <3 The memories
    • View Profile
Re: I've begun networking in D Lix
« Reply #9 on: September 08, 2016, 03:48:02 pm »
:D  Totally

Offline Simon

  • Administrator
  • Posts: 2731
    • View Profile
    • Lix
Re: I've begun networking in D Lix
« Reply #10 on: September 21, 2016, 04:26:17 pm »


Chat works. Room switching works.

Level sending and receiving works in the command-line test client, but lacks GUI support entirely. I'll have to provide a level browser similar to the singleplayer browser, and display the received level.

Peer list doesn't yet display player colors. Starting games isn't implemented at all, neither in the GUI nor in the backend. There isn't anything exciting to test yet. :-)

-- Simon

Offline Simon

  • Administrator
  • Posts: 2731
    • View Profile
    • Lix
Re: I've begun networking in D Lix
« Reply #11 on: November 07, 2016, 08:04:41 pm »


I wrote the multiplayer score graph. The large bar shows your score. The small bar shows your potential score, were you to save all your remaining lix, without stealing any.

The colors are autogenerated. Some shadings are too light, others too dark. But this bug is minor. I should focus on a minimal working networking game first.



This is the old bar graph from C++ Lix.

Proxima suggests to show player names during the game. With 4 or more people, the bar graph is already crowded. Maybe show a larger table on (mouse hovers over the small bar graph)? Maybe show the leading player in the info panel to the left?

-- Simon

Offline Proxima

  • Posts: 3443
    • View Profile
Re: I've begun networking in D Lix
« Reply #12 on: November 07, 2016, 09:25:43 pm »
Hmm, interesting question. It's not important to have player names continuously visible, it would just be nice to be able to check who's who, so probably best would be if mouseover made the names appear, or replaced the graph with a rectangle with a lix of each colour and the player's name underneath.

Offline RubiX

  • Posts: 408
  • Amiga <3 The memories
    • View Profile
Re: I've begun networking in D Lix
« Reply #13 on: November 07, 2016, 10:08:57 pm »
Good start with the bar graph.
I think that maybe the name could be in black, unviewable, but as the bar starts moving over, it is 'lighting up' the name behind.  You'll soon see who each player is.

Offline Simon

  • Administrator
  • Posts: 2731
    • View Profile
    • Lix
Re: I've begun networking in D Lix
« Reply #14 on: December 19, 2016, 11:21:35 am »


Green squares measure github activity -- for me, most are commits to D Lix. Then I began speedrunning in September 2016. <_<

I'll bring along the desktop machine to my parents over the holidays. The internet there is too slow to stream video. I'll try to get back into Lix development. Maybe the networking mode is good enough for community testing in January.

-- Simon