You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Error Reporting  \  The case of the slow scripts

Back to Threads

Viewing Thread: The case of the slow scripts

 

Dave Man

Joined: 19 October 2003
Posts: 374
09 July 2005 16:30 (UK time)

For some reason whenever I run a script while playing the game it lags for a second or two and then continues on. Why is this (and I know it's probably not my computer for it also does this on the one I just bought)

You need to login to create posts in this thread.

Assain

Joined: 02 November 2003
Posts: 979
09 July 2005 20:36 (UK time)

M2 has a nag of not letting the game do anything untill the script is completed, and the game happens to run any scripts involving hideing/unhiding objects or altering objects pretty slowly :p

You need to login to create posts in this thread.

40oz
 Official Sponsor

Joined: 03 January 2004
Posts: 1799
12 July 2005 04:21 (UK time)

isnt there a way of avoinding that or something? vertical sync retrace or something like that not sure if it will solve your sproblem but i dont care. It kinda makes sense sometimes. I just imagine the doors have to analyse you before letting you in. But whatever. And they help me know that my script trigger is working.

*Papercut
Pro-Murder.
Legalize Crime.


You need to login to create posts in this thread.

Dave Man

Joined: 19 October 2003
Posts: 374
14 July 2005 01:22 (UK time)

Yeah but when you press a button in a different room and all of a sudden the game just freezes up for a bit, that seems kind of weird and distracting.

You need to login to create posts in this thread.

mike323
Joined: 23 January 2005
Posts: 745
16 July 2005 00:38 (UK time)

I'm betting its fixed in v1.0

You need to login to create posts in this thread.

arezey

Joined: 16 June 2005
Posts: 1599
16 July 2005 09:16 (UK time)

In M1, my comp. got freezed because of well, something! I ran my CivilWar (which is almost ready!) and it freezed for a hmmmm, about second or 2, which also contains the musicfreeze. I used first Forsought and then Faded Thrill and they all freeze. Now I have Tektronic flight (i threw forsought away and changed faded thrill to it's cd form) it freezes. I have got that in M2 too! So it's not in the music.

Edited: 16 July 2005 09:18


You need to login to create posts in this thread.

James Bunting
Joined: 17 September 2003
Posts: 1308
16 July 2005 12:50 (UK time)

I'll bet thats its the passable map update.

In simple terms M2 keeps has a seperate passable map (kinda like a second map that is just made up from passable types (press M to see it)). This passable map is pixel based (not geometric) so it makes for fast passable look ups during play, it also combats the stacking sectors problem (i.e. a bridge over water).

In order to keep the memory usage down the passable map is much smaller than the actual map (its basically a scaled down bitmap of colour codes). Even though its smaller it is surprisingly accurate.

Anyway...

When performing sector operations (inc opening doors) this map needs to be regenerated from scratch. In the case of doors this does not generally cause a problem as it only happens once per door, however with script it updates whenever a sector changes (not textures). This can be a real pain when you do several sector operations in a single script function. There is also a small overhead when calling the script but this should be minimal.

There has been some thought about making this more intelligent so that it only does a single passable map update, this is not that hard to implement, its just a matter of time.

Before I look into this I would ask you this question...

Does the scriping situation described above match your problem?

You need to login to create posts in this thread.

40oz
 Official Sponsor

Joined: 03 January 2004
Posts: 1799
17 July 2005 14:10 (UK time)

I am not worried too much about the slow scripts unless they are extreme, like that map that was testing the spawning script and covered the map in 100+ sheep! That took a good 8 seconds for me!

One of my problems is the loading when going from any of the editors to main menu. It takes so long for my laptop! It's like trying to get a handicapped person out of your house without a wheel chair!

I thought of a way around this by having "out-of-game M2 editors". Mainly for the Sprite Editor, as I am only in it for about 5 minutes to do some much needed sprite work.
*Papercut
Pro-Murder.
Legalize Crime.


You need to login to create posts in this thread.

arezey

Joined: 16 June 2005
Posts: 1599
18 July 2005 06:44 (UK time)

If this "loading" is man-made, like not necessary, please fix it! It takes about a quater for me to load it up at the start! And a same amount if i exit the sprite builder, object editor, projectile editor, weapon editor... etc

You need to login to create posts in this thread.

arezey

Joined: 16 June 2005
Posts: 1599
18 July 2005 06:44 (UK time)

If this "loading" is man-made, like not necessary, please fix it! It takes about a quater for me to load it up at the start! And a same amount if i exit the sprite builder, object editor, projectile editor, weapon editor... etc

You need to login to create posts in this thread.

arezey

Joined: 16 June 2005
Posts: 1599
18 July 2005 06:46 (UK time)

Hey, James, could you fix this if-you-double-click-the-save-button-it-copies-the-post-problem?

You need to login to create posts in this thread.

Dave Man

Joined: 19 October 2003
Posts: 374
19 July 2005 01:57 (UK time)

No, I do not have music loading problems, just changing sector passible type slow-downs like you stated.

You need to login to create posts in this thread.

Armageddon1212

Joined: 10 July 2004
Posts: 142
19 July 2005 03:31 (UK time)

i never had trouble with loading scripts :S

You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use