konjak's Recent Forum Activity

  • Well I call it every tick. I really wouldn't expect it to be this slow. This is basically the code I did that, if run "every tick", creates a noticable drop in testing FPS:

    Sprite.AddValue('value',500*System.TimeDelta)

    if Sprite.Value('value') >= 270:

    Sprite.AddValue('value',500*System.TimeDelta)

    if Sprite.Value('value') >= 360:

    Sprite.SubValue('value',360)

    It's a variable used for sine motions, if you're wondering why 360, etc. There's only one instance of the sprite being referenced, too.

  • Well, with a defined function for it instead it still runs awful (this is me trying to replace some events, not make effects), but I'm thinking that maybe you can't really test performance of Python in that way in Unlimited? Like it will be far too demanding to reference that code so fast, but in normal speeds it's perfectly fine?

    Hard to explain.

  • Thanks for that!

    Just a question though, is Python not any good at all for every tick? Because this seemingly simple code I tried to make completely devestates my game's FPS in Unlimited. The actual code is 8 lines and dropped 900 FPS to 800, then I copied it to make up 118 lines and it's down to 200.

    Am I just missing something? Thread's a bit derailed I guess!

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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" />

konjak's avatar

konjak

Member since 15 Mar, 2009

None one is following konjak yet!

Trophy Case

  • 15-Year Club

Progress

15/44
How to earn trophies