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

#1 2011-06-21 16:47:31

HeroOfTwilight
New Scratcher
Registered: 2011-06-21
Posts: 5

Help needed on side scrolling game!

For example, in the Example Games, there is a example of a side scrolling game. But the character always looks like it vibrates when it is on the ground - and I don't like it. Please help me get rid of this!

Offline

 

#2 2011-06-21 18:27:47

peterkap
Scratcher
Registered: 2009-01-24
Posts: 1000+

Re: Help needed on side scrolling game!

Offline

 

#3 2011-06-21 19:13:01

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help needed on side scrolling game!

That's because the character sinks into the ground, then is pushed back up, then sinks back down, etc. I believe that it's actually unnoticeable if you enter the stage view, but you can also fix it by making the sprite not go up when touching the ground. The disadvantage, however, is that the sprite will go right through upward slopes.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#4 2011-06-22 13:35:45

HeroOfTwilight
New Scratcher
Registered: 2011-06-21
Posts: 5

Re: Help needed on side scrolling game!

Olkay, thanks, but how do you make the sprite actually bumps on walls, and not flow upwards?

Offline

 

#5 2011-06-22 13:47:39

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help needed on side scrolling game!

For that you'll need a sensor sprite that looks something like this:
http://i.imgur.com/aOX8d.png
The sensor follows the player around. If one side is touching something like a wall it sets a variable (such as right_hittest) to 1. Then on the player sprite, make it so that it can't move right if right_hittest is equal to 1.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#6 2011-06-22 14:07:08

HeroOfTwilight
New Scratcher
Registered: 2011-06-21
Posts: 5

Re: Help needed on side scrolling game!

Des that still work if I hide that sensor sprite?

Offline

 

#7 2011-06-22 14:15:30

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Help needed on side scrolling game!

I'm not sure about hiding it. The standard way is to set the ghost effect to 100%.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#8 2011-06-23 09:28:06

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

Re: Help needed on side scrolling game!

I'll create a tutorial. I'm an expert on these things.


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

#9 2011-06-23 11:57:29

HeroOfTwilight
New Scratcher
Registered: 2011-06-21
Posts: 5

Re: Help needed on side scrolling game!

thanks

Offline

 

#10 2011-06-23 12:34:45

rabbit1131
Scratcher
Registered: 2009-10-16
Posts: 1000+

Re: Help needed on side scrolling game!

Here is the tutorial! Hope this helps   smile

Last edited by rabbit1131 (2011-06-23 12:35:53)


The Intergalactic Adventures of Revesilia! I hope you will partake in this gigantic undertaking, to build the sequel to the hit map The Adventures of Revesilia! The Intergalactic Adventures of Revesilia Map Builders Application thread! http://internetometer.com/image/35004.png

Offline

 

Board footer