Pages: 1
Topic closed
I have been looking at lots of scrolling games because I am interested in making one. But I have noticed that lots of the games are extremely slow is there any method of making one without too much lag?
Offline
Lag reduction methods:
Reduce the size of the screen you are using.
Make the scrolling sprite as "plain" as possible.
Having a scrolling sprite that is transparent, with only details on it reduces the amount of graphics work scratch needs to do. EG, instead of a big black area with a few stars, have a big transparent area with a few stars and put it over a black background.
****
Also - run in presentation mode or online, as running from the scripting screen causes additionaly lag as scratch animates the scripts.
Offline
You can reduce the lag, but no matter what you do scrolling will take up a considerable about of your cpu unfortunately.
Offline
OK there's also sprite compression and script compression, sprite compression is where several sprites are made into one and use different costumes, but have different scroll variables, script compression is where you try deactivate as many scripts as possible when they are not needed, use variables and broadcasting to turn on and off scripts
Offline
dingdong wrote:
OK there's also sprite compression and script compression, sprite compression is where several sprites are made into one and use different costumes, but have different scroll variables, script compression is where you try deactivate as many scripts as possible when they are not needed, use variables and broadcasting to turn on and off scripts
Your description of sprite compression is a bit sketchy. Perhaps you can provide an example?
Also for script compression. Try to put as much as you can into a single forever block. You should use variables when ever you need to but I would recommend not using too many broadcasts because it might make your code kind of messy. Also, take some time to look at your code to see if you did anything that was unnecessary and try to make it more efficient.
Offline
Topic closed
Pages: 1