randomly's Forum Posts

  • Thanks so much!

  • If you want to set a key, simply use the action "Set key" and for the key, you insert your variable.

    If the variable is anything else than a string, make sure to wrap str() around it, since keys can only be strings.

  • You will have to use the NW.js plugin for this, if you want to write dynamically to a text file.

    With NW.js, you can use the action "Append file" to add a new line to the file, every time something happens.

    If you don't want to export to NW.js, you can use a dictionary or Array and use the Browser action "Download String" to download the Dictionary or Array as JSON.

    • The For condition repeats as many times as there are tokens.
    • An Array's Push back on X axis action basically "inserts" a new row of items into the Array.
    • tokenat(ajax.lastdata,loopindex-1,newline) is what is inserted into that new row. Where "ajax.lastdata" = The data string from which the token is extracted "loopindex-1" = The index of the token. This needs to be there to determine which of all the tokens should be used. An index of 0 would use the first token, an index of "tokencount(ajax.lastdata,newline)-1" would return the last token. The expression "loopindex" basically represents a dynamic variable that starts at 1 ("For 1...") and increases by 1, for every loop iteration. It has to be "loopindex-1 because the index for "tokenat(...)" starts at 1, while the "For" condition starts at 0. "newline" = the separator that determines which string separates the tokens.

    I hope this is not too confusing.

  • Could it potentially bring about performance trouble?

    This depends on your system.

    The more objects and events, the more your performance will suffer.

    Whether that influences the framerate up to a level, where you can't enjoy the game anymore, depends on the player's system, i.e. his CPU power.

    Generally, you would want to keep as few objects as possible in the layout and do as few events and condition-checks as possible.

  • I had a similar issue some time ago, posted a thread about it.

    The issue seems to be on Google's side.

    Assuming, that you are using the Geolocation object correctly and it still fails, here is a workaround:

    • Add an AJAX object to your project
    • When you need the geolocation, use the AJAX action "Request URL" with this url: "https://maps.googleapis.com/maps/api/browserlocation/json?browser=chromium&sensor=true"
    • When that request completes, AJAX.LastData will return a JSON file looking approx. like this:

    You should be able to go from here.

    For me, this currently only works when previewing or exporting to NW.js.

    Don't know about you though.

  • NW.js is a so called "wrapper".

    It "wraps" a GUI around your project to make it run natively under an operating system.

    When exporting to NW.js, the actual project (e.g. Sprites, events, etc.) don't make the most part of the size.

    The biggest part is the Chromium part.

    NW.js uses Chromium, which is basically the Google Chrome browser in small.

    So when you run an NW.js export, it basically starts a minimal version of the Chrome Browser and opens your project in the browser.

    tl;dr

    Chromium is what makes up most of the size.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't really understand what you mean?

    Do you want to shrink and expand the Sprite on the X and Y axis?

    How would you define "deformations"?

    An example would be helpful.

  • After a "Check Item Exists", do I have to add "On Item Missing" if I don't want to do anything if its missing?

    Yes.

    What does the action "get item" do if item doesn't exist?

    Nothing.

    On Item Missing might be useful to report back to the user that something misses or to display available savegames.

  • I made a .capx.

  • What kinds of deformation are you looking for?

    Shifting?

    Warping?

    If you are only looking for visual effects, an effect might be more useful here.

  • Some remote troubleshooting tips that might or might not help until you send a .capx:

    • Just for testing purposes, try to set all the speed/vector/movements to 0 when disabling the Platform behavior
    • Again, for testing only, try to disable every behavior that the player has, when entering the spaceship and see whether that fixes the issue. If it does, only disable one and go behavior by behavior to see which behavior causes the problem.
  • In your project bar (with all your objects inside) there is a directory called Files. Open it, there will be another directory, called Icons. Modify those.

  • I don't really know anymore.

    One last idea would be to compress the string before sending it.

    Try this plugin.

    • Compress the DATA URL
    • Send the compressed string
    • When receiving, decompress
    • Apply to Sprite