Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCP/IP Multiplayer Feature #782

Open
Simon-Charest opened this issue Nov 6, 2018 · 18 comments
Open

TCP/IP Multiplayer Feature #782

Simon-Charest opened this issue Nov 6, 2018 · 18 comments

Comments

@Simon-Charest
Copy link

This would be the greatest thing ever! :D But yeah, it's something hard to implement, synchronicity and all.

The gaming mechanics would need to be split between server and client. Then, one of the players' machine would have to act as the server, feeding all the clients.

I humbly suggest the "simple" Minecraft approach: splitting the server and client apps. The game map would be saved locally to the server but the players should probably be saved on each of the remote client.

@igorko
Copy link
Collaborator

igorko commented Nov 8, 2018

We already have such an request in https://github.com/dorkster/flare-engine-next/issues/12 . Looks like there is no easy way to do it. And to do it correclty it will require a lot of effort and architecture changes. Don't thing we can allow large architecture changes in version 1.0x of engine...

@ate088
Copy link

ate088 commented Nov 18, 2018

I am not a programmer so I do not know if this is any easier, but instead of full blown multiplayer, how about a 'social feature' whereby players can upload their character's stats/gear/skills, allowing other players to then 'summon' that character as an AI companion? (For the sake of balance, let's say players can only summon characters a couple levels above or below their own.)

It would go a long way to create a sense of community even without real-time multiplayer. Another benefit of this is that people would only see the pool of players getting larger and never shrinking.

@Simon-Charest
Copy link
Author

Or just an in-game IRC chat client implement with a sharable stash or something. That could be a first step.

@igorko
Copy link
Collaborator

igorko commented Nov 19, 2018

If talking about full multiplayer, how do you see playing campaign in network mode? I am not a fan of multiplayer games so have no idea how it should be. What should be synced and what not. I could make a draft for game changes, but first of all I should know what functionality should be added.

@Simon-Charest
Copy link
Author

Personally, I would add the same features as Diablo 1, plus a sharable stash : players would see each other, be able to fight along side, share items, chat, host a game, join a game, the game could reset everytime it is launched as long as the quest flags remain individual / saved on the client-side, etc. PVP is a plus but wouldn't need to be implemented at first.

So it is more of a matter of splitting the code between client and server so that the game in sync'ed between players (1 hosting and the rest being clients).

@igorko
Copy link
Collaborator

igorko commented Nov 20, 2018

I do not remember how Diablo 1 multiplayer works. Give clarifications. E.g. if item is dropped, how much players can take them (for me more than one sounds illogical. Players should fight for item?..). How two players shouild finish the same quest if they are on the same location if quest depends on taking/giving items. We already have sharable stash, you want to share items between players? Sounds illogical too...

@igorko igorko closed this as completed Nov 20, 2018
@igorko igorko reopened this Nov 20, 2018
@nitramr
Copy link

nitramr commented Dec 28, 2018

I never played Diablo 1 but Diablo 2.

  • one player have to provide the game host and others can join (I can't remember what happens if the host lost connection, I guess the game is pausing)
  • If a player joined a multiplayer game the monsters become stronger (no idea if more HP or increasing the amount of monsters)
  • quest items are available for every party member if it drops by monsters or chest (because it should be possible to complete the story if someone leaves the game)
  • every player can collect quest items just one time (if player 1 own a quest item which has been dropped by player 2 it is not possible that player 1 can pick it up)
  • every non-quest items which drop by a monster, a chest or other party members are only available one time. Such items can be pick up only by one player. (it is a general rule for every item except quest items)
  • I'm not sure but I remember that the common stash is player related and not shared with other party members
  • it is possible to kill a monster together with other players. Every attack has to be sync to all players

@igorko
Copy link
Collaborator

igorko commented Dec 28, 2018

Guys, if you want to play Diablo, just do it. If you want to have multiplayer in Flare just think about how you see it, an not just say "hey devs, make in the same way as it was in Diablo, and after that we will bother you again to change something if we don't like it"

@igorko
Copy link
Collaborator

igorko commented Dec 28, 2018

I don't see any logic in allowing to do the same quest by few players on the same screen. For me it looks stupid when players are standing in "queue" to NPC to speak with him, report quest status, etc. Maybe in Diablo1,2 (if it was so) it was the only way to implement multiplayer, but nowadays this architecture decision is imho outdated. I don't play multiplayer games but I think game industry found some more elegant way for such things.

@igorko
Copy link
Collaborator

igorko commented Dec 28, 2018

Also note that Flare was not planned as MMORPG. so I don't think we should think about multiplayer as Massive Multiplayer.

@dorkster
Copy link
Collaborator

Question for everyone: What are your thoughts on local (split-screen) multiplayer? Networked multiplayer includes a lot of big problems to solve:

  • Verifying that the game data is the same for all players
  • Connecting players (e.g. p2p vs single server)
  • Making the game state suitable to be synced over a network

Split-screen multiplayer would avoid these issues. The new issue that would arise would be fitting the UI into the smaller screen real estate.

Maybe everything would be controlled by player 1, with the other player(s) acting as controllable minions.

@nitramr
Copy link

nitramr commented Dec 29, 2018

Hi @igorko, Diablo is a classic game and one of the first successful games for hack and slay. So it's normal for people to refer to it. Flare should not be a Diablo clone, it should be something else, something better.
Do not get me wrong, my list is not a list of multiplayer features in Flare. It's just a list of how it works in Diablo 2. Sometimes it's a good idea to review the existing game mechanics as they have already been developed. I also disagree with some mechanics in Diablo because some of the features are more than 17 years old and are out of date.

I don't see any logic in allowing to do the same quest by few players on the same screen. For me it looks stupid when players are standing in "queue" to NPC to speak with him, report quest status, etc.

Another idea might be that each player take an individual sub quest of a common quest. e.g. Each player must find a single item on a map or kill a monster. So everyone do something individual, but for a common goal.

@dorkster I can imagine it works great for consoles where each player has their own controller, but I think it's not nice on a PC where you have to share a keyboard and a mouse.

@igorko
Copy link
Collaborator

igorko commented Aug 21, 2019

@dorkster how about remaking game loop as starting point. We could post keyboard and mouse usage "events" to separate queue and process them separatelly from current "logic()" functions. This will allow us to trigger avatar actions from other then IO source.

@dorkster
Copy link
Collaborator

@igorko I think that's reasonable. Abstracting the controls from the physical I/O in such a manner would also open up some other possibilities. For example:

  • AI controlled player / machine learning
  • Recorded game play in the form of Quake-style "demos"
  • Attaching the event queue to any entity. Could be useful for testing enemy abilities, but would require unification of all entity types.

@igorko
Copy link
Collaborator

igorko commented Aug 22, 2019

Our InputSate works on per-frame basis and watches for any change in input every moment, right? But we need to transform it into commands, which are dedictated to separate entity. We could leave menus and hud as is, but I think it is impossible to use both object commands and primitive input changes. Probably new inputstate should know all about current Game State and produce commands, which are dediacated to separate object (like "Move Avatar" or "Close MenuTalker"). Next step will be putting such commands to Queue like Push(Object, Method, Data).

@lokize
Copy link

lokize commented Aug 5, 2020

+1 for this!

@dataf3l
Copy link

dataf3l commented Jun 16, 2023

i was going to tell my LAN party friends to try this, but no multiplayer means we can't play this, unfortunately, when is this feature due?

@ndkk
Copy link

ndkk commented Jun 16, 2023

Actually there are so many hard works to do.
Especially in architecture.

But if the flare game would never implement the multiple users feature,
it's a pity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants