PDA

View Full Version : Different kind of Scroller ... using map and char to move?



patricktheking
July 14th, 2005, 05:50 PM
Im eager to make a certain type of scroller for my game which is an rpg. At first I was just going to have each section of the town on different frames (ie. get there by hittest) but i think ive decided on using a special scroller if possible.

i was thinking of a traditional scroller where the character stays in the middle of the screen, but, when the background reaches the limit the character moves while the background stays still.

i attempted a few things that were seeing y axis of both but to no luck....
any help

Smee
July 14th, 2005, 07:01 PM
Well, the way I do scrolling is I put everthing (background, characters, movement actions) inside a MovieClip, usually called "Screen". Then move the screen around depending on where the character is.

Here's an example:

patricktheking
July 14th, 2005, 07:24 PM
i like that

very similer to what i was looking for... any other possibilities (i really like yours smee but just wondering if there are any other posibilities)

bandinopla
July 14th, 2005, 07:27 PM
Did you read the tonypa tbw tutorial? that might help you a LOT!

www.tonypa.pri.ee/tbw

patricktheking
July 14th, 2005, 07:50 PM
Smee i cant get a hittest to work with that. baninopla ill check out tonypa later, but im sure he just does tile based games

heres am example of the hittest i use and it works normally but its screwed up with the scroller..

ps. i put it in MX because i like working in mx better (dun ask why, 2004 slows the **** outta my pc)

Smee
July 14th, 2005, 08:11 PM
The problem is that you need to add the position of the Screen to the hitTest points.

patricktheking
July 14th, 2005, 08:40 PM
thankyou... need a fast frame rate for it to be smooth though... thats what i was missing.... thanks though

patricktheking
July 15th, 2005, 11:24 PM
sorry to bring this up again but again after experimenting with this scroller, no matter how high i put the frame rate (30, 60, 90) the character is always able to slightly go inside the walls while moving(it does fix itself after a couple secs but it is noticable). I was wondering if there are any other smooth scrollers for art based games similar to leights scroller.

http://sky.prohosting.com/pathide/BETA_9.rar

lookit that... i made a huge stage. no lag.... how is that possible for the art based game.

anyways wondering if its possible for this unlaginess in rpg style games. is it possible to do art based tile games? similar to tile but again only generating maybe a square at a time? dun know.

patricktheking
July 17th, 2005, 01:49 PM
sorry to bring this up again but again after experimenting with this scroller, no matter how high i put the frame rate (30, 60, 90) the character is always able to slightly go inside the walls while moving(it does fix itself after a couple secs but it is noticable). I was wondering if there are any other smooth scrollers for art based games similar to leights scroller.

http://sky.prohosting.com/pathide/BETA_9.rar

lookit that... i made a huge stage. no lag.... how is that possible for the art based game.

anyways wondering if its possible for this unlaginess in rpg style games. is it possible to do art based tile games? similar to tile but again only generating maybe a square at a time? dun know.

still bit confused...

Smee
July 17th, 2005, 08:46 PM
That would be a problem with the collision, not the frame rate. The frame rate only changes how many times something is done every second. If it's doing the same thing, only faster, then it will have the same effect, only happen quicker (Unless you're using getTimer or setInterval and the like).

About the unlagginess in art based collision in RPGs.. Yes, but the main reason you are not seeing much lag is because you are using bitmaps, instead of vectors.

patricktheking
July 17th, 2005, 09:07 PM
so what would u recomend for the scrolling part?... export tiles as bitmaps, import them back in and use em how i would normally?

Smee
July 17th, 2005, 09:10 PM
That would speed it up, as long as you don't use too many tiles. Another reason art based is faster is because you only have one background MovieClip moving along with the character. In a tile based game, you have many little MovieClips moving.

patricktheking
July 17th, 2005, 10:39 PM
well just wondering though what i should use for scrolling that has a better collision delay.