Steely's Forum Posts

  • Internally, Construct never actually stores an "AngleOfMotion" value. Whenever the behavior or user needs the value, it recomputes the value via the arctangent based on the current vx/vy, these being the horizontal and vertical velocity values. This means that when you set speed to 0, vx and vy also get zeroed out and the angle now returns 0.

    If vx and vy were instead inferred from angle and speed (aka: vx = cos(angle) * speed, vy = sin(angle) * speed) then this issue wouldn't occur.

    Steely

    I'd recommend taking a look at using the system time scale (setting it to zero) to create a pause for the game instead of manually managing all the objects.

    cacotigon

    Thanks for the explanation, its more clear for me now but I can't use the pause with timescale now, I need only a part of the game to set at pause, but I figured it already out with the power of families.

  • I have the same problem when I was adding pause in the game and in my opinion its a bug because I set the speed at 0 and not the angle of motion.

    Disable/enable bullet won't help me in my case so we have to store the angle of motion in a variable for 10.000+ objects

  • Animation Frame RANDOM BUG in Editor 195

    ____ A concise description of your problem here ____

    Several times a weird bug that there appears duplicate frames in some of the animations just out of nowhere and one time in a other capx it was mirroring 1 out of the 15 frames while it was not flipped by me and every time when I place that tile it was in mirror (with 6 animations the same frame number did it (they where 6 tile sets from my level editor)), I had to delete it and reload the tile set and after that everything went back to normal without doing any other changes in code or whatever.

    I had a bug (sometimes frame nr 2 did not got a collision randomly ) in my game and have searching for hours in my code and nothing wrong, so I open the image editor and check the frames and again there are 2 duplicate frames, deleted it and game works fine (the weird thing is that the duplicated frames was a copy of frame 2 and was set at frame nr 7 and have no clue how they came there at all)

    Attach a Capx

    ____ Upload a Capx to this post ____

    don't know how to reproduce it and cant send a full game, I try to explain,

    Steps to Reproduce Bug

      1- import frames from tile strip 2- move frames, delete frames load new frames etc. in a time period of few weeks when game progress 3- everything is fine, write code for several days. 4- get weird bugs 5- check your animation frame sets and when your lucky you see duplicates, when your not lucky its one or more of the frames that can spoil your collisions etc. but they look just as if there is nothing wrong with your animation at all. To solve it, delete all frames from animation to be 100% save or delete just the ones you know its them. Observed Result ____ What happens? ____ see top Expected Result ____ What do you expect to happen? ____ see top Affected Browsers
        C2 Editor Operating System and Service Pack ____ Your operating system and service pack ____ Windows 7 Home Premium 64Bit service pack 1 Intel i7 CPU 920 2.67 12GB Ram Nvidia GeForce GTX 760 v340.52 Construct 2 Version ID 195 ____ Exact version ID of Construct 2 you're using ____
  • have win7 64 bit, but the 195 release runs very smooth, ie, chrome and node-webkit so I'm very happy.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • IE 11 is "jerking/lagging" the same as chrome.

  • Thanks ramones it works like a charm, you made my day

    Why don't you program the level editor to save as an array and when saving just save that array as JSON? Set key to arrayName.AsJSON would do that and guarantee everything is right...

    that's what I did but won't work like that.

  • You can have your level editor export the data in the correct format like this:

    [attachment=0:ih73yfp5][/attachment:ih73yfp5]

    Still I'd just use project files unless you've tested it and it's noticeably slower.

    Thanks I'm going to test it right away

  • Right, the editor expects you to enter a string so you have to put it in quotation marks and you have to escape any quotation marks inside the json string with double quotation marks.

    Eg.

    {"c2array":true,"size":[30,8,4],"data":[]}

    will work when loaded from a file but if you want to paste into an event you have to change it to:

    "{""c2array"":true,""size"":[30,8,4],""data"":[]}"

    Thanks again, at least I know now how it all works and hope that it can and going to be changed in a future release.

  • I want that the level editor save in the right format so I can copy and pasta the txt file direct in the dictionary key without to edit the file because when I get a typo in there its mesh up the whole system.

  • Hi ramones, thanks for your reply,

    I got it working if I load it direct in the array with ajax (finaly) but I wanted it to do different now, because I don't know if it all loads fast enough in a android app, so I wanted to copy my data (txt) files from the level editor direct in the c2 code as dictionary keys key 1 to 30 (or more) for example.

    The levels are created out of this 30 different level parts to generate random levels.

  • [quote:3egzw1zh]Your JSON string has

  • LOl
    characters in it:
  • Code: Select all

    "{

    ""c2array"":true,

    ""size"":[3,7,1],

    ""data"":[ [[0],[0],[0], [0],[0],[0],[0]],

    [

    [1],[-1],[-1],[-1],[-1],[14],[26]], [

    [2],[30],[10],[8],[-1],[-1],[-1]], [

    [3],[0],[-1],[-1],[-1],[-1],[-1]]

    ]

    }"

    I guess you copy/pasted it from another editor. If you remove the tabs (replace them with spaces) it works.

    Thanks this work perfect,

    but why is c2 still saving it in wrong format (or I'm missing something)? I made a level editor in version 192 and it save still like this:

    {"c2array":true,"size":[30,8,4],"data":[[[7,20,31,42],[8,21,33,0],[11,0,32,40],[7,0,0,0],[7,21,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]]}

    and can't load it in a normal way in to a array or am I missing something?

    I like to put the level data in c2 project files (like music etc.) so it get compiled with the code.

    Struggling for days with this now and hope that some one can help me with this.

  • Take a look at this

  • Just tested it on ie and chrome and its bot choppy. All static layers use render cells to improve performance but still choppy.

  • I updated from 184 to 191 and have same issue, very poor performance, but don't know if it has to do with node webkit, I get still 60FPS but screen still stutter when scrolling

    Awesome !!!!!!!!!!!!!!!!!!

    Thanks Ashley