The Daily Click ::. Forums ::. Klik Coding Help ::. How to do the zelda style scrolling
 

Post Reply  Post Oekaki 
 

Posted By Message

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
18th May, 2010 at 00:07:33 -

I remember downloading a code for it, but i deleted it. Does anyone else no how to do it?

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
18th May, 2010 at 01:54:25 -

I'm not at all confident about this, but it's worth a try:

+ Always
-> Center Display Horizontally at:
(X Right Frame+X Left Frame)/2+Max(-Scroll Speed, Min(Scroll Speed, (X( "Player" )/(X Right Frame-X Left Frame)*(X Right Frame-X Left Frame)-(X Left Frame))))

-> Center Display Vertically at:
(Y Bottom Frame+Y Top Frame)/2+Max(-Scroll Speed, Min(Scroll Speed, (Y( "Player" )/(Y Bottom Frame-Y Top Frame)*(Y Bottom Frame-Y Top Frame)-(Y Top Frame))))

 
n/a

Sumo148

Super amazing fantastic user

Registered
  26/01/2009
Points
  530

360 OwnerThe Cake is a LieVIP MemberPokemon Ball!I am an April FoolI donated an open source projectSanta Hat
18th May, 2010 at 02:04:02 -

Sketchy always has the math formula ready for any problem

 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
18th May, 2010 at 02:19:50 -

I copied and pasted them both but they didn't work. I doubt it would help if i actually typed it because i would just follow it exactly...

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
18th May, 2010 at 02:42:14 -

Hmmm. I don't remember where that code came from, but I guess I copied it wrong somehow...
Anyway, I know there are at least a couple of examples on the clickteam forums - just search for "zelda".

eg. http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=116779&Searchpage=4&Main=10662&Words=zelda&Search=true#Post116779

 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
18th May, 2010 at 02:48:58 -

cool thank you very much

 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
18th May, 2010 at 02:57:41 -

Hmm im having trouble incorpotating it into PMO code. I remember someone having the code for a scrolling like that, except it just jumped not scrolled from place to place.

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
18th May, 2010 at 03:00:29 -

lol the code came from YOUR snippet manager sketchy. lol.

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
18th May, 2010 at 03:35:39 -

Yeah, but I originally copied it from another example I saw somewhere. I think it may have been for TGF or something? Definitely off the old clickteam forums, before they were removed.
It's such a shame they're no longer available - they had tons of useful stuff that had been made for MMF1.5 / TGF1, but was still useful in MMF2.

 
n/a

Watermelon876



Registered
  16/04/2009
Points
  27

I am an April FoolVIP Member
18th May, 2010 at 04:12:33 -

Zelda Scrolling Widget on Clickteam forums file archive.

 
Awesomeness is Watermelon.
*/l、
゙(゚、 。 7
l、゙ ~ヽ
じしf_, )ノ
This is Koji. Copy and paste Koji to your sig so he can acheive world domination.

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
19th May, 2010 at 01:40:01 -

Really i would prefer the way IWBTG scrolls, if you guys know what i mean

 
n/a

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
19th May, 2010 at 06:49:12 -

Nope ... what do you mean? ... I haven't played that yet.
I have an amazing zelda style scrolling that I made for the Lost Valley 2 project that Jason Orme, BeamSplashX, and I were working on, but they didn't seem too excited about the earlier versions because they wanted to keep it simple (thought I couldn't do it) or didn't think it fit the style of the game, and they sorta quit on LV2 until later anyway (to us procrastinators, later never comes), so ... yea .. if you want me to show that to you, I could. I haven't even shown them the final versions of it (after I put the zelda-ish into the scrolling), because they lost interest and/or had other things they were busy with at the time. I was sorta hoping that Jason and Beam would startup on the project again, but I just don't see it happening and I completely understand cause there's been a ton of things that I have given up on and left abandoned <shrugs> ;it happens.

I'll need to go back and comment it up a bit first, but it has more than just scrolling in it. There's spread values, re-using of actives across infinite frames, a nice and easy way to do some visual layering, and of course the zelda-ish scrolling itself. I'm proud to say that it's some of my best work and in my opinion the best and easiest to understand example of zelda style scrolling available.

That zelda scrolling widget is graphically pretty and I'm impressed that it's contained all within one active, but there's alot of code in it and just glancing over it, I understood very little. Of course, for all I know, my code may look like hieroglyphs to others too.
Oh yea, something that bothered me about that widget was the examples done for it, as the enemy movement wasn't on a grid style, but the character movement was. What's with that? It made trying to hit the enemies a little irritating and threw off the style.
If it were all mismatched it wouldn't have bother me, but for some reason when things are all nice and uniform except something so obvious as that, well I dunno why but it just annoys me. The funny thing is that I've probably done the same thing alot without realising it.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
19th May, 2010 at 22:42:59 -

Heres a video that shows what i mean MBK


Edited by Jon C-B

 
n/a

Watermelon876



Registered
  16/04/2009
Points
  27

I am an April FoolVIP Member
20th May, 2010 at 02:51:37 -

Go to nifflas's site and download the source for Knytt. (The original, not Knytt stories)

 
Awesomeness is Watermelon.
*/l、
゙(゚、 。 7
l、゙ ~ヽ
じしf_, )ノ
This is Koji. Copy and paste Koji to your sig so he can acheive world domination.

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
20th May, 2010 at 02:58:33 -

I couldn't find the source for it...

 
n/a

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
20th May, 2010 at 04:10:16 -

So that's all you wanted? That's more like my earlier version before I added in the bit that makes it slowly scroll to the next screen.
That's a bit like Kirby isn't it? ... not Zelda.
It's just the Zelda style but without that little extra that makes it move over with the camera instead of jumping straight over.

All you have to do is make a camera active, and set the screen to always center on it, then only move it when you reach the edge of the screen. And when you do reach that edge, you should have xmin, xmax, ymin, and ymax variables, and add to them the first screen size (between 0 and whatever) when you go right, and delete that when you go left. Same for up and down but using the ymin and ymax.
Oh, and always set the camera active to half of the xmax for x and half of the ymax for y.
Come to think of it, you may not even need the mins when doing it this way, just the max's.
The code I made used both so I'm not sure if it matters or not.

Yea, I wanted that original Knytt source too, never did find it btw.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
21st May, 2010 at 01:23:31 -

Oh i actually did find one, but its worked into the code of the whole game... its quite frustrating there was just one simple math code that did this!

 
n/a

UrbanMonk

BRING BACK MITCH

Registered
  07/07/2008
Points
  49567

Has Donated, Thank You!Little Pirate!ARGH SignKliktober Special Award TagPicture Me This Round 33 Winner!The Outlaw!VIP MemberHasslevania 2!I am an April FoolKitty
Picture Me This Round 32 Winner!Picture Me This Round 42 Winner!Picture Me This Round 44 Winner!Picture Me This Round 53 Winner!
21st May, 2010 at 16:46:40 -

It depends on the resolution of your game.

Assuming your game is in the 640x480 resolution this is what you do.

Always
-set horizontal scroll position to: 320+(X("player")/640)*640
-set verticle scroll position to: 240+(Y("player")/480)*480

that will work.

 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
21st May, 2010 at 22:01:55 -

The window size is 480 x 320. But when i put it in and run it the screen starts shaking

 
n/a

Mkingy



Registered
  05/07/2003
Points
  4771

Box Blue
21st May, 2010 at 22:14:43 -

so using Urbanmonk's solution:

Always
-set horizontal scroll position to: 240+(X("player")/480)*480
-set verticle scroll position to: 160+(Y("player")/320)*320

I just tried it and it works fine, you must have mistyped something, or got duplicate scrolling events...

 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
21st May, 2010 at 22:23:42 -

same thing happening. here ill show you
http://www.mediafire.com/?tdzmqtck05h

 
n/a

Mkingy



Registered
  05/07/2003
Points
  4771

Box Blue
21st May, 2010 at 22:42:15 -

Group platform engine => movement

You've got a scrolling event setting the display to -60 of the player

Delete it!

 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
22nd May, 2010 at 00:29:02 -

i dont understnd what you mean...

 
n/a

Jon C-B

I create vaporware

Registered
  23/04/2008
Points
  237

I'm an alien!VIP MemberWii OwnerI donated an open source project Santa Hat
22nd May, 2010 at 19:39:27 -

Oh i see now thank you very much!

 
n/a
   

Post Reply



 



Advertisement

Worth A Click