oosyrag's Forum Posts

  • https://www.scirra.com/manual/174/multiplayer

    [quote:dnm45pzo]Send message

    Send a message to a specific peer with a given reliability mode. Peers can only message the host (and the Peer ID field must be left empty), but the host can send a message to any peer. Message tags can be used to identify messages for different purposes, such as "chat" or "gameplay-event". The message must be a text string, but could also be JSON data such as from an Array or Dictionary AsJSON expression; however be sure to avoid wasting bandwidth. The order messages arrive, or whether it is guaranteed to arrive at all, depends on the reliability mode.

  • https://www.scirra.com/tutorials/906/mu ... oom/page-4

    Upon joining a room, you can check if you are the host or not. If not, increment the room name/number and try again.

    Idea just off the top of my head, I haven't really explored the multiplayer object myself.

    Edit: There is a request room list action. You can use that to make sure you aren't joining a room that exists already.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The z depth of any given x/y will always be the same as the total depth of the array, even if there is no data in the cells. An empty cell will contain 0 though, so you can make a function loop to check how many cells in that particular row/column are not equal to zero and return the result.

  • Don't be afraid of arrays! They are basically just spreadsheets of data. Extremely useful.

  • I don't believe non-visible sprites should have any impact on fill rate, unlike "visible" transparent pixels. Layers is one fairly clean way to do menus, and you can do some nice effects with blend modes using this method as well.

    I generally only use separate layout menu for things like the main menu or transition menus between other layouts, as loading time can be an issue.

    Spawning menus also work well if you are more comfortable creating it in the event system rather than putting it together in the layout view, but I find this method slower (in terms of programming and creation) than just placing the objects in the layout view. Dynamically creating menus (and anything else) is usually best in cases where the content can change or is otherwise not always the same, depending on the situation. If your menu is static and will be the same every time, it is probably better to use the layout view.

  • Problem Description

    OR block with two conditions referencing variables does not work - acts as AND block. Ref: viewtopic.php?f=178&t=170213

    Attach a Capx

    https://www.dropbox.com/s/pym3zfv9cu2xp ... .capx?dl=0

    Description of Capx

    On Start of layout, text should change to "Success!" if either GlobalVariable > 0 (Currently true) OR InstanceVariable <0 (Currently False)

    Steps to Reproduce Bug

    Preview, then disable/change InstanceVariable condition then preview

    Observed Result

    Text does not show "Success!".

    Expected Result

    Text should show "Success!", as one of the conditions in the OR block is true.

    Affected Browsers

    • Chrome: Yes
    • FireFox: Not Installed/Unknown
    • Internet Explorer/Edge: Yes

    Operating System and Service Pack

    Windows 10 x64

    Construct 2 Version ID

    R224 64 Bit

  • Confirmed this does not work as intended in v221.

    https://www.dropbox.com/s/pym3zfv9cu2xp ... .capx?dl=0

    When the second condition is disabled, or the instance variable changed to make the statement true, it works. As it stands, the text box does not change.

    Edit: Also broken in v224

  • Scaling is not usually a big consideration in terms of performance. Graphics memory limitations are generally the greater concern. If yor game can afford the memory footprint of higher resolution graphics, go for it!

    As always, best to check and confirm your output looks as desired on all platforms you are targeting.

  • It has to do with video memory. And yes you should keep that in mind as much as possible, for everything!

    https://www.scirra.com/blog/112/remembe ... our-memory

    https://www.scirra.com/blog/87/under-th ... onstruct-2

  • https://www.scirra.com/tutorials/73/sup ... reen-sizes

    http://iosres.com/

    Scale inner and outer are your best bets for removing letterboxes.

    For your hud - you can dynamically set the position of hud elements using viewport expressions.

    https://www.scirra.com/manual/126/system-expressions

  • If you have an origin, imagepoint, or placeholder object in the center of the player sprite, you can use that point to check if it is overlapping the ladder sprite. If it is, then at least 50% of your player sprite should be on the ladder.

  • The simplest way would be to make the unique player the host. If you join a game, you will be part of the team, if you host the game, you will be solo.

  • Use the system layer expressions. For example you can subtract viewportleft from player.x to get the player's position relative to the viewport.

    https://www.scirra.com/manual/126/system-expressions

  • The first two problems are related - to set the origin frame, you would use the action Block - Set originalframe to Block.AnimationFrame.

    The swiping was more complicated than I expected without Families (I'm assuming you're using the free version of C2), so I've put together an example with comments here (with help from R0J0hound) -

    https://www.dropbox.com/s/ui33osmgp9tlq ... .capx?dl=0

    The next thing to figure out would probably be how to handle looping - I've included a bit for when newcolor is higher than the amount of animation frames you have, then it will loop back by using % (modulo). I didn't add that for when you tap the colors though - so if your color tries to change to a color higher than the number of animation frames you have, it will just get stuck.