dop2000's Forum Posts

  • Yes, you should probably disable all controls or at least display a message "Saving, please wait" to the user.

  • So, is saving works fine now?

    You can find out how many objects you need to add for the file size to reach 1Mb, I think a lot. And probably nothing awful will happen, but the file may take a bit longer to save - there will be a delay before "Save as" dialog appears.

  • By the way, the biggest object in your 225KB file is "TempArray". It doesn't need to be saved. You might want to clear it before saving, to decrease file size.

    Add "TempArray Set size to 0" at the start of event 185

    Come to think of it, this is probably the reason why your normal save size is suddenly so big. The more undo steps you add, the bigger TempArray gets.

  • 220KB for 10 objects seems normal. 3MB is definitely not.

    Open the browser log and keep an eye on the save size. You need to try to replicate the problem when the save size suddenly jumps to 3+ MB and then try to save that huge file. (You may need to wait some time for the "Save as" dialog to appear)

    If you manage to replicate it, maybe it will become obvious to you why this happens. If not, then post the saved file, I'll take a look.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Undo system uses the same Save action, so the size of saved data should be the same. And yet undo save is 50KB, but moments later normal save is suddenly 3MB? That's 6000% increase!

    There had definitely something else happened between the last undo and you clicking the save button. My guess is that it has something to do with snapshots, drawing canvas etc.

  • It was difficult, but fun!

    I really suggest you replace the text box with spritefont, it will look and work much better, as I told you in another post. Also, since this is supposed to be an old terminal, you shouldn't be able to select text, use copy/paste etc.

  • My guess is that TileMap should be better for performance. But you can actually test this - create a small map with sprites, run the game in Debug Mode and write down the number of collision checks per second. Then replace sprites with TileMap, check again. The less collision checks, the better.

  • Why the save size suddenly goes up from 50KB to over 3MB when you click save? It should be the same size as when saving Undo steps. This is not normal, there must be some other event in your project that's causing this. Maybe you also take a snapshot of the screen and load it into Binary data or something like that. 3MB save is A LOT, and it explains why there is a significant delay in displaying the "Save as" dialog.

    If you can't figure out why this happens, try to analyze the .alon file, see maybe there is a huge block of data that shouldn't be there, or thousands of small ones.. Try this tool for example:

    debugbear.com/json-size-analyzer

  • Yeah, there is nothing mysterious about clamp, lerp and unlerp functions, they are well documented and you can google a million examples of their use.

    About the problem you are having - I'm guessing you didn't put knob and slider into a container. If you don't want to use containers for some reason, you will need to pick the correct slider when setting position of each knob.

  • If you are saying that transposing the data is easier to implement, I guess it's an even better (more universal) solution!

  • Nepeo I kind of used to store records in arrays on X axis and different fields in the record on Y axis.

    Besides, some events and expressions don't work the other way, for example, you can't do "Array for each Y element", or use IndexOf to find something on Y axis.

    I actually had to do this today - changed the structure of my array so that the data is now stored on Y axis, because it was really awkward to enter about a hundred of records in one row. I know there are workarounds (I can prepare the table in excel, convert to JSON etc.), but it would be much easier if there was an option to rotate the view in C3.

  • Nepeo Is it possible to add an option to rotate the view in the Array editor? (The view only, not the data).

    It's often much easier when the data is presented in columns, especially when editing a large array, or entering long lines of text.. It's more Excel-like, compact, can fit a lot more data into the same space. Compare:

  • The platform behavior already has "is touching wall" and "is on floor" which to my knowledge are handled in the behavior's script and simply return true or false -- using them in events does not create extra collision checks.

    This is not true, I just tested with the Platform template and here are the results:

    • Default template: ~240 collision checks per second.
    • With "Is by wall" event: ~420 collision checks per second.
    • With "Is overlapping at offset" event: ~360 collision checks per second.

    So testing for overlapping at offset is actually better for performance as it uses less collision checks.

    But I agree, including "is touching ceiling" would be an simple and useful addition to the Platform behavior.

  • Maybe you need to scale the entire layout? Or scale other layers too?