This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2009-01-04 18:59:13

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

I need your input to test for lag

http://scratch.mit.edu/projects/archmage/358968

I want to know how many people can play the project at a speed where it is possible to hit the sandbag without difficulty. It has been very frustrating trying to make this project work online. It works very well offline but it lags online. I just want to know if people will be able to run any  future version of the project.

Please state if you can run the project and also say your computer's power rating.

Thank you for helping  smile

Last edited by archmage (2009-01-04 19:00:11)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#2 2009-01-04 19:09:59

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: I need your input to test for lag

I can do it at an avg speed of 1-2.5 fps lol

Last edited by Lucario621 (2009-01-04 19:13:05)


http://i.imgur.com/WBkM2QQ.png

Offline

 

#3 2009-01-04 20:28:04

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Lucario621 wrote:

I can do it at an avg speed of 1-2.5 fps lol

And you computer stats are?
Also, could you hit the target?

The reason it goes slow is because the online player cannot handle multiple if statements well. Online it runs at full speed on modern computers.

Last edited by archmage (2009-01-04 20:33:58)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#4 2009-01-04 20:51:32

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: I need your input to test for lag

What do you mean stats?

Does my computer have Attack, Defence, Hitpoints and stuff?

Anyway here's my "Stats":
-Microsoft Windows XP Professional Version 2002 Service Pack 3
-CPU (AI intelligence lol) 2.40 GHz
-512 MB of RAM

Helps?


http://i.imgur.com/WBkM2QQ.png

Offline

 

#5 2009-01-04 20:57:24

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Lucario621 wrote:

What do you mean stats?

Does my computer have Attack, Defence, Hitpoints and stuff?

Anyway here's my "Stats":
-Microsoft Windows XP Professional Version 2002 Service Pack 3
-CPU (AI intelligence lol) 2.40 GHz
-512 MB of RAM

Helps?

Hmmm, I have a computer that is about the same as it doesn't go as slow as you describe. It goes about 1.5 - 2 times slower online than offline but it is was faster than 2 frames a second.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#6 2009-01-04 20:59:40

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: I need your input to test for lag

archmage wrote:

Lucario621 wrote:

What do you mean stats?

Does my computer have Attack, Defence, Hitpoints and stuff?

Anyway here's my "Stats":
-Microsoft Windows XP Professional Version 2002 Service Pack 3
-CPU (AI intelligence lol) 2.40 GHz
-512 MB of RAM

Helps?

Hmmm, I have a computer that is about the same as it doesn't go as slow as you describe. It goes about 1.5 - 2 times slower online than offline but it is was faster than 2 frames a second.

Lol yeah I was just kidding. Honestly I'm not sure cuz when I watch I feel a 30min TV show it feels like 10 min, though when my mom makes me go outside for 10 min (which I hate lol), it feels like 30 mins, so I don't have a good sence of time.


http://i.imgur.com/WBkM2QQ.png

Offline

 

#7 2009-01-05 06:33:13

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: I need your input to test for lag

Works fine.

2x 1.6 GHz = 3.2 GHz CPU
2x 1 GB  = 2 GB RAM

Last edited by bhz (2009-01-05 06:38:53)

Offline

 

#8 2009-01-05 12:14:21

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: I need your input to test for lag

Mines pretty rubbish. Takes like half a second for a costume change.

2.8 GHz
448 Ram


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#9 2009-01-05 12:17:02

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: I need your input to test for lag

Btw, what I said about the game looking a bit poor quality, that was online. I've just downloaded it and it is great.


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#10 2009-01-05 13:20:24

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Dan01 wrote:

Btw, what I said about the game looking a bit poor quality, that was online. I've just downloaded it and it is great.

Yeah I know, its a bummer. I think that one big issue may be ram consumption. People with low ram are reporting the biggest problems despite their moderately powerful processors. Absolutely nothing I can do about that though, that is the fault of the scratch player.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#11 2009-01-05 17:14:19

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: I need your input to test for lag

archmage wrote:

Dan01 wrote:

Btw, what I said about the game looking a bit poor quality, that was online. I've just downloaded it and it is great.

Yeah I know, its a bummer. I think that one big issue may be ram consumption. People with low ram are reporting the biggest problems despite their moderately powerful processors. Absolutely nothing I can do about that though, that is the fault of the scratch player.

If only, scratch could change...


http://i.imgur.com/WBkM2QQ.png

Offline

 

#12 2009-01-06 18:50:58

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Ok I made a very slight "optimization" (it seems to make it a bit faster online but logically it shouldn't)

Please, test this and tell me if there is any improvement with the lag issue
http://scratch.mit.edu/projects/archtest/373155

Last edited by archmage (2009-01-06 18:51:11)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#13 2009-01-06 20:10:56

Zelda123
Scratcher
Registered: 2007-11-21
Posts: 1000+

Re: I need your input to test for lag

archmage wrote:

Ok I made a very slight "optimization" (it seems to make it a bit faster online but logically it shouldn't)

Please, test this and tell me if there is any improvement with the lag issue
http://scratch.mit.edu/projects/archtest/373155

It works much better for me than the other one. It can actually be played nicely online.

Offline

 

#14 2009-01-06 20:46:44

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Zelda123 wrote:

archmage wrote:

Ok I made a very slight "optimization" (it seems to make it a bit faster online but logically it shouldn't)

Please, test this and tell me if there is any improvement with the lag issue
http://scratch.mit.edu/projects/archtest/373155

It works much better for me than the other one. It can actually be played nicely online.

This is actually kinda ridiculous. I will tell you how exactly I "fixed" it and I am sure you will also find it ridiculous. I did some testing and figured that the set x/y blocks is much faster than the change x/y blocks when played online.

So this is what I did.

First I made 2 variables: xposition and yposition

This is my original code basically

change x by xvelocity
change y by yvelocity


This is the new code

Change yposition by yvelocity
Change xposition by xvelocity

Another script was also added

when flag clicked
forever
go to x:xposition y:yposition


So if you don't understand what I did I will explain. Instead of actually moving the sprite, I changed 2 variables that represent the sprite's x and y position. Then the new script I added set the sprite's x and y position to the variables.

This is ALL I did. Does it make any sense that this made it run faster online? The answer is no, in fact it should have made it slightly slower.

Ridiculous right?


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#15 2009-01-06 20:58:53

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Strangely enough, I can't notice any difference in performance whatsoever on my laptop.

Just in case you tried the wrong project initially, you can find the newest official project in my sig. It is only the newest if it has the archmage in it.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#16 2009-01-07 11:53:06

Lucario621
Community Moderator
Registered: 2007-10-03
Posts: 1000+

Re: I need your input to test for lag

That is rediculous. It still baffles me now!  Next thing you know it, "switch to costume (costume + 1)" will be faster than "next costume" !


http://i.imgur.com/WBkM2QQ.png

Offline

 

#17 2009-01-07 12:38:07

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: I need your input to test for lag

The new version is defentily a lot better.


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#18 2009-01-07 16:01:12

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Dan01 wrote:

The new version is defentily a lot better.

I don't know whether to feel happy or sad about that. :S

On one hand I finally got it to run faster, however, the change I made should have made it slightly slower instead of faster. It is very hard to optimize scratch scripts because sometimes you don't know what will work, or to optimize it you have to use many repetitive scripts. It promotes very bad coding practices. If people learn how to program this way, their scripts in other languages will be very messed up  tongue


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#19 2009-01-07 16:13:11

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Here is another version you should take a look at.
http://scratch.mit.edu/projects/archtest/371623

It should be faster than the other one I posted but it sometimes misses key presses.

EDIT: It doesn't detect key presses in the initial jump animation only from what I can see.

A "SUPERFIX" is in the works. It combines both methods of lag reduction. I think this may work well.

By the way, all testing projects will be uploaded to my archtest account.

Last edited by archmage (2009-01-07 18:46:08)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#20 2009-01-07 20:24:47

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Ok, I am doing a large fix for this which involves splitting up the scripts.
http://scratch.mit.edu/projects/archtest/374231

Please let me know how it preforms compared to this one
http://scratch.mit.edu/projects/archtest/373155


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#21 2009-01-08 06:39:45

bhz
Scratcher
Registered: 2008-07-06
Posts: 100+

Re: I need your input to test for lag

archmage wrote:

Ok, I am doing a large fix for this which involves splitting up the scripts.
http://scratch.mit.edu/projects/archtest/374231

Please let me know how it preforms compared to this one
http://scratch.mit.edu/projects/archtest/373155

There's no difference

Last edited by bhz (2009-01-08 06:40:22)

Offline

 

#22 2009-01-08 12:19:16

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: I need your input to test for lag

archmage wrote:

Here is another version you should take a look at.
http://scratch.mit.edu/projects/archtest/371623

It should be faster than the other one I posted but it sometimes misses key presses.

EDIT: It doesn't detect key presses in the initial jump animation only from what I can see.

A "SUPERFIX" is in the works. It combines both methods of lag reduction. I think this may work well.

By the way, all testing projects will be uploaded to my archtest account.

Faster, however sometimes Mario gets glitched. When he runs from one side of the stage to the other, the run animation starts well but then he ends up gliding without any costume change.


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#23 2009-01-08 15:54:14

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Dan01 wrote:

archmage wrote:

Here is another version you should take a look at.
http://scratch.mit.edu/projects/archtest/371623

It should be faster than the other one I posted but it sometimes misses key presses.

EDIT: It doesn't detect key presses in the initial jump animation only from what I can see.

A "SUPERFIX" is in the works. It combines both methods of lag reduction. I think this may work well.

By the way, all testing projects will be uploaded to my archtest account.

Faster, however sometimes Mario gets glitched. When he runs from one side of the stage to the other, the run animation starts well but then he ends up gliding without any costume change.

That was fixed I think.

That version is outdated. Please try this one
http://scratch.mit.edu/projects/archtest/374231

Last edited by archmage (2009-01-08 15:55:23)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#24 2009-01-08 16:19:05

Zelda123
Scratcher
Registered: 2007-11-21
Posts: 1000+

Re: I need your input to test for lag

archmage wrote:

Dan01 wrote:

archmage wrote:

Here is another version you should take a look at.
http://scratch.mit.edu/projects/archtest/371623

It should be faster than the other one I posted but it sometimes misses key presses.

EDIT: It doesn't detect key presses in the initial jump animation only from what I can see.

A "SUPERFIX" is in the works. It combines both methods of lag reduction. I think this may work well.

By the way, all testing projects will be uploaded to my archtest account.

Faster, however sometimes Mario gets glitched. When he runs from one side of the stage to the other, the run animation starts well but then he ends up gliding without any costume change.

That was fixed I think.

That version is outdated. Please try this one
http://scratch.mit.edu/projects/archtest/374231

Works well. Best one yet for me.

Offline

 

#25 2009-01-08 16:30:50

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: I need your input to test for lag

Zelda123 wrote:

archmage wrote:

Dan01 wrote:


Faster, however sometimes Mario gets glitched. When he runs from one side of the stage to the other, the run animation starts well but then he ends up gliding without any costume change.

That was fixed I think.

That version is outdated. Please try this one
http://scratch.mit.edu/projects/archtest/374231

Works well. Best one yet for me.

Good to hear. It has a 4-8 at the end of the "SUPERFIX" because only the top row of characters have been optimized. It should slow down a  lot if you use a character from the bottom row.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

Board footer