The Daily Click ::. Forums ::. Klik Coding Help ::. One-way Scrolling.
 

Post Reply  Post Oekaki 
 

Posted By Message

Mr Q



Registered
  06/11/2004
Points
  89
25th July, 2006 at 00:26:27 -

Hey, i was wondering if anybody could help me with something, I want one-way scrolling like Super Mario Bros. 1 so i can make bigger levels and reduce the number of active objects.

Thanks in Advance.

 
n/a

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  201

VIP MemberLikes TDCKitty
25th July, 2006 at 00:45:02 -

Don't scroll camera if X is lower then X position of left frame.
Then keep character from going behind X position of left frame.

That'll keep the Camera from going backwards and the character from going further back then the camera will show.

 
thinking is like pong, it's easy, but you miss sometimes.

Werbad



Registered
  18/09/2002
Points
  235
25th July, 2006 at 07:40:12 -

* Player X > X Left Frame + 320
- Center camera X at player

If screen width is 640

 
n/a

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  201

VIP MemberLikes TDCKitty
25th July, 2006 at 08:41:59 -

That won't keep the character from going out of left frame, just the camera. Although your formula is a little better then mine for the camera.

 
thinking is like pong, it's easy, but you miss sometimes.

Werbad



Registered
  18/09/2002
Points
  235
25th July, 2006 at 08:57:51 -

Well, he just asked for the camera, so i didn't include the colission event...

 
n/a

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
25th July, 2006 at 12:39:10 -

It's kind of obvious that you would need it though. If you want it, just have a large thin object to the far left of the screen. Then shut off "Fallow Frame" and then make it so that the active object acts as an object that you can't pass through.

 
http://www.facebook.com/truediamondgame

Werbad



Registered
  18/09/2002
Points
  235
25th July, 2006 at 12:52:02 -

Or, if you do a custom movement you can just limit the x position to X Left Frame

 
n/a

Liquixcat

Administrator
Lazy Coder

Registered
  08/12/2002
Points
  201

VIP MemberLikes TDCKitty
25th July, 2006 at 21:01:20 -

You don't need a custom movement to do that. "X.pos < X.LeftFrame" works in any engine.

 
thinking is like pong, it's easy, but you miss sometimes.
   

Post Reply



 



Advertisement

Worth A Click