gpgpgpgp
05-21-2013, 06:02 AM
Revised! I know it's long. Please read it again, developers, thx!
There is no need for quest synchronization if players are just playing like this. Only the main player (server) needs to record his quest status, and other players (clients) play a role like "mercenaries", and fight along with the main player to help to accomplish his quest. Which means the "mercenaries" must try hard to protect main player from being killed, or the game has to go back to the last save (due to automatical reload). If a "mercenary" is killed, he'll be automatically kicked and forced reconnect to the server with his recorded inventory, and teleport to the main player (to avoid unsynchronization issue caused by automatical reload on the client game, such reconnecting should be completed within seconds as long as the connection is good). (Since it is almost impossible to play a FPS game if one's lagging all the time in the first place.)
How to save game as a "mercenary":
The Appearance, Inventory, Perks, Skills, SPECIALs and other stats of "mercenaries" can be easily saved in an encrypted local file when they exit the game or cut off from the server (lose connection or got kicked). The file is saved in the local game folder so that "mercenary" can connect to another server (if he wished) or start his game as a server with his character & inventory preserved. The file should be encrypted to prevent cheating, but during Alpha Tests the encrypting is not necessary at all. (And can be easily modified for all kinds of tests and funny results)
After the "mercenary" leaves the game (either be kicked or killed or he left himself), the server automatically delete those unused "mercenary" NPCs in the game world. So if no other player is connected to the server, it equals to a single playing on the server.
How to save game as the "lone wanderer" (main player, server):
The server can activate a function (called "Multiplayer saving", maped as "F1" or something replacing the original "Quicksaving" key) which shows a "The server is trying to save, Please leave the game and reconnect the Server in 5 seconds" message to everyone and kick all "mercenaries" after a few seconds. After all "mercenaries" are gone, the server then automatically save the game via the original in-game functions. This should avoid any saving issues on multiplaying, since as explained, if no one else is connecting to the server, it equals to a single playing. And Saving is Always done when the server is "Single-playing". After the save is complete, the server can be seen again on the server list, and those "mercenaries" are forced (or "invited" with a yes/no option) to reconnect to the server and continue their game. Similarly the server can press "Multiplayer Reload F2" to reload his game by the latest save file (though not recommended in Multiplayer mode) or if the server player is killed (and the game inevitably auto-reloads ), all "mercenaries" are immediately kicked and after server finishes its reloading, they're forced (or "invited" with a yes/no option) to reconnect to the server to continue their game.
As you can see, such game mode avoids most issues on multiplaying (saving can be done), and preserved the most game content (doing quests and DLCs together, the Main Player runs the quest script and the Mercs are teleported near the MP via a timed script that checks distances regularly ). The program development is also made easy( much easier than what you've planned to do, in my understanding, making it an MMO ).
Forgive me if I'm still not explaining the above things well. If any questions can make them clearer, just ask them.
Basic functions needed:
Client: 1.Saving current Character into a simple local txt file, not really necessarily DB since the information is pretty neat and small itself, and should be stored locally;
2.Able to receive invitations ( see below );
Server:1.Kick Players;
2.Check Player Distances and Teleport them if they're too faraway or in other cells (Clients should be able to handle teleporting between cells); Check and Teleport can be done either by Timed Scripts/ A function called by a mapped key/ A function called by a mapped key with a delay before start checking and send a message "Get Closer or Get Teleproted!"
3.Mark the IP of playing Clients before saving/reloading and send them invitations after finishing it;
That's all! So simple! If you don't use the Invitation mechanisms in the Alpha Test, it's even simpler! As long as you finish NPC/Monster sync, the game will be very playable.
Time Stage: Right after NPC/Monster sync is stable.
There is no need for quest synchronization if players are just playing like this. Only the main player (server) needs to record his quest status, and other players (clients) play a role like "mercenaries", and fight along with the main player to help to accomplish his quest. Which means the "mercenaries" must try hard to protect main player from being killed, or the game has to go back to the last save (due to automatical reload). If a "mercenary" is killed, he'll be automatically kicked and forced reconnect to the server with his recorded inventory, and teleport to the main player (to avoid unsynchronization issue caused by automatical reload on the client game, such reconnecting should be completed within seconds as long as the connection is good). (Since it is almost impossible to play a FPS game if one's lagging all the time in the first place.)
How to save game as a "mercenary":
The Appearance, Inventory, Perks, Skills, SPECIALs and other stats of "mercenaries" can be easily saved in an encrypted local file when they exit the game or cut off from the server (lose connection or got kicked). The file is saved in the local game folder so that "mercenary" can connect to another server (if he wished) or start his game as a server with his character & inventory preserved. The file should be encrypted to prevent cheating, but during Alpha Tests the encrypting is not necessary at all. (And can be easily modified for all kinds of tests and funny results)
After the "mercenary" leaves the game (either be kicked or killed or he left himself), the server automatically delete those unused "mercenary" NPCs in the game world. So if no other player is connected to the server, it equals to a single playing on the server.
How to save game as the "lone wanderer" (main player, server):
The server can activate a function (called "Multiplayer saving", maped as "F1" or something replacing the original "Quicksaving" key) which shows a "The server is trying to save, Please leave the game and reconnect the Server in 5 seconds" message to everyone and kick all "mercenaries" after a few seconds. After all "mercenaries" are gone, the server then automatically save the game via the original in-game functions. This should avoid any saving issues on multiplaying, since as explained, if no one else is connecting to the server, it equals to a single playing. And Saving is Always done when the server is "Single-playing". After the save is complete, the server can be seen again on the server list, and those "mercenaries" are forced (or "invited" with a yes/no option) to reconnect to the server and continue their game. Similarly the server can press "Multiplayer Reload F2" to reload his game by the latest save file (though not recommended in Multiplayer mode) or if the server player is killed (and the game inevitably auto-reloads ), all "mercenaries" are immediately kicked and after server finishes its reloading, they're forced (or "invited" with a yes/no option) to reconnect to the server to continue their game.
As you can see, such game mode avoids most issues on multiplaying (saving can be done), and preserved the most game content (doing quests and DLCs together, the Main Player runs the quest script and the Mercs are teleported near the MP via a timed script that checks distances regularly ). The program development is also made easy( much easier than what you've planned to do, in my understanding, making it an MMO ).
Forgive me if I'm still not explaining the above things well. If any questions can make them clearer, just ask them.
Basic functions needed:
Client: 1.Saving current Character into a simple local txt file, not really necessarily DB since the information is pretty neat and small itself, and should be stored locally;
2.Able to receive invitations ( see below );
Server:1.Kick Players;
2.Check Player Distances and Teleport them if they're too faraway or in other cells (Clients should be able to handle teleporting between cells); Check and Teleport can be done either by Timed Scripts/ A function called by a mapped key/ A function called by a mapped key with a delay before start checking and send a message "Get Closer or Get Teleproted!"
3.Mark the IP of playing Clients before saving/reloading and send them invitations after finishing it;
That's all! So simple! If you don't use the Invitation mechanisms in the Alpha Test, it's even simpler! As long as you finish NPC/Monster sync, the game will be very playable.
Time Stage: Right after NPC/Monster sync is stable.