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

#1 2012-02-19 21:19:37

Mokat
Scratcher
Registered: 2011-12-08
Posts: 1000+

How do I make a platformer?

I'm wondering how I make a platformer. I don't know anything about how to make a platformer. Can someone tell me how to script the platformer thing (the thing that platforms) to get it to work? Please tell me.


http://www.eggcave.com/egg/977371.pnghttp://www.eggcave.com/egg/977376.pnghttp://www.eggcave.com/egg/1005291.pnghttp://www.eggcave.com/egg/996745.png

Offline

 

#2 2012-02-20 01:22:52

ProgramCAT
Scratcher
Registered: 2011-12-13
Posts: 500+

Re: How do I make a platformer?

Try this.


Programming is an art...
Goodbye, Scratch. I am leaving because of the exams coming up at our school, though I'll check the forums once or twice a week.

Offline

 

#3 2012-02-20 07:27:18

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: How do I make a platformer?

Try this.  It may be kind of advanced (it uses x and y velocity), but, on the bright side, all of it fits into one script in one sprite, and doesn't require extra costumes.

Last edited by MoreGamesNow (2012-02-20 07:28:34)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#4 2012-02-20 10:49:36

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: How do I make a platformer?

when green flag clicked
set [y velocity v] to [0]
forever
if <touching color [#36E813]?>
  if <key [up arrow v] pressed?>
  set [y velocity v] to (10)
  else
  set [y velocity v] to (1)
  end
 else
   change [y velocity v] by (-1)
end
change y by (y velocity)
end
Change the bit in the "Touching colour [  ]?" block to the colour of the platforms though.

Last edited by RedRocker227 (2012-02-20 10:49:56)


Why

Offline

 

#5 2012-02-20 10:54:12

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: How do I make a platformer?

just use this.
http://www.google.com/url?q=http://scratch.mit.edu/projects/Chronicle/1239285&sa=U&ei=W2xCT6eEL8a_0QHI4JTDBw&ved=0CAQQFjAA&client=internal-uds-cse&usg=AFQjCNHSsSU0Fo5KI7IS7GaYlnRBtbBUWQ


Get ready for domination of:  tongue

Offline

 

#6 2012-02-20 11:04:18

Magnie
Scratcher
Registered: 2007-12-12
Posts: 1000+

Re: How do I make a platformer?

With sensor sprites and scrolling you can make a platform game.  smile

For scrolling, make an "object" sprite become the background and have the platforms and stuff on it. Then you can add movement (jumping, etc) and check for floors with the sensor sprite.  smile

Offline

 

#7 2012-02-26 16:17:10

jarito
Scratcher
Registered: 2011-11-20
Posts: 18

Re: How do I make a platformer?

here's a really simple way!

when gf clicked
forever
if <touching color [#00FF00] ?>
change y by (1) 
else
change y by (-1)

when gf clicked
forever
if <key [right arrow v] pressed?>
change x by (5)
end
if <key [left arrow v] pressed?>
change x by (-5)
end
if <touching color [#00FF00] ?>
if <key [up arrow v] pressed?>
change y by (10) 

Offline

 

Board footer