Function parameter limit?

For questions about using Classic.

Post » Sat Mar 17, 2012 8:10 pm

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.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Sat Mar 17, 2012 8:48 pm

As far as I know, in most of the cases the events and python are running at the same speed, because both of them calling functions that were written in c++(like the system object's "create" function, or the sprite object's "setvalue".)

I think you probably calling the python functions too often, that may lead to performance issues.

Post the cap, or at least a shot of it, I can't help you without knowing the exact problem.
B
10
S
6
G
3
Posts: 127
Reputation: 2,481

Post » Sat Mar 17, 2012 9:03 pm

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.konjak2012-03-17 21:04:19
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests