Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Multiplayer help please

Author
Message
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 19th Sep 2019 10:46 Edited at: 19th Sep 2019 15:54
I have zero multiplayer knowledge - so I'm about to ask some very basic questions

Aim:
I have a near-completed multiplayer game which is based on a "role-and-write" dice game (think Yahtzee but different).
Each player takes a turn and then the play passes to the next player.
At the moment you have the option of single player or up to six players but in order to play it you pass the device to the next player - functional but not ideal.
Ideally I would like a system like "Yahtzee with Buddies". In that, available players are listed (who are not necessarily online at the time but are registered). You can then select a player and challenge them. They get a notification of the challenge and can choose to accept or not. Games don't have to be played in real-time but can be played over several days.

Obviously, I need a server. Do I set up my own PC as a server? I presume that means it needs to be powered on all the time. Can I use a web host instead?
Do I need to install server software?
Once I have a server, I need to hold game states. Does that happen server side or on each local device - If it's on the server then how does that happen. If it's on the local devices then how can I ensure they are in-sync?

How do I pass each move to the other player.
What else do I need to know that I may not have considered?

There will, I'm sure, be many other questions as I go but I think these will do for now.
smerf
19
Years of Service
Recently Online
Joined: 24th Feb 2005
Location: nm usa
Posted: 20th Sep 2019 07:24
Well scraggle multiplayer games need to be developed as multiplayer games. Its is difficult to turn a single player game into a multiplayer games but far from impossible. you have a few options you can use a peer2 peer system rent a server or host a server for hosting player lists and game states for offline players or saved games ect. sync is not a huge issue in a game where constant movement is not not updated in real time as in 30-60 times a second. third option using a sql data base that the client can pull info from but personally hate doing web stuff.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 20th Sep 2019 14:49
Quote: " you can use a peer2 peer system rent a server or host a server for hosting player lists and game states for offline players or saved games ect. "

that is what I am considering for head to head 2 player action
seems like knowing/sharing the IP addresses is the basic way to go
hosting should be easier than setting up our own server

Quote: "Ideally I would like a system like "Yahtzee with Buddies". In that, available players are listed (who are not necessarily online at the time but are registered). You can then select a player and challenge them. They get a notification of the challenge and can choose to accept or not. Games don't have to be played in real-time but can be played over several days.
"

Not in real time should make things a lot easier with the database suggestion.
The server would maintain the game state - database of all shared variables - each player changing their own variables and displaying all when accessing game state.
All the client is doing is allowing the player to change their data according to the current state of the game, and creating the display based on the data received from the server.
Turn based makes it easier, but time limits (or lack of) could ruin it.

I was thinking of a battle royal style game of strategy, where movements on a map would be planned and executed with varying attributes of attack and defense etc. then the server could execute all of the battle logistics based on the inputs once the battle time had commenced and player input was halted. Give them minutes, hours, days for different battles for training/stat-adjustments. That way, it is not real time or turned based as much as one timed turn for everyone. This would not have any number of player restrictions like a real time game, so the server could add players to the battlefield all at one time or in waves based on the amount of player input for that battle. The output would be a playback of the procedurally generated action based on all of the input variables for any battle. Copy/Save the battle data and load it anytime by anyone for spectating (pay per view? j/k

Getting rid of the real time requirement should make networking a lot easier, and that is why I am thinking along those lines to get past my multiplayer procrastination.
Thinking of proprietary encryption for using flat files instead of SQL or other popularly known data saving methods to thwart invalid input attempts.




Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-11-22 16:33:40
Your offset time is: 2024-11-22 16:33:40