Anyone using C2 multiplayer to build a persistent world?

Discussion and feedback on Construct 2

Post » Sat Mar 07, 2015 8:38 pm

rexrainbow wrote:@Televangelist

Since firebase is a database, point a) is possible. For point b), it is also possible because that firebase allows users to monitor the changing of values.
But these features would not be easy to put into project directly. Maybe it needs some custom plugins for specific application.

My plan is to build social features (friend lists, private messages, message board, etc...) first, since these might be general for most multiplay games.
BTW, firebase is one of possible backend solutions, so it might have another better solution than firebase. Surveying these solutions is another important work, IMO.


Understood. I'm still searching for a guide out there that breaks down which database types are suitable for which sorts of games... if I can't find one, I'll probably create one. :)
B
6
S
1
G
1
Posts: 91
Reputation: 900

Post » Mon Mar 09, 2015 11:34 pm

Televangelist wrote:Very interesting, CV!

@rexrainbow -- I'm curious, for building a persistent world, do you think Firebase would be well-suited for:

a) the database of player characters' statistics and inventories

b) tracking all the various events going on in the world -- which NPCs are happy, which ones are angry, what time of day is it, etc. etc.

...or c) both of those?

Looking at your example and trying it out on multiple PCs I was impressed with how well it worked for that purpose.

Just trying to make the right decisions early on in my project so I don't end up having to redo major things down the road. :)


I currently am learning the firebase system of handling files to do part A of your question. Using CSV's I am attempting to have the player download their CSV off the firebase and use that to handle all their inventory. So when the game loads and the player logs in it will call firebase

for var player name = MyUsername

call order by key MyUsername; == str("MyUsername"&Character.CSV)

Then with that CSV file Pull any needed data for that one object in this instance my character

",Weapon,Body,Head,HeldItem
AA,Lv1WS,Lv1BClok,None,Potion3

Then you will have an array (Or another CSV which is my aim) with all your items listed.
",ItemName,Attk,Speed,Value
Lv1WS,Level One Wooden Sword,3,5,20 Gold
Lv2WS,Level Two Wooden Sword,6,4,25 Gold
Lv1SS, etc etc etc"

This way each item of your character CSV can have links to the master for its information so long as the row name is the same as the string of that item. This should work for any needed data and to save you having to call the masterCSV every time you need something just make variables with a value from that masterCSV

So you can make a variable for the damage you deal when you hit something like Var Attack == masterCSV.At(CharacterCSV.At("AA","Weapon"), "Attk)"

Then when you hit something just set enemyHealth == enemyHealth - Attack

I wish I know code to more esaly say that but that is why I use C2 lol. :oops:

tldr
Login>Call CharacterCSV>Use that to reference a MasterCSV(the .At of first as the row name of second)>make variables based off that call for faster processing
"Were all mad here. I'm mad, your mad." "How do you know I'm mad?" Asked Alice. "You must be" Said the Cheshire Cat. "Or you wouldn't have come here"-Lewis Carroll: Adventures In Wonderland
B
6
S
2
Posts: 113
Reputation: 1,220

Post » Tue Mar 10, 2015 3:07 am

@CrazyVulcan

Static data might put into C2 exported folder.
In this demo this big map is stored in csv format, put at event sheet. Or user might put at external file, read by AJAX.
B
104
S
25
G
215
Posts: 4,288
Reputation: 123,088

Post » Tue Mar 10, 2015 9:12 am

@Televangelist

I classify the requirement of multiplay in 4 types in this table. Does it make sense?
B
104
S
25
G
215
Posts: 4,288
Reputation: 123,088

Post » Wed Mar 11, 2015 6:53 pm

Rex, that makes a lot of sense to me, thank you! I'll share that table with the C2 Multiplayer discussion group, I think people will appreciate it.

I'm guessing my game will be a mix of the 'action' and 'MMO' types you describe. It's an action game (gameplay similar to Zelda or Mario) in a persistent world, but every screen of the world is a different C2 layout and the game world itself will not be centrally hosted (you're basically singleplayer until you move into a section of the world at the same time as other people, at which point it will be peer-to-peer hosting via the official multiplayer plugin) with the clients pinging a central database for both global variables (who controls Castle A, what time of day is it) and each player's specific data (what's in your inventory, do NPCs like or dislike you).

Just like CrazyVulcan is discussing for his project, those 'calls' should be fairly simple, I think... the main thing I worry about is making sure changes are synchronized properly and not missed or handled out of order.

For these tasks, how should I choose between AppwarpS2, Photon, and Firebase? Is there a strong advantage to one over the other? Are they equally easy to integrate into C2?
B
6
S
1
G
1
Posts: 91
Reputation: 900

Post » Thu Mar 12, 2015 12:45 am

@Televangelist

Ran on a dedicate server with official MP plugin I thought. But MP might not handle multiple layouts currently.
B
104
S
25
G
215
Posts: 4,288
Reputation: 123,088

Post » Thu Mar 12, 2015 10:44 am

Televangelist wrote:...I can't be the only one?

... you don't because i try to do the same :D

I work on a Open World Sandbox MMO with one big map (outworld) and a housing system (player can build and own) and even more. It works with a lot of workarounds. For example: to simulate the houses i open for each house a new tab in browser, the player on the outworld get disconnected from it and auto join the new created room. If no one is in the room after some minutes the "room" - tab close automatically to save server ressources. I have a dedicated Windows Server (2008R2) with Google Chrome and a master host for all rooms so that should be no problem.
B
7
G
2
Posts: 5
Reputation: 775

Post » Wed Dec 07, 2016 7:25 pm

Bump. I'm back! where is everyone at on their multiplayer projects?
B
6
S
1
G
1
Posts: 91
Reputation: 900

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: rexrainbow, Yura G and 7 guests