Discuss Scratch

KN1516
New Scratcher
14 posts

Merging 4 projects into 1?

Dear Scratch community,

I am a school student who is doing a scratch project/game as homework for I.T. class. I would like to create a ‘selection-menu’ as the front page, where players can choose to play any of 4 games that I have coded. I need to merge them into 1 project as I am not allowed to hand in more than 1. I intentionally did this because I want to include the 4 proper games all in 1 (it shows hard work
ECLIPSE-STUDIOS
Scratcher
100+ posts

Merging 4 projects into 1?

Hi,

If you haven't already, I'd recommend uploading your projects to the Scratch website (you don't need to share them) (Note that this means that whoever views/marks it must be willing to use the website or Scratch 2)

Then drag all the sprites from each of the 4 projects into your “backpack” (bottom right of the online editor). Then create/go to your selection menu project and drag all the sprites in. Replace any of the “When start flag clicked” scripts in each sprite with “When I Receive ‘gameName’ ” and when you want to start a game broadcast ‘gameName’ (replace ‘gameName’ with the name of each individual game).

You may wish to add “when start flag clicked ; hide” scripts to any sprites, but otherwise you should be OK!

I hope this helped!

Last edited by ECLIPSE-STUDIOS (June 7, 2017 13:30:53)

23halvok
Scratcher
100+ posts

Merging 4 projects into 1?

What he said.
KN1516
New Scratcher
14 posts

Merging 4 projects into 1?

Hi ECLIPSE-STUDIOS,

Thank you for your advice and quick reply. Yes, I have uploaded all the games online, as I don't use the offline editor, same with my teacher.

I really appreciate your help. I would like to ask, how do you create the menu selection interface? My idea is that the menu has 4 button, each stating the name of a game. Once clicked, the button will play the game stated on it. After the game is over, I need the game to go back to the menu, ready for the player to choose a new game. (I will include instructions)

The backpack function- I have only found vague answers on how to use it. So I am assuming that once I put the sprites into the backpack, I open the selection menu interface project and I open the backpack at the bottom of the screen, and the sprites will be there.

Also, the variables is another thing I'm worried about. I have never tried this before, so I don't know what will happen. Will the variables and code get mixed up and all play at once, creating a mess of 4 games jumbled up? I have noted to change the ‘When green flag clicked“ script in each sprite with ”When I receive gameName". Is gameName a variable and which scrips do I have to use to activate gameName?

Thank you so much. I really want to get this right because if I fail, it’ll take a big toll on my grades for the end of the year. By the way, his project is due on June the 18th, 2017.


Best regards,

KN1516
Year 7 student

KingOfAwesome58219
Scratcher
1000+ posts

Merging 4 projects into 1?

Here goes!

KN1516 wrote:

Hi ECLIPSE-STUDIOS,

Thank you for your advice and quick reply. Yes, I have uploaded all the games online, as I don't use the offline editor, same with my teacher.

I really appreciate your help. I would like to ask, how do you create the menu selection interface? My idea is that the menu has 4 button, each stating the name of a game. Once clicked, the button will play the game stated on it. After the game is over, I need the game to go back to the menu, ready for the player to choose a new game. (I will include instructions)
Clicking on a button will cause it to broadcast a new broadcast different for every game. There will also be a broadcast for the menu, which will be broadcast when the game has ended.
example, this script would go in one of the button sprites:
when this sprite clicked
broadcast [Menu Close v] // this will be used to tell all the menu related sprites to hide
broadcast [game1 v] // change the name of this broadcast to whatever the name of the game is
hide // hides the button

KN1516 wrote:

The backpack function- I have only found vague answers on how to use it. So I am assuming that once I put the sprites into the backpack, I open the selection menu interface project and I open the backpack at the bottom of the screen, and the sprites will be there.
You nailed it.

KN1516 wrote:

Also, the variables is another thing I'm worried about. I have never tried this before, so I don't know what will happen. Will the variables and code get mixed up and all play at once, creating a mess of 4 games jumbled up?
Not quite. All variables in the sprite will be converted to local (in this sprite only) variables - you might have to recreate variables so that they work between sprites, or rename some if different projects have the same variable names.

KN1516 wrote:

I have noted to change the 'When green flag clicked“ script in each sprite with ”When I receive gameName". Is gameName a variable and which scrips do I have to use to activate gameName?
gameName is a filler word for what you would name the broadcast.
when I receive [gameName v] // change the name of the broadcast to the name of the game.

KN1516 wrote:

Thank you so much. I really want to get this right because if I fail, it'll take a big toll on my grades for the end of the year. By the way, his project is due on June the 18th, 2017.
I hope you do well!
This project will probably take a lot of sorting out, and won't work instantly. Use the least amount of sprites as possible in each of the games. Good luck!

Best regards,

KN1516
Year 7 student



Last edited by KingOfAwesome58219 (June 10, 2017 06:14:21)

footsocktoe
Scratcher
1000+ posts

Merging 4 projects into 1?

KN1516 wrote:

Hi ECLIPSE-STUDIOS,

Thank you for your advice and quick reply. Yes, I have uploaded all the games online, as I don't use the offline editor, same with my teacher.

I really appreciate your help. I would like to ask, how do you create the menu selection interface? My idea is that the menu has 4 button, each stating the name of a game. Once clicked, the button will play the game stated on it. After the game is over, I need the game to go back to the menu, ready for the player to choose a new game. (I will include instructions)

The backpack function- I have only found vague answers on how to use it. So I am assuming that once I put the sprites into the backpack, I open the selection menu interface project and I open the backpack at the bottom of the screen, and the sprites will be there.

Also, the variables is another thing I'm worried about. I have never tried this before, so I don't know what will happen. Will the variables and code get mixed up and all play at once, creating a mess of 4 games jumbled up? I have noted to change the ‘When green flag clicked“ script in each sprite with ”When I receive gameName". Is gameName a variable and which scrips do I have to use to activate gameName?

Thank you so much. I really want to get this right because if I fail, it’ll take a big toll on my grades for the end of the year. By the way, his project is due on June the 18th, 2017.


Best regards,

KN1516
Year 7 student


Here is a project that I made that combines five projects into one. Feel free to use the menu selection technique.

https://scratch.mit.edu/projects/95092677/

Here are some tips I found out…

1. Do not have any scripts in the stage, just in the sprites.

2. Make sure no sprite in any of the five projects has the same name as another sprite.

3. Make sure no variable in any of the projects has the same name as another variable.

4. Make sure there are no broadcast messages that are the same in any project.

5. Try to change all variables to local if you can. Global will cause trouble later.

6. After you have done all that, then you have to transfer copies of all the sprites to the new project. I use the download/upload method but I suppose the backpack will also work.

7. You will need a “control” sprite that decides which project plays 1st, 2nd, and so on.

8. You will need to recreate any global variables since they will not survive the transfer.

9. I can't think of anything else, but post here if you are successful or need more help.
KN1516
New Scratcher
14 posts

Merging 4 projects into 1?

Hi KingOfAwesome58219 and footsocktoe,

Thank you so much for your help. I can finally see some sort of dim light at the end of the tunnel? (basically, I think I just may be able to pull this off).
I really appreciate the quick reply, I didn't expect this. The scratch discussion forums have surprised me again. I now know that this is do-able, and I probably have enough resources to try this.

Is there any more tips? I would like to be absolutely as sure as possible. Anything about the backpack functions, techniques, or troubles I may encounter? What may first happen when I try this out? By the way, I'm not sure about the global and local variables. I am relatively new to scratch.

Best regards,
KN1516
KN1516
New Scratcher
14 posts

Merging 4 projects into 1?

Hello footsocktoe,

Just a short message, but your 5 skit project is exactly what I have in mind. Selection menu, choose the skit and when over, the interface turns back into the selection menu. A side note- your skits were really hilarious, I really loved them.

Credits will be given to those who have helped.

Best regards,
KN1516
footsocktoe
Scratcher
1000+ posts

Merging 4 projects into 1?

KN1516 wrote:

Hi KingOfAwesome58219 and footsocktoe,

Thank you so much for your help. I can finally see some sort of dim light at the end of the tunnel? (basically, I think I just may be able to pull this off).
I really appreciate the quick reply, I didn't expect this. The scratch discussion forums have surprised me again. I now know that this is do-able, and I probably have enough resources to try this.

Is there any more tips? I would like to be absolutely as sure as possible. Anything about the backpack functions, techniques, or troubles I may encounter? What may first happen when I try this out? By the way, I'm not sure about the global and local variables. I am relatively new to scratch.

Best regards,
KN1516

local variable = for this sprite only
global variable = for all sprites

Global variables cannot survive a move through the backpack or being inserted into other projects, so you will want to have as few of them as possible because you will have to recreate them in the new project. Local variables will be included in the sprite file and will do fine. Just try not to use the same name twice.
footsocktoe
Scratcher
1000+ posts

Merging 4 projects into 1?

KN1516 wrote:

Hello footsocktoe,

Just a short message, but your 5 skit project is exactly what I have in mind. Selection menu, choose the skit and when over, the interface turns back into the selection menu. A side note- your skits were really hilarious, I really loved them.

Credits will be given to those who have helped.

Best regards,
KN1516

Thanks!
KN1516
New Scratcher
14 posts

Merging 4 projects into 1?

Hi footsocktoe,

Was it troublesome merging 5 skits into 1 big project, and can someone not so advanced in scratch pull this off?

Best regards,
KN1516
footsocktoe
Scratcher
1000+ posts

Merging 4 projects into 1?

KN1516 wrote:

Hi footsocktoe,

Was it troublesome merging 5 skits into 1 big project, and can someone not so advanced in scratch pull this off?

Best regards,
KN1516

You don't need to be advanced, but it's probably best not to be a beginner who never made a project.

Any project has two components, the sprites and the backdrop. It's easy to move the sprites from project to project because any project can have many sprites.

But a project can only have one backdrop script, so when combining projects, it's important that none of them have backdrop scripts. If they do, then create a new sprite in that project, and move the backdrop script into it. You might have to make changes depending on how the scripts are written.
DisasterPug
Scratcher
100+ posts

Merging 4 projects into 1?

when I receive [Game1 v]
That will act like the
when green flag clicked
of game one. So just pretend like it's the when green flag clicked block but only works for game one. Just make sure at the beginning the when green flag clicked hides everything from previous games just in case someone wants to play it twice.
KN1516
New Scratcher
14 posts

Merging 4 projects into 1?

Hi footsocktoe,

What do I do if I have backdrop scripts?

Best regards,
KN1516
footsocktoe
Scratcher
1000+ posts

Merging 4 projects into 1?

KN1516 wrote:

Hi footsocktoe,

What do I do if I have backdrop scripts?

Best regards,
KN1516

Create a new sprite in that project, and move the backdrop script into it. You might have to make some changes depending on how the scripts are written.
KN1516
New Scratcher
14 posts

Merging 4 projects into 1?

Hi footsocktoe,

Thank you SO much for all your help. I have finished the merging 1 week ago! I figured out the issue with the variables and everything is working great!

There is 1 thing I would like to improve which is related to the ‘Spaceship game’
https://scratch.mit.edu/projects/165593495/ This is the URL to the project. Please go to the editor, and look at the code for the sprite named ‘Rocks’.
There is the usual controls, then a stopwatch which starts as you play the game, and as one plays for the longer, the timer will broadcast messages which make the rock go faster. You can try the game, the name is Spaceship game' Unfortunately, when thee is a ‘Level up’ (basically when the rock starts to go faster), instead of the rock going faster and everything else doesn't change, the rock glitches out and the shooter doesn't shoot it and the game randomly ends. Maybe the screen can't refresh itself fast enough? I hope you can find a solution to this problem. I aim to make the game progressively harder.

Please tell me if you find any more problems with the other 3 games, and I'll try to fix it.

BTW, the game is made with a different account.

Best regards,
KN1516
KN1516
New Scratcher
14 posts

Merging 4 projects into 1?

Hi footsocktoe,

I used the timer because I want the difficulty to progress over time.

Best regards,
KN1516
footsocktoe
Scratcher
1000+ posts

Merging 4 projects into 1?

KN1516 wrote:

Hi footsocktoe,

Thank you SO much for all your help. I have finished the merging 1 week ago! I figured out the issue with the variables and everything is working great!

There is 1 thing I would like to improve which is related to the ‘Spaceship game’
https://scratch.mit.edu/projects/165593495/ This is the URL to the project. Please go to the editor, and look at the code for the sprite named ‘Rocks’.
There is the usual controls, then a stopwatch which starts as you play the game, and as one plays for the longer, the timer will broadcast messages which make the rock go faster. You can try the game, the name is Spaceship game' Unfortunately, when thee is a ‘Level up’ (basically when the rock starts to go faster), instead of the rock going faster and everything else doesn't change, the rock glitches out and the shooter doesn't shoot it and the game randomly ends. Maybe the screen can't refresh itself fast enough? I hope you can find a solution to this problem. I aim to make the game progressively harder.

Please tell me if you find any more problems with the other 3 games, and I'll try to fix it.

BTW, the game is made with a different account.

Best regards,
KN1516

The link did not work.
KN1516
New Scratcher
14 posts

Merging 4 projects into 1?

Hi footsocktoe,

I just used the URL of the game.
Do I have to share it before it can be viewed?

Best regards,
KN1516
footsocktoe
Scratcher
1000+ posts

Merging 4 projects into 1?

KN1516 wrote:

Hi footsocktoe,

I just used the URL of the game.
Do I have to share it before it can be viewed?

Best regards,
KN1516

Yes.

Powered by DjangoBB