How do I make a multiplayer game that saves data for peers to reconnect to and continue progress?

Not favoritedFavorited Favorited 0 favourites
  • 2 posts
From the Asset Store
Progress\Loading Bar. Now Load you game like a Professional.
  • Hey Construct 3 folks! I’m super new (just a week into Construct 3) and trying to get multiplayer working for my RPG, starting with the Multiplayer Tutorial 3: Shooter Game. My big dream is a main server we (the devs) host that everyone can join, but I’m taking baby steps to get there and could use your help. I learn best by seeing examples, as event sheets or skeletons beat manuals for me. I’m working hard but multiplayer’s tough, and I’m hoping some human advice can point me the right way. I’d love to connect with RPG fans or other learners to chat and grow! Thanks ahead of time for helping a newbie out!

    What I’m Working On -

    I’m tackling two things to build toward that main server:

    Peer Saving (Tutorial): In the tutorial (you move a Hero, chat, point with a laser dot), I want peers to save stuff like their Hero’s position by telling the host, who makes it official so they don’t snap back to some random spot. Host saving works great, but peers are stuck, they load their data but the host doesn't and snaps them back.

    Main Server Saving (RPG): For my RPG, I want players to host their own games, saving their friends’ data (position, inventory, XP) so they can reconnect later. This should lead to our main server (always on, run by us) for bigger play. Players can pick our server or a friend’s game, with secure username/password logins.

    My RPG Dream -

    My game’s a grindy, top down RPG, think Zelda: A Link to the Past with exploring, grabbing resources (wood, ore), fishing, cooking (heals HP), crafting (using arrays), fighting mobs (they chase and respawn), and leveling skills. Multiplayer should:

    Save: Position, inventories, skill XP, ect (some stored in arrays, other variables).

    Logins: Username (shows up, like “SuperJoe”), password (kept secret, checked by server).

    Reconnect: Log in to pick up where you disconnected or start fresh, whether on our main server or a friend’s game or your own that you host for your own friends.

    Hosting: Anyone can host, saving peer data on their “world.” Our main server’s the big goal, always online for everyone.

    I’m all in for a dedicated server but need simple steps to start. I'm hoping that can be done here with Construct 3, glad I found the tutorial but I'm hoping maybe there are some kind experienced people out there willing to take some time to help!

    What I’ve Got So Far -

    In the tutorial, I tossed in Save/Load buttons to try saving the Hero’s position and username. The host saves and loads perfectly (everyone sees it, thanks to sync-object), but peers’ positions snap back to the host’s (some random spot from on-peer-connected). My changes are pretty basic, just a few events, easy to check, but multiplayer’s kicking my **** as there is limited examples it seems. I’m not sharing my .c3p since it’s straightforward and I’ve laid it out below, but I can send it privately if it helps or if anyone’s up for helping with my RPG’s multiplayer, would be much appreciated!

    Problem: Host saves stick, peers bounce back.

    Single Player Saves: LocalStorage with JSON for position, inventory, progress (it works, but I’m too new to explain the nuts and bolts).

    Multiplayer Wants: Save position, inventory, XP; secure logins; reconnect on our main server or a friend’s game. The main server’s the star, but player hosted games are a cool step.

    About Me -

    Construct 3: One week in, did the Beginner’s Guide, Multiplayer Tutorials 1-3. Built RPG stuff from scratch with the help of AI:

    Inventory/equipment (gear up for combat boosts, eat cooked for to heal).

    Mobs (variety, chase you, have aggro range, respawn, give XP).

    Fishing, cooking, woodcutting, mining, crafting (arrays for recipes).

    How I Learn: I’m a visual guy, show me a working example or skeleton, and I’m golden. Multiplayer logic (host vs. peer) and debugging are rough.

    Struggles: Getting my RPG multiplayer ready, figuring out how to reach that main server.

    How I’m Testing -

    Local: Two Brave browsers on Windows 10 (Construct 3 preview).

    Online: Hosted it, tried two PCs, but saving’s messy locally, so I’m sticking there for now.

    Questions -

    In the tutorial, how would you have the peers send their position to the host to sync it? Can you share a quick event sheet example?

    For my RPG, how do I let any player host and save peer data (position, inventory, XP) for reconnection, building toward a main server? What’s a newbie friendly server like Firebase?

    How do peers reconnect to saved data on the main server or a friend’s game? If the host dips, how do they restart with everyone’s stuff?

    Got any visual examples or skeletons for saving/reconnection that work for a main server or player hosted games?

    Are there any good tutorials or even documentation out there I may not know about?

    Big thanks for any tips, event sheet ideas, or server pointers! I know that was a lot and might be a bit vague but like I said, I’m a newbie, so keep it simple, like I’m five. A visual example would rock my world. We’re just starting out, not stuck, but we know multiplayer needs some human wisdom to get to our main server dream. If anyone wants my .c3p or is down to help with my RPG’s multiplayer, let’s chat! I’ll check back soon, excited to chat RPGs or Construct 3 multiplayer and build something awesome!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Instead of using a Personal server to record all of this data, you can use something like PlayFab or Firebase. I made a Tamagotchi style game years ago that saved player data in PlayFab.

    Construct Collection has most of what you need for this project including Photon Realtime/Chat for multiplayer netplay.

    constructcollection.com

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)