Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Help
  3. How do I make a 2d game that's multiplayer?

How do I make a 2d game that's multiplayer?

Scheduled Pinned Locked Moved Help
2d-blocksmultiplayerquestion
7 Posts 3 Posters 1.9k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • NotJaldolfYTN Offline
    NotJaldolfYTN Offline
    NotJaldolfYT
    trusted helpers
    wrote on last edited by jeffreyrb03-gmail
    #1

    As the title states, how do I make a 2d game that’s multiplayer? i’m trying to make my game have clones of the players that will act as other players.

    👋

    Tyller_T 1 Reply Last reply
    1
    • NotJaldolfYTN NotJaldolfYT

      As the title states, how do I make a 2d game that’s multiplayer? i’m trying to make my game have clones of the players that will act as other players.

      Tyller_T Offline
      Tyller_T Offline
      Tyller_
      trusted helpers
      wrote on last edited by
      #2

      @jd131111 You use the multiplayer extension, creaticode has an example and if you want something specific I can provide a demo (though my methods of using stuff can be a bit elaborate)

      <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
      </div>

      NotJaldolfYTN 1 Reply Last reply
      2
      • Tyller_T Tyller_

        @jd131111 You use the multiplayer extension, creaticode has an example and if you want something specific I can provide a demo (though my methods of using stuff can be a bit elaborate)

        NotJaldolfYTN Offline
        NotJaldolfYTN Offline
        NotJaldolfYT
        trusted helpers
        wrote on last edited by NotJaldolfYT
        #3

        @tyller_ Okay, thank you 😄 i’ll try learning how to use it, if I need help, I’ll just comment on the forum about it 😄

        👋

        Tyller_T 1 Reply Last reply
        0
        • NotJaldolfYTN NotJaldolfYT

          @tyller_ Okay, thank you 😄 i’ll try learning how to use it, if I need help, I’ll just comment on the forum about it 😄

          Tyller_T Offline
          Tyller_T Offline
          Tyller_
          trusted helpers
          wrote on last edited by
          #4

          @jd131111 https://play.creaticode.com/projects/6613fb5b564fc287b0e8cfc2

          is the link, I have a project if you want variables synced across all clients (my project is formatted like an api where you just use custom blocks that you drag into any sprite in your project, and those are just used to send formatted broadcasts to interact with it)

          <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
          </div>

          NotJaldolfYTN 1 Reply Last reply
          1
          • Tyller_T Tyller_

            @jd131111 https://play.creaticode.com/projects/6613fb5b564fc287b0e8cfc2

            is the link, I have a project if you want variables synced across all clients (my project is formatted like an api where you just use custom blocks that you drag into any sprite in your project, and those are just used to send formatted broadcasts to interact with it)

            NotJaldolfYTN Offline
            NotJaldolfYTN Offline
            NotJaldolfYT
            trusted helpers
            wrote on last edited by
            #5

            @tyller_ How do I make a clone of the players model and make it go to the position of where the seconds player client, send it to the server, then send it to the first players client, updating the position?

            (also, how do I make the players model appear on clients?)

            👋

            Tyller_T 1 Reply Last reply
            0
            • NotJaldolfYTN NotJaldolfYT

              @tyller_ How do I make a clone of the players model and make it go to the position of where the seconds player client, send it to the server, then send it to the first players client, updating the position?

              (also, how do I make the players model appear on clients?)

              Tyller_T Offline
              Tyller_T Offline
              Tyller_
              trusted helpers
              wrote on last edited by Tyller_
              #6

              @jd131111 This one is when you add a clone to the game with the add sprite to game as shape block, it will run the “when added to game” hat block as that clone which is then spawned on all clients, also it makes it so whenever a new player connects to the game, it will spawn that clone for them and run the “when added to game” on that client example below
              (In this example assume that you set in the prepare for green flag hat block to create/join the same world, so everybody is connected to the same world)

              On green flag click /
              Create clone of myself with id (username)

              When I start as clone /
              Add this sprite to game as [rectangle]

              When added to game /
              log to console (clone id)

              when the first player (lets say their username is “playerone”) joins, it will log on their client “playerone”
              When the second player joins (lets call them “playertwo”) it will log in their console (playertwo’s console) the message “playerone” because the clone that the first player added to the game gets spawned on this players client and runs the when added to game block,the then both clients (playerone and playertwo) will log “playertwo” because playertwo’s clone is now added to the game (edit: and spawned on the other players client), I can make a demo project if this is too confusing (edit: you repeat this logic for all players, and a side note, the clones positions are synced when they spawn in, but to keep their positions in sync you have to use the method shown in the 2 player space shooter example by CreatiCode, where you rely on the sync set speed to move them)

              <div component="post/signature" data-uid="255" class="post-signature">Check out my chat room project so you ppl can not use forums as chat rooms! https://play.creaticode.com/projects/66f2e1dcd1be43d82b886fbd?version=1 <p dir="auto">
              </div>

              1 Reply Last reply
              1
              • ? This user is from outside of this forum
                ? This user is from outside of this forum
                Guest
                wrote on last edited by
                #7

                hi my name is gennesis i love yuo

                1 Reply Last reply
                -1

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • CreatiCode