Hey, This is my first post, and it is just a quick question I have relating to a 2 player pong project that Im working on. The game is completly finished, but I need to add levels to the game, How would I go about doing this.
I want the levels to be distinct
1. New background
2. Title saying "Level x"
3. Faster ball speed etc..
I forgot to mention, I want a new level to automatically start when a certain player gets 10 points. If players 1 gets 10 points, I want a new level to start up with possibly something to click to start the new level.
Thanks,
Linerz
Offline
Whenever the game goes to the next level, broadcast something (let's call it "Next Level").
For the Stage to change, give the Stage plenty of backgrounds - one for each level, and arrange them in the order of the levels. Then put this script in the Stage:
[when I receive [Next Level])
[next background]
For the title to change, make a sprite and make a costume for each level, with each costume including the title and their level number, and arrange the costumes in the same order as you did with the Stage. Then put the following script in the sprite:
[when I receive [Next Level])
[next costume]
And for the faster ball speed: first of all, in the script that moves the ball forward, don't use a specified value (ie. [move [5] steps]) - put a variable (let's call it "Ball Speed") into the blank (like [move (Ball Speed) steps]). Then put this script:
[when I receive [Next Level])
[change variable [Ball Speed] by [1]]
The ball speed doesn't have to increase by 1 - change it to whatever you want. The higher the value, the faster the ball will move, and vice versa.
Offline
rockr wrote:
I need a good "ball" sprite for my pong game. Can u help?
![]()
Try posting requests in the Requests Forum. There are a few people who have opened "shops" - you can ask on one of those threads, or create your own thread, asking for sprites, backgrounds, banners, etc. Hope this helps
Offline
I've been making many pong games myself! http://scratch.mit.edu/projects/Froast/1252936 no levels though... I think you should make a variable called "Level", that way it can see which level you are on and some other stuff... And I agree with Jonathanpb.
Jonathanpb wrote:
Whenever the game goes to the next level, broadcast something (let's call it "Next Level").
For the Stage to change, give the Stage plenty of backgrounds - one for each level, and arrange them in the order of the levels. Then put this script in the Stage:
[when I receive [Next Level])
[next background]
For the title to change, make a sprite and make a costume for each level, with each costume including the title and their level number, and arrange the costumes in the same order as you did with the Stage. Then put the following script in the sprite:
[when I receive [Next Level])
[next costume]
And for the faster ball speed: first of all, in the script that moves the ball forward, don't use a specified value (ie. [move [5] steps]) - put a variable (let's call it "Ball Speed") into the blank (like [move (Ball Speed) steps]). Then put this script:
[when I receive [Next Level])
[change variable [Ball Speed] by [1]]
The ball speed doesn't have to increase by 1 - change it to whatever you want. The higher the value, the faster the ball will move, and vice versa.
Offline
rockr wrote:
I need a good "ball" sprite for my pong game. Can u help?
![]()
I have one in my Pong game, http://scratch.mit.edu/projects/Froast/1252936 (Please give credit if used) and if you don't want that one maybe you can find one on scratch resources! http://resources.scratchr.org
Offline