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

#1 2012-12-09 17:39:45

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Can anyone help me?

I have this project. Alot of people complain about lag. I know theres a way to fix this by stopping sprite scripts when off screen and restarting them when on screen. If anyone can help me do this the project is here.

http://scratch.mit.edu/projects/fillergames/2959629

Also can anybody reduce the amount of scripts because.

57 sprites and 319 scripts

Is INSANE.


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#2 2012-12-09 20:17:03

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Can anyone help me?

Hello anyone?


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#3 2012-12-09 20:51:02

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Can anyone help me?

fillergames wrote:

Hello anyone?

I might be able to help, though as it's late right now, I won't be able to do anything today. How about sometime early this week? Would that be fine with you?


http://i46.tinypic.com/35ismmc.png

Offline

 

#4 2012-12-09 21:42:33

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Can anyone help me?

ErnieParke wrote:

fillergames wrote:

Hello anyone?

I might be able to help, though as it's late right now, I won't be able to do anything today. How about sometime early this week? Would that be fine with you?

Take as long as you need.


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#5 2012-12-10 13:01:22

30-1
Scratcher
Registered: 2012-08-08
Posts: 100+

Re: Can anyone help me?

The sprite/script problem is most likely because you scrolled like this. To fix that you can scroll like this. Stopping sprite scripts when off screen and restarting them when on screen is impossible, IMO.  hmm
Lag is mostly caused by large amounts of sprites.
Hope this helps  smile


http://i.imgur.com/ocOya7x.gif
I. Text I Based I Games I

Offline

 

#6 2012-12-10 15:57:38

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Can anyone help me?

30-1 wrote:

The sprite/script problem is most likely because you scrolled like this. To fix that you can scroll like this. Stopping sprite scripts when off screen and restarting them when on screen is impossible, IMO.  hmm
Lag is mostly caused by large amounts of sprites.
Hope this helps  smile

I had an older project that loaded things when near then.


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#7 2012-12-11 15:41:15

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Can anyone help me?

New version. Now has  57 sprites and 227 scripts.
http://scratch.mit.edu/projects/fillergames/2973331


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#8 2012-12-11 15:52:11

mythbusteranimator
Scratcher
Registered: 2012-02-28
Posts: 1000+

Re: Can anyone help me?

Have you tried reducing the nunmber of "repeat" blocks? If you have a repeat 10 times block in there somewhere, having the script twice and saying "repeat 5 times" can usually make it run about 1 and a half to two times faster.


http://www.foxtrot.com/comics/2012-04-01-fdb37077.gif
clicky

Offline

 

#9 2012-12-11 16:13:34

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Can anyone help me?

mythbusteranimator wrote:

Have you tried reducing the nunmber of "repeat" blocks? If you have a repeat 10 times block in there somewhere, having the script twice and saying "repeat 5 times" can usually make it run about 1 and a half to two times faster.

Alot of repeat untill blocks. There needed to run the game.


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#10 2012-12-11 16:42:23

BetaSmozzick
Scratcher
Registered: 2012-02-25
Posts: 51

Re: Can anyone help me?

Maybe just put in if else statements and use distance from the character to determine whether you should use non-essential aspects of the code at the time (the actual scrolling would have to happen at all times).

Offline

 

#11 2012-12-11 16:50:34

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Can anyone help me?

BetaSmozzick wrote:

Maybe just put in if else statements and use distance from the character to determine whether you should use non-essential aspects of the code at the time (the actual scrolling would have to happen at all times).

Whoa that would work!


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#12 2012-12-11 16:53:19

BetaSmozzick
Scratcher
Registered: 2012-02-25
Posts: 51

Re: Can anyone help me?

^^ Hopefully

Offline

 

#13 2012-12-11 19:15:13

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Can anyone help me?

BetaSmozzick wrote:

^^ Hopefully

I will make a game base to test soon.


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#14 2012-12-11 20:53:24

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Can anyone help me?

After today's day of work, I was able to remove a lot of your scripts and compact others. Here it is, if you want to look.

Anyway, a tip that I have for you if you want to improve the frame rate is that, while making my Pac-Man game, I've found that showing a variable using Scratch's built-in display drops the game's frame rate by quite a bit. So, you could try finding alternate methods to show your variables and this should help get in 3~4 more frames per second, which I even tested.

Anyway, I hope that this helps!


http://i46.tinypic.com/35ismmc.png

Offline

 

#15 2012-12-12 18:33:48

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Can anyone help me?

ErnieParke wrote:

After today's day of work, I was able to remove a lot of your scripts and compact others. Here it is, if you want to look.

Anyway, a tip that I have for you if you want to improve the frame rate is that, while making my Pac-Man game, I've found that showing a variable using Scratch's built-in display drops the game's frame rate by quite a bit. So, you could try finding alternate methods to show your variables and this should help get in 3~4 more frames per second, which I even tested.

Anyway, I hope that this helps!

Can you post it? My parents don't allow downloads from any site thats not scratch.


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#16 2012-12-12 18:54:28

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Can anyone help me?

fillergames wrote:

ErnieParke wrote:

After today's day of work, I was able to remove a lot of your scripts and compact others. Here it is, if you want to look.

Anyway, a tip that I have for you if you want to improve the frame rate is that, while making my Pac-Man game, I've found that showing a variable using Scratch's built-in display drops the game's frame rate by quite a bit. So, you could try finding alternate methods to show your variables and this should help get in 3~4 more frames per second, which I even tested.

Anyway, I hope that this helps!

Can you post it? My parents don't allow downloads from any site thats not scratch.

Okay; I'll post it sometime tomorrow.


http://i46.tinypic.com/35ismmc.png

Offline

 

#17 2012-12-12 19:13:15

fillergames
Scratcher
Registered: 2012-10-15
Posts: 1000+

Re: Can anyone help me?

ErnieParke wrote:

fillergames wrote:

ErnieParke wrote:

After today's day of work, I was able to remove a lot of your scripts and compact others. Here it is, if you want to look.

Anyway, a tip that I have for you if you want to improve the frame rate is that, while making my Pac-Man game, I've found that showing a variable using Scratch's built-in display drops the game's frame rate by quite a bit. So, you could try finding alternate methods to show your variables and this should help get in 3~4 more frames per second, which I even tested.

Anyway, I hope that this helps!

Can you post it? My parents don't allow downloads from any site thats not scratch.

Okay; I'll post it sometime tomorrow.

Thanks!

Can i put you in the credits?

Last edited by fillergames (2012-12-12 19:35:21)


http://i50.tinypic.com/2ufvxc5_th.gif Grammer? Whats grammar?

Offline

 

#18 2012-12-12 20:53:53

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Can anyone help me?

fillergames wrote:

ErnieParke wrote:

fillergames wrote:

Can you post it? My parents don't allow downloads from any site thats not scratch.

Okay; I'll post it sometime tomorrow.

Thanks!

Can i put you in the credits?

Yes, you can. And, if you'd like to look, I decided to upload your project today. Here's the link. And your welcome!  smile

Last edited by ErnieParke (2012-12-12 20:54:06)


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer