oosyrag's Forum Posts

  • Use Array - Delete Index - Array.Indexof(CardYouWantDeleted)

  • Had some time to burn so I put this together if you're still interested - https://www.dropbox.com/s/of8uwu07mx2iq ... r.c3p?dl=0

    Load a csv or json file from local drive to import into a C3 array, and you can export again to json or csv.

    Basically does what rex's plugin does, without needing the plugin.

    It only works with 2 dimensional arrays though.

  • It is for interpolation for smoothing out jitter and/or packet loss.

    https://www.scirra.com/tutorials/892/mu ... pts/page-6

    Roughly speaking you can think of it as the engine having 80ms worth of artificial latency - all peers under 80ms will percieve the same level of responsiveness from the host, and the player/host ideally won't notice any network lag unless the actual ping (or time between updates) becomes greater than 80ms.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The simplest (recommended) way would be to use rex's plugin.

    The manual way to do it would be to make a few events to export and import csv yourself.

    You can use a loop for each element and the browser object's append to a file action, inserting commas and newlines in your loops where appropriate. To import it back in, you can parse the csv back in with tokenat. It is fairly straightforward, but probably not the easiest thing for a beginner.

  • It is indeed x>y>z (or z>y>x, depending on your point of view)

    It will start at X=0, Y=0, go through all the Zs. Then Y=1, and all the Zs again.

    So: (xyz order, 3x3x3 array)

    000

    001

    002

    010

    011

    012

    020

    021

    022

    100

    101

    102

    110

    111

    ect...

    If you want to see for yourself, try the following:

    + System: On start of layout

    + Array: For each XYZ element

    -> Text: Append newline&?Array.?CurX&?Array.?CurY&?Array.?CurZ

  • Here is an example I had for a simple stepping/grid movement system. I just added an additional condition to each movement key to constrain or set limits for the movement. In this case it is 3x3 space like the game example you mentioned.

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

  • Choose is limited to a fixed set of numbers. If you need a flexible set, an array is the best choice.

  • One solution for this is to have your spaceship actually static in terms of position, and have your controls actually move all the other objects around it and rotate the entire layout.

    Another involves setting up a custom pathfinding system that allows for node positions to be pinned/updated with movement of your ship. This can be done in conjunction with the built in pathfinding behavior, as that allows you to access the node coordinates. Basically use the pathfinding behavior to calculate the path, then your own movement system by creating invisible helper objects at each node that are pinned to the ship, and have your NPC's ( which are also pinned to the ship) move towards each node object in succession.

    Third way is just to recalculate pathfinding every tick. Definitely not recommended, unless the scope of your game is very, very, small.

  • You cannot control the final scale, as the size/resolution of the browser or game window is controlled by the end user.

    Recommend using the following settings in your project properties:

    Fullscreen Mode - Letterbox Integer Scale

    Sampling - Point

    Pixel Rounding - On

    You can control increase or decrease how much of a layout a player sees (viewport) by using the Set Canvas Size system action, but I don't think that is what you're going for...

  • Even if you send a no-cors request, an opaque response cannot be read or accessed by JavaScript.

    This is normal behavior, basically one use case is to prevent hot-linking to resources that are not yours (stealing bandwidth). Either you have access to the server/domain where the resource is hosted and configure it to allow cors, or you'll need a copy of the resource on the same domain as your game/app so then cors is not necessary at all.

  • Use the browser objects "On Suspend" and "On Resume" triggers to keep track of how much either unixtime or wallclocktime has elapsed, and then adjust your game state based on that time.

  • CORS needs to be set up on the server you are requesting data from, not from the construct app or the domain hosting the construct app. It is set in the hosting server's configuration files.

  • Tile sizes can't be changed with actions, although the width and height of the entire tilemap can change.

    If you want different "resolutions" of tilemaps, one way is to have multiple tilemaps with different tile sizes layered on top of each other and only display the relevant one at any given time.

  • https://www.scirra.com/manual/85/layers

    See Global Layers section