Hi,
I made a simple breakout style game:
http://scratch.mit.edu/projects/wglass/1858994
My concern is that when the ball bounces off the paddle, there's a noticeable delay. When I play with the downloadable scratch app there's no delay, but on the web site it pauses for a moment. How can I make this go without a delay?
The script to bounce is in the ball. The paddle is 5 sprites stringed together. The ball has a "forever" loop with an if statement for each section of the paddle. If it hits the top, it bounces at an up angle. If it hits the middle, it bounces straight. If it hits the bottom, it bounces at a down angle. It also plays a "laser" sound when it bounces.
WILL
P.S. My first game. Downloaded for my son to play with but ended up spending a couple hours in the evening making this after he went to bed! Very nice.
Offline
hm...it's an interesting problem, but I can't actually look at the project right now. If I could, I could tell you how to minimize your number of sprites, which might speed up that process.
Offline
My guess is that the decreased performance of the online player is causing some lag when it takes a while to perform the necessary calculations. Maybe if you found a more streamlined way of doing it, such as making the paddle one sprite and calculating the angle of the bounce based on the ball's position relative to the center of the paddle?
Offline