kidswithcrowns's Recent Forum Activity

  • I believe this thread is about providing a tool to automatically upgrade old functions to new functions. This is different to deprecation.

    Just curious, will the old functions be removed entirely?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is it just me or does Ashley have a way with tutorials? I find his tutorials so easy to digest

  • I like to change the settings so that preview windows are opened as new windows instead of new tabs, and then

    1. Open 2 separate chrome windows

    2. Load project on both

    3. Run preview on both

    It's still kind of cumbersome. If you're only adjusting and testing code that happens on the peer's end, you can just leave the Host running while you tinker and re-preview the peer repeatedly

    C2 runtime doesn't require the host's window to be open, but for some reason C3 does. It would be nice if we could run the Host from a minimized tab again

  • Perhaps the idea board should reflect these numbers you're quoting? I don't see them there. I can only look at the numbers on left side. If you are implementing the good suggestions, that's excellent! :-)

  • Ahh I just realized I can use "On Peer Connected" in the peer logic rather than "On Peer Created"

    Thanks for your help! This will work

  • My first approach would be to have all npcs created and handled by the host, with their own events. Copy whatever events you need to initialize them and set up their behaviors. Smart use of functions will allow some event logic to be used by both peers and hosts, but it's generally best to keep them separate.

    To answer your question specifically, you can set a flag/variable during an on peer connected event to signal that the peer object is being created for a player. Otherwise, you can use on peer object created (with the condition flag = false) to differentiate for npcs.

    So you're suggesting I use a synced variable to check if newly created Peer Objects are NPCs or players?

  • Yes, but the peers use "On Peer created" to initialized players

    I'm looking for a way for the Peer to tell whether or not the Peer that was just created is a Player or an NPC

  • The reason the clamp isn't working is because you're using a local number to represent Max Jump Height

    Local numbers are reset to their default value each time the event they're nested in runs

    In this case your local numbers are "out in the open" under a group, so each tick the local number is reset to 20

    Change it to a static local number to solve this

  • Hello,

    I'm creating an MMO. Currently the players are represented by Peer Objects as in the Multiplayer Tutorials

    I'm wondering what the best way to add in NPCs is. There is a lot of logic already built specifically into the Peer objects, so these NPCs would ideally be Peer objects without players on the other end and run off the same logic already used for Players, simply by changing their "input" variable using host AI instead of keyboard inputs

    This is the big question I have:

    Is there a way to check, on creation, if a peer object was NOT made by a connecting player? This would prevent Players from treating newly created NPC Peers with their Multiplayer peerids (which they don't have) and would allow me to initialize the NPCs and Players differently

    Tagged:

  • Been going through all the multiplayer tutorials & documentation these days and everything's fine by now except the following. I cannot textually wrap my head around what is meant here and I would appreciate it if someone could explain to me what is meant by this:

    > The client value tag is used if the instance variable also corresponds to a client input value. In other words if a peer's client input value is set from that instance variable, setting the corresponding tag here allows the multiplayer engine to know they are linked. The host can use this information to reduce the latency when relaying the inputs to other peers.

    Normally syncing is done One-Way

    Host ----> Peers

    The host controls the game, what's happening, where things are, etc, and tells all the Peers.

    When you add a client value tag you are allowing the syncing to be done two-way

    Peer ----> Host -----> Peers

    The peer sends inputs to the host, like "the A key is being pressed", then the host uses that information to control the game, and then it sends "the A key is being pressed" to EVERY peer

  • Did you use a loop to check each tile's # and then change it to another tile. Because I'm pretty sure that would work

  • GeorgeZaharia

    what it does is if for example the window width is 855, then 855%2 equals 1, so it will set the window width to 855-1 = 854.

    what this does effectively is it lets you make the window size always be an even number without using any conditions.

    It's important for the window size to only ever be even numbers in pixelart games because origin points of sprites is always effectively between two pixels, so if you try to center it, it needs a pixel on the left, and a pixel of the right.

    if your screen is an odd amount of pixels then the sprite does not know in which pixel on the screen to render so it keeps shifting between the left and the right one and you get artifacts.

    Also be careful because if you import a sprite in construct 3 with an odd width or height, it'S origin point will be set on a pixel instead of between two pixels on that odd axis to make it centered, and that one sprite will get artifacts because it does not know where to render.

    I was also wondering why to use modulo instead of just screen dimensions. Good info. Thanks for sharing!

kidswithcrowns's avatar

kidswithcrowns

Member since 7 Sep, 2018

Twitter
kidswithcrowns has 1 followers

Trophy Case

  • 6-Year Club
  • Email Verified

Progress

7/44
How to earn trophies