Trouble handling multiple characters on a multiplayer game!

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello!

    So I've trying to make a game which has multiple selectable characters and multiplayer and some good ol 4 player fun coop platforming fun.

    The thing is, I'm having trouble finding a way to make it so a character can be chosen by any of the 4 players, without having to paste the code for player 1 three more times!


    What I want is a system in which the puppet (character) can be puppeteered by any of the players, without having to paste the code for each player.

    I've tried many approaches without succes.


    Anybody has a clue from where to start, or perhaps a tutorial I can follow?


    The .mfa with only the character system can be found below, if that helps.

  • Setting up a new computer atm so I can't look at the code. I've done this in the past by having the base character/player manoeuvre an invisible shape/ block . I then use events/variables to map the characters skin and animations to the base. Even built a skeletal rig/system using this, which is quite useful, and posted on the forum.

  • Setting up a new computer atm so I can't look at the code. I've done this in the past by having the base character/player manoeuvre an invisible shape/ block . I then use events/variables to map the characters skin and animations to the base. Even built a skeletal rig/system using this, which is quite useful, and posted on the forum.

    I have a similar system which maps the skin to an invisible hitbox too!

    The problem is that I can't find a way to map the character's animations to it without doing the process 4 times!

    Example: currently in the .mfa all of the character's animations are mapped to the P1 hitbox, and what I'm looking for is a way to map them to the other players without having to map them individually with an exception for each player.

    Could you elaborate how you did yours?

  • Use a basic active object for each player character. A simple rectangle is often enough.

    To each Skin add a qualifier eg 'clothes'.

    To each Skin add a variable 'Map to player' and assign the applicable player number to it when the player chooses their appearance ie player one to 4.

    Run a fastloop for all objects with the 'clothes' qualifier which matches them to the position direction and animation etc of the base active object. If you look up Clickpuppet on the forum you can see how far this can be taken.

  • You might want to read the Please login to see this link. from Lacewing help file. It's for online multiplayer, not local multiplayer, but it should give you an idea of when to create and how to select specific ones.

    Also read Volnaiskra's blog about Please login to see this link.. It will explain selection, fast loop and foreach loops. Being aware of how selection and how code executes in order is crucial for a solid engine.

    Darkwire Software Lead Programmer (C++ & C#)
    Please login to see this link. | Please login to see this link. | Please login to see this link. | Please login to see this link.

  • Very simple bluewing players example, covers the absolute basics and some bluewing and fusion selection

    Features:

    • New player connection handling
    • Player disconnection handling
    • Smoothing from old position to current one (dead reackoning)

    Please login to see this attachment.

    File: Please login to see this attachment.

    ____

    As Phi mentioned above, also, help file is very important, covers many aspects of the ext and networking in general

    ____

    A copy and pasted discord message I keep linking to every time a person is new at Bluewing:

    The basics are

    • It's constructed as in Server > Channels > Clients
    • You need a server (a computer that hosts the server) the server can be hosted by making an application in Fusion via the Bluewing Server, Clients connect to the server, you can use a public server like dark-wire to do some very basic tests, later you will need to run your own server (believe me you will), servers have full control over everything, they can kick, ban, and disconnect clients, block messages, modify them, remove and create channels, rename clients, unicode lists..etc, and of course, you can store data in any way you like and Bluewing actually has a built in feature for that
    • Channels are kinda like rooms or think of it as a discord channel, just something that houses the clients, they have an ID and a name, it's highly recommended to prefix a channel name with the app name if the server is public one\gonna have multiple applications connecting to it
    • Clients (often called as peers) connect to a server, they can join channels, multiple even at the same time, just like you can do with discord, they have an ID and Name
    • Everything is based on sending stuff, Clients can send to other clients, channel (all clients) or server, Server can send to Client or Channel too
    • There are multiple types of messages, you can send integers, strings..etc, you can also send as binary for better separation and size
    • You can send or blast messages, send is reliable as the message will be sent and received reliably and in order, if not, the client may have disconnected due to ping timeout or for another reason, on the otherhand, blast is faster but may drop messages, suitable for things where you need to send stuff really fast and don't care about reliablity too much, like sending positions
    • Bluewing has it's own selection philosophy just like Fusion does with it's object selection system

    A good way to start is by making a simple chat application, there is youtube tutorial for that, after you watch it you start experiementing a lot and reading the help file, it's very important

    Game/App developer, artist and a community contributor.
    You can support my work on: Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!