kidswithcrowns's Forum Posts

  • 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!

  • > Most things that worked in C2 will work fine in C3

    >

    >

    >

    > I'm picturing 3 objects

    > 1. Laserhead (invisible sprite)

    > 2. Lasertrail (tiled BG)

    > 3. Reflective Surface (Sprite)

    >

    > Have the lasertrail and the laserhead in a container, so that each time a laserhead is created, a lasertrail is made along with it

    >

    > Then just continuously set the angle and width of the lasertrail to the laserhead

    >

    > Each time a laserhead collides with a reflective surface, you can spawn another laserhead and set it's angle to the inverse of whatever the first laserhead's angle was

    >

    > Should be enough to get started. Let me know if you need more detail!

    Thank you for your help! I tried it and could use some more detail. Like How does the laserhead work? Like does it have bullet behavior or is it stationary like a pre defined path for the lasertrail. Also I had trouble in terms of setting the width of the lasertrail to the laserhead. I only know how to make the laser trail the same width as the laserhead, but I don't know how to set the the width to the laserhead, i.e. the width spanning from where it spawned to its current location (assuming that's what you're telling me to do, I hope I'm not misunderstanding?)

    Thanks again, sorry if I'm dumb.

    Yeah I was picturing the laserhead moving via bullet behavior

    For setting the width of the lasertrail, there is a handy expression you can use called distance() which calculates the distance between 2 locations. You can use it to set the width of the trail to the distance between the trail's origin all the way to wherever the head is

    No problem! Any more questions, feel free to ask

  • Thank you Eleanor, it worked!

    For anyone else trying to achieve this effect, here is a sample cp3:

    drive.google.com/open

    important things to note:

    fullscreen scaling mode is OFF

    "PARA" layer, which holds the coversprites, is 0 x 0 parallax, 100% scale rate

  • Most things that worked in C2 will work fine in C3

    I'm picturing 3 objects

    1. Laserhead (invisible sprite)

    2. Lasertrail (tiled BG)

    3. Reflective Surface (Sprite)

    Have the lasertrail and the laserhead in a container, so that each time a laserhead is created, a lasertrail is made along with it

    Then just continuously set the angle and width of the lasertrail to the laserhead

    Each time a laserhead collides with a reflective surface, you can spawn another laserhead and set it's angle to the inverse of whatever the first laserhead's angle was

    Should be enough to get started. Let me know if you need more detail!

  • Store the variables in global variables

    Then, once the player has gone online, send messages to the host containing the variables

  • Hi, I'm trying to use the tilemap object to create my map and I want to add animated water

    I've thought about:

    -animating 9 patches. But this would mean I couldn't make water shaped in anything other than a rectangle

    -animating a tilemap. The problem is the tileset is 16x16, so there would be virtually no instances of repeating tiles, which I understand would almost negate the tilemap's efficiency?

    -making a giant sprite for the water. I've read that giant sprites are usually no good, but are they ever the best option?

  • Hello,

    I've got a problem with the tween behavior.

    I set up a tween behavior that works when I press a button but with something else, like a sprite overlaping an other sprite, it doesn't work. I tried multiple simple conditions but it only works with input like a button pressed. Is it normal ?

    If you're using a condition to check if a sprite is overlapping another, it's likely that condition is repeatedly triggering the tween action, essentially constantly restarting it and never letting it begin

    Unless you're adding an AND condition that checks to see if the tween with the appropriate tag is currently NOT running

  • >

    I want to do it with my keyboard not the mouse

    on (KEY) pressed

    --+is timer "dashwindow" running?

    ----> Dash

    --+else

    ---->start timer "dashwindow" for 1 second

    dashwindow can be adjusted to whatever you want

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • From the manual construct.net/en/make-games/manuals/construct-3/plugin-reference/multiplayer

    LEARNING TO MAKE MULTIPLAYER GAMES

    Designing Multiplayer games is challenging. It is essential to follow the introductory tutorial series to gain an understanding of how to use the Multiplayer object correctly. You are likely to struggle if you try to skip ahead and start making a game without fully understanding how various aspects of multiplayer games work. Mistakes can also result in degraded gameplay quality, with unnecessary lag.

    The four introductory tutorials are:

    Multiplayer tutorial 1: concepts

    Multiplayer tutorial 2: chat room

    Multiplayer tutorial 3: pong

    Multiplayer tutorial 4: real-time game

    (Note these tutorials refer to Construct 2, but the principles are the same.)

    You can also find examples of the Multiplayer features by searching for Multiplayer in the Start Page.

  • For some reason, I'm having these weird sprite rendering issues that randomly appear on certain sprites. I have no idea whats causing them.

    Subscribe to Construct videos now

    This happens with pixel art

    If you go to your project settings and set Sampling to "Point" rather than "Linear" and set scale to linear integer scale it should fix. Also check the "pixel rounding" box