Author Topic: plat-former scrolling help  (Read 3366 times)

0 Members and 1 Guest are viewing this topic.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
plat-former scrolling help
« on: January 20, 2012, 04:22:51 pm »
So I'm trying to make a plat-former (tilemapped) and I want to have scrolling so when I go far enough to the left or right the screen moves with you, like the old mario games :) problem is I don't know how :P I do have the tile map stuff, but if someone could direct me to a tutorial or maybe they could help me I'd appreciate it :) Thanks
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline parserp

  • Hero Extraordinaire
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1455
  • Rating: +88/-7
  • The King Has Returned
    • View Profile
Re: plat-former scrolling help
« Reply #1 on: January 20, 2012, 04:40:49 pm »
in axe?

I found this post very useful to start out: http://ourl.ca/14189/271878

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: plat-former scrolling help
« Reply #2 on: January 20, 2012, 04:45:14 pm »
ok thanks I'll check it out
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: plat-former scrolling help
« Reply #3 on: January 20, 2012, 05:15:06 pm »
ok here is my code, I'd appreciate it if someone could show me where I need to put in stuff to all me to scoll...and yes I know the tiles map GDB1 will need to be wider but I'll change that later

Code: [Select]
:.TILES
:Full
:Lbl TMAP
:ClrDraw
:[010101010101010101010101]→GDB1
:[010000000000000000000001]
:[010000000000000000000001]
:[010000000000000101010101]
:[010000000000000000000001]
:[010001010100000000000001]
:[010000000000000000000001]
:[010101010101010101010101]
:[7E81A581A599817E]→Pic1
:For(B,0,7)
:For(A,0,11)
:{B*12+A+GDB1}→T
:If T
:T--
:Pt-On(A*8,B*8,T*8+Pic1)
:DispGraph
:End
:End
:End
:[3C429581818D423C]→Pic1MAN
:[003C7E7E7E7E3C00]→Pic2MAN
:[3C42A98181B1423C]→Pic3MAN
:45→X:45→Y:0→J:1→D
:Repeat getKey(15)
:
:Pt-On(X,Y,Pic2MAN)r
:If getKey(2) and (pxl-Test(X-1,Y+6)=0) and (pxl-Test(X-1,Y+1)=0)
:X--
:2→D
:End
:If getKey(3) and (pxl-Test(X+8,Y+6)=0) and (pxl-Test(X+8,Y+1)=0)
:X++
:1→D
:End
:If getKey(4) and (pxl-Test(X+1,Y+8) or pxl-Test(X+7,Y+8)
:18→J
:End
:If (J>0)
:Y--
:J--
:End
:If (pxl-Test(X+6,Y+8)=0) and (pxl-Test(X+1,Y+8)=0) and (J=0) or (pxl-Test(X,Y) or (pxl-Test(X+7,Y)
:Y++
:0→J
:End
:If getKey(1) and (pxl-Test(X,Y+8)=0) and (pxl-Test(X,Y+8)=0)
:Y++
:0→J
:End
:If (D=1)
:Pt-Change(X,Y,Pic1MAN)
:End
:If (D=2)
:Pt-Change(X,Y,Pic3MAN)
:End
:Pause 25
:DispGraph
:DispGraphr
:ClrDrawr
:If (D=1)
:Pt-Change(X,Y,Pic1MAN)
:End
:If (D=2)
:Pt-Change(X,Y,Pic3MAN)
:End
:End
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: plat-former scrolling help
« Reply #4 on: January 20, 2012, 07:54:27 pm »
*cough
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES: