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

#1 2011-02-01 20:54:15

BobertMobingston
New Scratcher
Registered: 2011-02-01
Posts: 10

How would I make the background scroll for an RPG like pokemon?

I am planing to make an action RPG with a top view just like pokemon, earthbound, and the first final fantasys. I have no idea how to make the background scroll up and down as my character moves. Does anyone know how I should do this?

Offline

 

#2 2011-02-02 10:14:29

syn_error
Scratcher
Registered: 2011-02-01
Posts: 4

Re: How would I make the background scroll for an RPG like pokemon?

Well, what you would need to do is set X and Y scrolling variables and make those variables change when your character moves up and down. The rest is just standard scrolling programs, but you need to do to sets of scrolling scripts and change the variables to the second one so that it'll scroll both up and down.

Offline

 

#3 2011-02-02 11:07:13

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: How would I make the background scroll for an RPG like pokemon?

It's actually quite simple - perhaps this Scratch Wiki article could be useful.  smile

Offline

 

#4 2011-02-03 21:54:26

BobertMobingston
New Scratcher
Registered: 2011-02-01
Posts: 10

Re: How would I make the background scroll for an RPG like pokemon?

coolstuff wrote:

It's actually quite simple - perhaps this article could be useful.  smile

Thanks. So how would I do a tile based scroll system, so lets say that I want the background to be made of tiles that are like 50 by 50 pixels.

Offline

 

#5 2011-02-03 21:59:19

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: How would I make the background scroll for an RPG like pokemon?

you want a tile for each sprite?!?!?! just combine them and you'll be fine  smile

Offline

 

#6 2011-02-03 22:20:03

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: How would I make the background scroll for an RPG like pokemon?

BobertMobingston wrote:

coolstuff wrote:

It's actually quite simple - perhaps this article could be useful.  smile

Thanks. So how would I do a tile based scroll system, so lets say that I want the background to be made of tiles that are like 50 by 50 pixels.

Lol you can't in Scratch. Scratch has poor performance with many sprites needed for tile systems and the lack of multidimentional arrays and poor ability to reference vairables makes this an impossible task. Just make large scrolling sprites, it won't let you make professional games but you can still mdake something.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#7 2011-02-03 22:39:30

BobertMobingston
New Scratcher
Registered: 2011-02-01
Posts: 10

Re: How would I make the background scroll for an RPG like pokemon?

archmage wrote:

BobertMobingston wrote:

coolstuff wrote:

It's actually quite simple - perhaps this article could be useful.  smile

Thanks. So how would I do a tile based scroll system, so lets say that I want the background to be made of tiles that are like 50 by 50 pixels.

Lol you can't in Scratch. Scratch has poor performance with many sprites needed for tile systems and the lack of multidimentional arrays and poor ability to reference vairables makes this an impossible task. Just make large scrolling sprites, it won't let you make professional games but you can still mdake something.

Alright thanks. I just wanted tiles because it would be easy to work with so I could easily make blocks that you couldnt walk through. How do you make parts of it impassable so you dont walk through walls.

Offline

 

#8 2011-02-05 10:23:14

cheekycheese
Scratcher
Registered: 2010-10-23
Posts: 11

Re: How would I make the background scroll for an RPG like pokemon?

What is the acual script that you use?
(For ScrollY, I can already do Scroll X)

Offline

 

#9 2011-02-06 00:02:28

BobertMobingston
New Scratcher
Registered: 2011-02-01
Posts: 10

Re: How would I make the background scroll for an RPG like pokemon?

http://wiki.scratch.mit.edu/wiki/Scrolling#X_and_Y_Scrolling

The one here. I want it so there are some objects that you cannot walk through like walls or other obstacles.

Offline

 

#10 2011-02-06 00:34:08

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: How would I make the background scroll for an RPG like pokemon?

http://scratch.mit.edu/projects/archtest/374330

That is the easiest way to do things, hopefully that is what you want.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#11 2011-02-06 00:51:43

BobertMobingston
New Scratcher
Registered: 2011-02-01
Posts: 10

Re: How would I make the background scroll for an RPG like pokemon?

thanks a thin black outline on what I want it not to pass will be great! One final question is how would I make some real time moving enemies sort of like legend of zelda except my game scrolls?

Offline

 

#12 2011-02-06 01:02:00

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: How would I make the background scroll for an RPG like pokemon?

You would do something like this for the enemies

set X to (scrollX+Xposition)
set Y to (scrollY+Yposition) 

In this, the variables Xposition and Yposition are used to alter the sprite's movement around the map.

For example, increase Xposition to make the enemy go to the left.


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

#13 2011-02-08 21:10:30

BobertMobingston
New Scratcher
Registered: 2011-02-01
Posts: 10

Re: How would I make the background scroll for an RPG like pokemon?

Its not really working for me. So far for the enemy this is what I have. The character wont scroll though and it dosnt move very smoothly (that may be because i am experimenting on a bat.) http://i53.tinypic.com/2vs4tvo.gif

Offline

 

#14 2011-02-08 23:47:24

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: How would I make the background scroll for an RPG like pokemon?

You didn't really even attempt my method from the look of your scripts :S

Another huge mistake you are making is moving the sprite up down left and right with the move block and directions, this is a big NO NO.

I will post a picture of the script you should have. Remember, that in a scrolling area, the scrollX, and scrollY variables must always be considered when positioning the sprite.

http://i.imgur.com/uwn3I.gif


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

Board footer