CBAM - Cloud Based Asynchronous Multiplayer

Purzelkater

cat as cat can
Veteran
Joined
Feb 20, 2016
Messages
86
Reaction score
69
First Language
German
Primarily Uses





CBAM V0.9.2
by Purzelkater







Introduction
The CBAM system gives you the ability to create asynchronous multiplayer games with server based savegame storage. If you don't know what asynchronous multiplayer means, take a look at the FAQ.
To use CBAM you need - beside the RPG Maker MV of course - a server to store and execute the php scripts as part of the CBAM system.


The CBAM system is based on my first plugin, the Cloud Manager but with plenty of enhancements.


I highly recommend you to take a look on the tutorial thread.


Installation Instruction
The Cloud Based Asynchronous Multiplayer system comes with 3 files:

  • cbamm.php - The CBAM Manager script for server side managing
  • cbam.php  - The server script, handles all plugin functions
  • CBAM.js   - The RPG Maker plugin


  1. Open cbamm.php on an editor and change username and password for login.
    You can skip this step and use the default values (username Admin and blank password).
  2. Copy cbamm.php and cbam.php on your server.
  3. Open a browser and call cbamm.php. Now you should see the CBAM Manager login screen.
    With the first call the script should create your CBAM database (cbam.sqlite).
  4. Login and hit the "Initialize database" button on the left side menu to create the database tables as needed.
  5. Copy CBAM.js to your js/plugin folder and add the plugin on the PluginManager. Then setup the plugin properties.













For further instructions look at the tutorial thread!


IMPORTANT: As long as the CBAM plugin is active your game needs a semi-permanent connection to your server to run.
HINT: If you have a server connection as needed but CBAM won't work, check the permissions of your scripts and database file.


To use CBAM on your game you need a server, with some requirements:

  • >=PHP 5.6 (maybe other versions would work but not tested)
  • SQLite3 database driver
  • PHP PDO support for SQLite (pdo_sqlite)



For simplification the CBAM system is using SQLite database for storage instead of MySQL. SQLite needs no special database server setup and uses just a simple file (you can easily save for backup). But if you like - and for security reasons - it should be easily to change to other database backends.


Credits

  • Tsukihime for the incredible HIME Party Manager and some hints behind
  • izyees and mrcopra for their help with common events
  • Yanfly for inspiration on external links
  • Iavra for giving me some knowledge about plugin writing
  • GameDev@YouTube for all the helpful tutorials
  • quackit.com for the CBAM Manager HTML base template
  • pixabay.com for free image resources





Screenshots
Well, you can see a lot of screenshots on the tutorial. But I can show you a little video of how CBAM works. Beware, it's made with an old beta version of CBAM and just shows the quicksave/timer function.









Frequently Asked Questions

Q: Is this some kind of MMO?
A: Definitive no. Period. A basic feature of a MMO (or just online multiplayer) is, several player can join and play the game simultaneously. This ist not the intention for this plugin.


Q: What does "asynchronous multiplayer" mean?
A: This type of game can be described as a turn-based multiplayer gameplay between two or more players that can check in and play their turn when it's convenient. Similar to play-by-mail games and, more electronically, play-by-email or play-by-post forum games.
Typical examples are trading card games or tabletop/board games.
   
Q: How will "asynchronous multiplayer" work on CBAM?
A: With CBAM all players concerned on a game will share the same savegame. Every player who joins the game will load the same, latest saved game. Although several player can join the game and load the same savegame on the same time, only one of them has the ability the save the game too. Moreover every player can have it's own actor on the game.
Important: After the game was joined and the savegame was loaded, all players "play" their own game stand-alone. One player doesn't notice any others until the game was saved and new loaded.


Q: What's the matter with this party modes?
A: The simplest mode (0=none) is just a savegame sharing. On this mode, CBAM will not make any change on players party. However, it's the best way for a real multiplayer experience too. But later on that.
With the re-group mode (1) the player party will new sorted every time a player joins the game. The members of the party are the same but the players actor will become the leader (first person) of the party.
Only one actor (2) goes one step further and kicks all actors from the player party except the players one.


Q: Your where talking about a "real multiplayer experience"?
A: Yes, CBAM can highly benefits from the incredible HIME Party Manager. If you add this plugin to your project too, every player can have it's own player party. Every player can be on a different place on a different map but other players can see them there. And players can merge there parties too. CBAM can activate the current player actor party every time a player joins the game.


Q: Why cloud based?
A: Well, of course you could save a game and send it to the next player like on good old play-by-email games. But CBAM makes it easier. All savegames are stored on one server. Wherever you are you can play the game immediately (if you have an internect connection). And without server side storage keep the savegame up-to-date would be a pain, believe me.


Q: What's the difference between active, passive and guest mode?
A: Only one player can be an active player at the same time in the game. Not before this player has left the game (or the admin has taken this state) another player can join the game as an active player. Only the active player has the ability to save the game - even if you try to execute the save function, the server will check if you are realy the active player right now.
Beside the active player several other players can join the game at the same time but they are all passive players then. As a passive player they can't save a game and have lesser options on the ingame command menu. But as passive player you can move around the map as you like (by default).
A guest is a user who has joined the game without login. As guest has no access to the command menu (only back to title is an option) and of course a guest can't save a game. Like passive players there can be several guest on the game at the same time.
It's possible to disable passive player and/or guests.


Q: Who needs an admin?
A: By default an admin has some special rights on the game. As an admin you can kick the active player (e.g. if the game was crashed). If the player has joined the game at this time he becomes an passive player.
As an admin your are able to restart a game (overwrite the savegame with a new once) or rewrite the server settings of a game. Because the admin state can be checked on the game it can be used on game events too, if you like.


Q: What's about security?
A: We are talking about cheating here. Well, RPG Maker MV was not made to be a high securtiy multiplayer engine. And with some knowledge it's easy to get a whole bunch of information from a game. And I'm sure CBAM has security gaps as big as an aircraft carrier in this case. But like a game on a table with friends, I hope others will play fair.





Additional Notes
The plugin overwrites the title menu, command menu and load/save scene. So have a look at this, if you want to customize them with other plugins.


Terms of Use
CBAM files are distributed as is under the creative commons license CC BY 3.0 (Attribution 3.0 Unported) for free.
You are free to share, copy, redistribute or edit them for any purpose, even commercially under the following terms: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


The pictures as part of the CBAM Manager script are inline images under the creative commons license CC0, free to use for all purposes.


Download / Changelog
CBAM V0.9.0, 2016-03-19: First release


CBAM V0.9.1, 2016-03-29: Small bugfix, only to correct console output


CBAM V0.9.2, 2016-04-02: New load and reworked save command for easy active player switching
 
Last edited by a moderator:

Purzelkater

cat as cat can
Veteran
Joined
Feb 20, 2016
Messages
86
Reaction score
69
First Language
German
Primarily Uses
I recently have uploaded a new version of the CBAM plugin. Beside some stability improvements I have added a new save and load function on the in-game command menu.


There are 3 new options on the plugin for this, so first you must initialize your database again to expand it. - Just initialize, don't clear!


With the new functions you can determine a player will automatically become passive after saving the game with the "save" command on the command menu. If you want this can call a common event also (maybe to inform the player he is in passive mode now).


As a new option you can enable a "load" command on the command menu if you are in passive mode. If a player loads a game with this command and no other player is active right now, the player will be switched to active mode.


So with this new functions you can easily switch between active and passive mode just by save and load on the command menu. It's no longer necessary to end the game and re-login again.


Here is a little video to explain this:

 

Jomarcenter

jomarcenter-MJM
Veteran
Joined
Apr 24, 2012
Messages
1,243
Reaction score
183
First Language
ENGLISH
Primarily Uses
RMMV
this is some kind of an possible system to make an arg or a different version of twitch plays here...
 

Purzelkater

cat as cat can
Veteran
Joined
Feb 20, 2016
Messages
86
Reaction score
69
First Language
German
Primarily Uses
Well, I know about issues with xampp on the first version, but it should work now. Can you give me a console log and what's wrong?


Kind regards,


Purzelkater
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
This is pretty cool. It's strange with the delay and such and clearly not meant to be fluid or um by the ms updated etc. But still cool.
 

Wren

Veteran
Veteran
Joined
Jun 25, 2013
Messages
94
Reaction score
16
First Language
English
This is pretty cool.


With this system can I set up a game where players log in and do things on a turn by turn basis, which is exactly the sort of project I want to start!


Thanks so much for this!
 

so1us

Villager
Member
Joined
Dec 12, 2015
Messages
18
Reaction score
5
First Language
English
Hi Purzelkater,


Just wanted to say that this sounds like a fantastic plugin, which enables a whole host of possibilities with what can be done with the engine. Thanks for the time and effort and for opening it to the community. While I'm fairly far away from making use of this in my game, I'd definitely love to give it a shot and see how it works and what all can be achieved!
 

Wren

Veteran
Veteran
Joined
Jun 25, 2013
Messages
94
Reaction score
16
First Language
English
We may need to see if someone besides Purzelkater can look at this, because my project is basically centered around being 6 player.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Managed to find a way to hang a bed cover over my window. So no more being toasted alive in the afternoon!:kaoswt2:
So, uh, has anyone tried buying any resources from KokoroReflections? Because I've been looking for a 'buy' button on the site for like 10 minutes now and can't find one.
Any also thought it's too cringy to put the word "and you" in your credit as a special thanks?
Cause that's what I thought...
Everyone in the US right now: Please stay safe.
Symphony Celestia: Prophecy of the Falling Stars RPG Maker music pack WIP. Symphony Celestia is a new series that focuses on symphonic and orchestrated music to tell a story. Each story will include compositions that make up that story from beginning to end. Themes include: Battles, adventures, character themes, etc. Below is a video preview to the first story.

Forum statistics

Threads
97,980
Messages
948,321
Members
129,244
Latest member
Noxtrasave
Top