logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    Upcoming Socket.IO sneak peek

    Scheduled Pinned Locked Moved
    WIP and Showcase
    7
    28
    3.1k
    Loading More Posts
    • 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.
    • HamedH
      Hamed Admin
      last edited by Hamed

      gfycat.com/ComposedShoddyAssassinbug

      Left side is a web browser, right side is the hyperPad app. What you're seeing here is a real time chat application!

      Took 10 behaviours to build it:

      One behaviour to create the socket, and another one to connect to it:
      connection

      Output the text to the server:
      emit

      And listen to chat message event from the server:
      event

      1 Reply Last reply Reply Quote 1
      • HamedH
        Hamed Admin
        last edited by

        Thats unfortunate, the video got cut off. But the web browser types something and it immediately shows up in the app.

        1 Reply Last reply Reply Quote 0
        • MurtazaM
          Murtaza Admin
          last edited by

          What a terrible gif. It kept me in suspense then resets before it's resolved. You should never be a movie director.

          Why didn't you just upload it to youtube or something?

          1 Reply Last reply Reply Quote 0
          • HamedH
            Hamed Admin
            last edited by

            Don't yell at me

            1 Reply Last reply Reply Quote 0
            • DGames135D
              DGames135
              last edited by

              Soooooo can this be used to create multiplayer

              HamedH 1 Reply Last reply Reply Quote 0
              • HamedH
                Hamed Admin @DGames135
                last edited by

                @DGames135 Yes

                DGames135D 1 Reply Last reply Reply Quote 0
                • DGames135D
                  DGames135 @Hamed
                  last edited by

                  @Hamed like online multiplayer between two iPads

                  HamedH 1 Reply Last reply Reply Quote 0
                  • HamedH
                    Hamed Admin @DGames135
                    last edited by

                    @DGames135 Yes. You would create a server using socket.io, then you can connect two iPads.

                    DGames135D 1 Reply Last reply Reply Quote 0
                    • DGames135D
                      DGames135 @Hamed
                      last edited by

                      @Hamed OMG this will be the best Hyperpad update. When will this update comming? . Wait will this mean that when using the behaviour it will create a server???? 😍sorry so excited

                      MurtazaM 1 Reply Last reply Reply Quote 0
                      • MurtazaM
                        Murtaza Admin @DGames135
                        last edited by

                        @DGames135
                        No you need to create your own server.

                        The left side with the web browser is the server/client side. The hyperPad app i simply connecting to his server.
                        See the "Socket" behaviour with the url: http://localhost:3000? That's where the connection is being made. The localhost is his server (it's using local host instead of a real IP or web address because it's a test server running on his own development machine).

                        His server is running code to handle the chat. That's where the real part of all this is located. The hyperPad behaviours simply connect to it and know how to respond.

                        This isn't an easy behaviour to use, and isn't for beginners. This is why we held off on adding it for so long, because I firmly believed our community was not ready. Even still, I doubt it will be used much.. But the community keeps asking for it, so we decided to make it happen. Hopefully some cool stuff comes from this.

                        1 Reply Last reply Reply Quote 0
                        • HamedH
                          Hamed Admin
                          last edited by Hamed

                          That being said, the server was only 20 lines of code and was also super easy to setup. I just used the example they have on socket.io

                          I should also mention that all networking behaviors are on developer tier, similar to the open URL behavior.

                          Jack8680J 1 Reply Last reply Reply Quote 0
                          • Jack8680J
                            Jack8680 @Hamed
                            last edited by Jack8680

                            @Hamed I see a get array value behaviour... is this a networking behaviour or an actual behaviour? I'm currently working on implementing A* pathfinding into a project, but if arrays are in the next update and don't need developer, I think I'll wait for that... also, does socket.io mean we can have direct player to player connections where one player hosts a server?

                            HamedH 1 Reply Last reply Reply Quote 0
                            • MurtazaM
                              Murtaza Admin
                              last edited by

                              arrays are not a networking feature. they will be available to everyone in the next update :)

                              1 Reply Last reply Reply Quote 0
                              • HamedH
                                Hamed Admin @Jack8680
                                last edited by

                                @Jack8680

                                As well as dictionaries (basically attributes but as a standalone behavior)

                                There's also bunch of other cool new behaviors related to arrays. We'll update the roadmap later today with more details.

                                Jack8680J 1 Reply Last reply Reply Quote 0
                                • Jack8680J
                                  Jack8680 @Hamed
                                  last edited by

                                  @Hamed by networking, do you mean you need a server for it or is it just a category for behaviours?

                                  1 Reply Last reply Reply Quote 0
                                  • MurtazaM
                                    Murtaza Admin
                                    last edited by

                                    Both. You need a server, and these are just a category (or subcategory) of networking behaviours.

                                    These "networking" related behaviours (Socket, and HTTP requests) will connect to any server outside of hyperpad. This means you need a server, and code running on that server to send/receive and compute data.

                                    We don't handle any of the server side stuff for you at all. That's on your end.

                                    Jack8680J 1 Reply Last reply Reply Quote 0
                                    • HamedH
                                      Hamed Admin
                                      last edited by

                                      Updated roadmap: https://trello.com/b/EmwcGN1T/road-map-and-known-bugs

                                      iTap DevelopmentI 2 Replies Last reply Reply Quote 0
                                      • iTap DevelopmentI
                                        iTap Development @Hamed
                                        last edited by

                                        @Hamed wow I just looked at it...looks awesome!!!!!! When will it be out????!!!!!

                                        1 Reply Last reply Reply Quote 0
                                        • Jack8680J
                                          Jack8680 @Murtaza
                                          last edited by Jack8680

                                          @Murtaza never mind, I misread your previous post, I thought you said arrays ARE a networking behaviour but you said they AREN'T lol

                                          1 Reply Last reply Reply Quote 0
                                          • iTap DevelopmentI
                                            iTap Development @Hamed
                                            last edited by

                                            @Hamed can an array be saved to file?

                                            MurtazaM 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post