konjak's Forum Posts

  • Could you possibly just give me an example of how I'd through a function create a sprite and then instantly set its variables, though?

    Construct is pretty picky about defining variables in the same event, or sub-events, of where you created the sprite...

  • I forget Python exists. I don't know it, but it seems real simple if combined with Construct.

    How is it, speed-wise, to use a bunch of Python? Like if I made almost the whole behavior of a sprite in it and used as a script.

  • What I'm doing is basically replace all my events where I create an Effect and then write 5-10 actions below it, with a function that basically reads:

    Function.create_effect(Layer,X,Y,VariableName,WhatToSetItTo,VariableName,WhatToSetItTo,VariableName,WhatToSetItTo...)

    So I'm only trying to create unrelated actions. Since I'm having CC problems possibly relating to my project's size I want to truncate event sheets in any way I can.

    EDIT: By the way, I created an alternative to it that basically parses strings that say it similar. I just don't know if so much string parsing is inefficient. It's also slightly more cumbersome to type out as an action.

    EDIT 2: I tried calling the function as an expression in a plain "Evaluate" condition, but it didn't help.

  • Perhaps it is not safe to use the ways I've tried just setting random variables or texts, and I should be using a less object-oriented action?

  • Well yeah, that's not the same way after all. All you should have to do is "set variable: Function.functionname(0,0,0,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 that, if anything like me, should crash your runtime, or even possibly Construct.

  • And you tried this defining the parameters inside something like a variable, not in an action each?

    I just tried compatibility mode in Windows and Construct went completely frozen just defining too many parameters in the event sheet.

  • More than 17 it seems.

    Also, as I implied, I tried copying one parameter over and over in the expression editor and CC crashed very quickly. I mean, within not too many paramerers, since Construct will also crash just typing a ridiculously high number on its own.

  • I get a runtime crash when I go above a specific number of parameters when calling a function from an expression, without fault. Both in r2 and the version prior.

    Is this anything known of? For the exact approach I'm making these functions I want them as expressions.

    EDIT: Construct seems to crash in general if I try to write too much in the Expression window, or at least within the parnethesis of the Function call.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was noticing fullscreen framerate issues too, so it's probably something weird going on for many people. I don't find it horrible, but other players might so it'd be nice to see fixed someday. Alternative is fitting the image to people's screens along with zoom effects.

    EDIT: Actually... no, it seems to ber working now. I was going to test if it was due to my main monitor insisting on reading out 59Hz in the Control Panel, whereas my second monitor does 60. Both ran fine right now, so I'm confused. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • I got a program called FreeRAM and it seems to do excellent in removing that excess RAM. It could be a temporary solution, I guess.

    I probably shouldn't be clogging up this thread with my problems, though.

    EDIT: I just managed to get the error anyway trying to start the game now, so I am majorly confused. Is it VRAM? It's definitely a Construct prompt at this point.

  • I do indeed have thousands of events, and then add conditions to that. It doesn't matter the amount of open tabs.

    My game (it's The Iconoclasts, if it matters) isn't one that can rely on reusable code all the time as it constantly adds new aspects, bosses are really intricate, no two events are the same and there are many active cutscenes, which will create many, many events. The project scale wouldn't be overshooting anything if this leak didn't happen, and it's basically the final hurdle I think I can expect before Construct is near perfect for this game.

    I haven't counted all the events in the game, but just the sheet which has all the cutscene scripting has 1400 or so. Parts of the game could probably be scripted with external files, but hardly enough. I already have some cutscene scripting external, within the dialog files I keep.

    I just hope someone will get around to it at some point, somehow. I wish I could recoup anyone who did, too. :(

  • Actually, I just tried removing all sprites from the project and saving, and it still adds 30-40 megabytes.

    But then I removed all event sheets (leaving three tied to layouts) and it only adds about 3 megabytes.

    So yeah, I was wrong. This seems to be completely due to your event count. I take it what happens is I open, for example, my sprite layout, making it load all sprites as well as the events. When I close it it empties out the RAm for sprites but not the events. When I save it somehow re-adds the events to RAM and doesn't take it away.

    It's curious though, since it still adds 30-40 megabytes when I removed all sprites, because that makes almost all conditions disappear! So to me it just seems to hate event counts?

    EDIT: Just made an empty CAP with nothing but 7500 "Always" events and it leaks 8 megabytes every save.

  • Okay, here are some numbers, though they are very random:

    • I have 8GB RAM, 4069 VRAM. My game is very big at this point indeed. But I also have 8GBs of RAM so it's not a matter of adding even 8 more because the error occurs often enough for it still to happen a couple times a day, maybe.
    • Saving adds 30-40 megabytes to the used RAM.
    • Previewing adds 2-5 megabytes.
    • Just opening a layout that "stores" a lot of sprites randomly adds 10-50 megabytes. When closed removes only some of that.
    • Opening some event sheets will leave about 1 megabyte after having closed it again.

    Basically everything I do will leak memory, saving being the most consistently bad culprit. I'm still convinced this concerns the loading and reloading of sprites, as Arima seems to think too. Opening an event sheet might just load some, opening a layout would load all in the layout again, and saving would go through everything in the .CAP. Compiling turns out to be the most lenient because of when Ashley added Construct remembering if you compiled the same game already (without art changes).

    During gameplay I basically have all art loaded because it's all small pixel art, and it has never loaded more than 40Mb into VRAM at once.

    The latest version of Construct doesn't change any of this. As Arima points out, there has been memory issues with sprite loading before. I remember I would spread sprites across layouts to not load too many every time I opened the expression editor back then.

    I hope this can shed some light on it... I really want this alleviated. :(

    EDIT: And no, the error prompt says nothing other than "Out of memory".

    EDIT 2: All of these examples add more memory than it ends up leaking as you do it. Like, while saving the RAM use shoots up quite far, then leaks about 60% of that.

  • In my experience, these are the factors:

    • Mainly it seems to amass from compiling. After a while I will get an "Out of memory" message and the game can't start. It also messes up Construct visually and functionally. I may not be able to save. Can also crash Construct instantly.
    • The same can happen from working with animations. As I alter frames and go back to the animation editor to pick a new one it can eventually create the same visual errors, but most often an instant crash of Construct.
    • Simply saving can create the issue afterward, and rarely during, making the save not happen (no corruption as of yet). Usually causes an instant crash, I think.

    Seems to me to have to do with reloading the textures used in a project over and over. Compiling would deal with textures, going between the animation editor several times reloads animation frames (watching how Construct acts it seemingly reloads everything after you finish in that editor) and I assume saving deals with the textures somehow too.

    I don't know the exact workings of Construct, but visually it seems to imply reloading sprites in a project quite frequently, so that probably feeds the leak quickly?

    Thanks for showing an interest in my problem!

  • Hey, Lucid, what would be the result of the memory leak the changelog claims you fixed regarding resizing client windows?

    Based on my post higher above, my game does resize the client window and such, and I'm trying to figure out of this version could help. It's probably not it as I seem able to get my "out of memory" bug from doing other things than compiling, but I can't know if I'm simply hitting a memory limit doing those things after several compiles, since I'm nowhere near a C programmer. <img src="smileys/smiley1.gif" border="0" align="middle" />