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

#1 2009-09-21 16:08:50

adowney530
Scratcher
Registered: 2009-09-21
Posts: 2

making levels in games

If you aren't using seperate sprites for the levels, you need a plain background. Make sure that your person Is always falling unless touching the ground colour/sprite. When transitioning between levels, first add a level variable. when touching exit sprite/colour, make the character go to a start point, Then change level by one. For the stage put 'When flag clicked, forever set background to 'level variable'.' Make sure that the title screen either counts as level 1, or make it a sprite. Remember to put 'If flag clicked, set level to 1,'  so You always start at level 1. It's easy when you try it out yourself. Levels will be better if the exit is mostly in a new place each time.


http://www.deviantart.com/download/167661803/Alatreon_by_MCMR.jpg
The travelling entemologist

Offline

 

#2 2009-09-22 11:33:01

diqky
Scratcher
Registered: 2009-09-20
Posts: 12

Re: making levels in games

i will try it

Offline

 

#3 2009-09-26 22:06:58

scratch_yoshi
Scratcher
Registered: 2009-06-12
Posts: 1000+

Re: making levels in games

adowney530 wrote:

If you aren't using seperate sprites for the levels, you need a plain background. Make sure that your person Is always falling unless touching the ground colour/sprite. When transitioning between levels, first add a level variable. when touching exit sprite/colour, make the character go to a start point, Then change level by one. For the stage put 'When flag clicked, forever set background to 'level variable'.' Make sure that the title screen either counts as level 1, or make it a sprite. Remember to put 'If flag clicked, set level to 1,'  so You always start at level 1. It's easy when you try it out yourself. Levels will be better if the exit is mostly in a new place each time.

So what you're saying is this:
For the background:

[blocks]<when green flag clicked>[/blocks]
[blocks]<set{ level }to( 1[/blocks]
[blocks]<forever>[/blocks]
switch to background <{ level }>[/blocks]
[blocks]<end>[/blocks]
And for the character:

[blocks]<when green flag clicked>[/blocks]
[blocks]<forever if>[/blocks] [blocks]<touching color[ end point color[/blocks]
[blocks]<go to x sad  X axis of where you started  )y sad  Y axis of where you started[/blocks]
[blocks]<end>[/blocks]
That's at least how I would put it!


Retired from Scratch, but just the language itself. Not the forums.

Offline

 

#4 2009-09-26 22:19:42

greenflash
Scratcher
Registered: 2009-05-27
Posts: 1000+

Re: making levels in games

For the character sprite it should be:

[blocks]
<when green flag clicked>
<forever if><touching color[ end color
<change{ level  }by( 1
<set x to( starting x
<set y to( starting y
[/blocks]

instead.  smile


http://i48.tinypic.com/2wrkirk.pnghttp://i46.tinypic.com/6r5zk7.pnghttp://i45.tinypic.com/2vtxr1t.png

Offline

 

#5 2009-09-28 10:26:36

checkin
Scratcher
Registered: 2009-09-28
Posts: 6

Re: making levels in games

yep, sprite approach is very helpful. it helps to economize a lot of file size. that's why it is essential part in memory size. btw, what tools do you use for sprite creation and management?

Last edited by checkin (2009-09-28 10:28:28)

Offline

 

Board footer