CREATOR4's Forum Posts

  • I know I need to use the "Send Message" action, but I don't know when/where to send it. At what point do I need to send the message, at every generated piece of the level (prebuilt scenes) or at the beginning or the end?

    This is up to you. You could hypothetically send the message at any point. In the beginning, or when each piece is created, or at the end

    Do I send the message from the peer to the host, or do I broadcast the message from the host to the peer?

    As far as syncing, this doesn't matter. One player just needs to create the level layout, and the other player(s) need to receive that level layout. It can be the host or the peer that creates the layout and sends the message, although generally it makes sense to give the Host more control over the game. So Host -> Peer(s) is fine

    What exactly do I send?

    Here's an example with 2 methods. One is sending the entire layout at once, and the other is sending the layout piece by piece.

    dropbox.com/s/9xck9lejimkq9rv/Multiplayer%20Layout%20Sync%20Example.c3p

    You could also send a seed if you have your layout construction set up that way. This would be as simple as sending the seed in a message

  • You have 16 possible combinations, right?

    Frame 1 - Frame 1,2,3,4

    Frame 2 - Frame 1,2,3,4

    Frame 3 - Frame 1,2,3,4

    Frame 4 - Frame 1,2,3,4

    Think of these as 4 sets of 4, where the first sprite's frame determines the set from 1-4, and the second sprite's frame determines the number within that set from 1-4

    Since you have 16 possible combinations, what you can do is use Advanced Random to pick a random number from 0-15 (16 digits, starting at 0) without repeating. You can then translate this number into a two different digits. One is a set number from 0-3 (4 digits, starting at 0) and the other is a number within that set from 0-3

    For example, let's say you ask Advanced Random for a random number between 0 and 15 and it gives you 5. We can translate this into two numbers.

    First, let's get the set number. To do this we divide the random number by 4 and round down. This will give us a number that is either 0, 1, 2, or 3. This will tell you what frame the first sprite should be.

    floor(5 / 4) == 1

    So we are in set 1. The first sprite's frame is 1.

    Then, let's find out which frame within that set we are. To do this you can use modulo to find the remainder after dividing by 4. This will also give a number from 0-3.

    5 % 4 == 1

    So this is the frame for the second sprite. Frame 1.

    So 5 translates into Frame 1, Frame 1

    0 would translate into Frame 0, Frame 0

    floor(0 / 4) == 0

    0 % 4 == 0

    1 would translate into Frame 0, Frame 1

    floor(1 / 4) == 0

    1 % 4 == 1

    4 would translate into Frame 1, Frame 0

    floor(4 / 4) == 1

    4 % 4 == 0

    11 would translate into Frame 2, Frame 3

    floor(11 / 4) == 2

    11 % 4 == 3

    15 would translate into Frame 3, Frame 3

    floor(15 / 4) == 3

    15 % 4 == 3

    Each number from 0-15 will give a unique combination of numbers for Sprite 1 and Sprite 2

    Let me know if you have any questions!

  • You can use Multiplayer's "Send Message" action to send the seed

    Also, instead of using remote preview, you can hold Alt/Option and click Preview Layout twice to open two preview windows

  • Pretty fun, even for how simple it is

    I'd like to see some of the NPCs have more complex and difficult AI

  • Make it so that the landing animation cannot be interrupted by the moving animation

    Also make it so that once the landing animation is over, the character can resume playing moving animations

  • I've been experiencing a gradual slowdown as well. I think there's a memory leak in the latest C3

    May not be related to your problem tho. Can you run the preview in debugger and see if there are any objects being created infinitely?

    Also, do you have a lot of loops?

  • Here are two different ways to make a camera

    1. Give the player's character the ScrollTo behavior

    Simply give the player's character the ScrollTo behavior. This is quick but is limited.

    2. Give a separate invisible camera object the ScrollTo behavior

    Make a an invisible sprite object for your camera. Give it the ScrollTo behavior. Now make the camera follow the Player's character

    --

    Regarding your health bar and item, check the layers' parallax settings. A parallax setting of 0 x 0 will result in objects that never move in relation to the camera- they stay fixed in 1 spot on the screen

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    If every software had it I'd probably be better off tbh

  • Argh

    https://i.imgur.com/elUMEZC.mp4

    Great aesthetic. Do you mind sharing where you got the artwork for the ground?

  • Hi,

    I'm trying to create a word game and I need to store basically the entire dictionary. I'm trying to check if words exist at run-time

    How can I do this?

    I downloaded a massive text file with 300,000 words, put it in a .json, and then loaded it into an array at run-time, but when I check if certain words are in the array it doesn't work

  • Sounds good I will give it a try and do some research.

    Im thinking Im going to run into a problem with sound effects. If I had sounds for player jumping, will other players hear it on their computer as well. I think I would have to make the sounds heard at a distance near the player.

    There is built-in audio-by-distance

  • Create a static variable. Set it to 3

    Set a recurring timer for 1 second

    Every time the timers goes off, subtract from static variable, then check if the variable is <= 0

  • Glad it worked

    If there are lots of projectiles I can imagine there's probably some low hanging performance-improvement fruit to pick

  • Got it

    Left of screen at 0.2 Zoom: ScrollX - ( (ScrollX - ViewportLeft("Clouds")) × (LayoutScale ÷ 0.2))

    1. Find the distance from center of screen to left of screen

    2. Find the ratio of current zoom to desired zoom by dividing them

    3. Multiply the ratio with the distance

    4. Subtract the new distance from the center of the screen

  • Hi,

    I'm trying to spawn things at the left of the screen. The problem is I want to know what the "left" of the screen once the zoom is, say, 1x. But I'm spawning them while the zoom is 0.2x

    I'm using scale outer full-screen mode