flareteam / flare-game

Fantasy action RPG using the FLARE engine
http://flarerpg.org/
Other
1.1k stars 236 forks source link

TCP/IP Multiplayer Feature #782

Open Simon-Charest opened 5 years ago

Simon-Charest commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

igorko commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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...

nitramr commented 5 years ago

I never played Diablo 1 but Diablo 2.

igorko commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

dorkster commented 5 years ago

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

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 commented 5 years ago

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 commented 4 years ago

@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 commented 4 years ago

@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:

igorko commented 4 years ago

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 commented 3 years ago

+1 for this!

dataf3l commented 1 year ago

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 commented 1 year ago

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.