The Daily Click ::. Forums ::. Klik Coding Help ::. Metroid Style Camera
 

Post Reply  Post Oekaki 
 

Posted By Message

b0z0



Registered
  29/06/2008
Points
  109
12th November, 2009 at 08:39:14 -

I've really been messing around trying to get a metroid type camera that will just show one portion of the map and only scroll when exiting one of the four corners of the screen.

The thing is that I want to do this without using any sensor objects. I started doing it that way and it just got messy plus the game I'm working on uses mass amounts of enemies at once so I'm trying to avoid using any active objects I don't have to.

Don't worry about giving a complex method of doing it either, I've been using clickteam products for years now and will be able to handle it. Thanks in advanced guys. =D



OH! I'm using MMF2 btw.

 
n/a

b0z0



Registered
  29/06/2008
Points
  109
12th November, 2009 at 08:40:18 -

Oh one more thing. I dont need the camera to actually scroll like in Zelda or anything. It can just jump over as if it were a new frame. So dont worry about explaining how to do that.

 
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
12th November, 2009 at 10:07:09 -

simple

center horizontal = ( ( x("player") / mapscreenwidth) * mapscreenwidth ) + ( mapscreenwidth / 2.0 )
center vertical = ( ( y("player") / mapscreenheight) * mapscreenheight ) + ( mapscreenheight / 2.0 )

 
n/a

b0z0



Registered
  29/06/2008
Points
  109
12th November, 2009 at 10:24:57 -

Thanks a million dude, works perfectly.
I must admit that I have absolutely no clue why it works, cant actually make any sense of the code.
But then again, I've failed math class every year since 5th Grade so that probably has something to do with it.

 
n/a

Rob Westbrook



Registered
  25/05/2007
Points
  193

360 OwnerVIP Member
12th November, 2009 at 11:32:01 -

It's the same principle behind snapping to grid co-ordinates. It just snaps the camera to a massive grid where each cell is the size of the visible play area

 
There are 10 types of people in the world: Those who understand binary and those who don't.

Eternal Man [EE]

Pitied the FOO

Registered
  18/01/2007
Points
  2955

Game of the Week WinnerHero of TimeLOL SignI am an April Fool
12th November, 2009 at 14:33:23 -

Hmm, does that code allow for scrolling inside of rooms like metroid?
Scratch that, I actually looked at the code now.

Edited by Eternal Man [EE]

 
Eternal Entertainment's Code'n'Art Man

E_E = All Indie


...actually Ell Endie, but whatever.
Image
Image

Levirules



Registered
  27/09/2008
Points
  37
20th November, 2009 at 01:45:17 -

but... I don't remember Metroid scrolling screen-by-screen... most places in the game had smooth horizontal or vertical scrolling... so I don't get the question? Even though it's apparently been answered now?

 
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
20th November, 2009 at 07:26:48 -

metroid for the nes is similar to the scrolling in a link to the past. it smooth scrolls within a certain area and frame scrolls when you leave the area. doing that will take a bit more work to accomplish. more than one event anyways. probably not too complicated.

Edited by Cecilectomy

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
20th November, 2009 at 13:14:33 -

Maybe what he's talking about is to not have the camera move unless a specific secret is discovered?

Ex. There are some places in NES Metroid where it looks like you're up against a wall, the border of the screen and can't go any further. Then when you bomb or shoot a brick and roll through it, the camera then scrolls along with you revealing the new secret room.

I guess?

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!
   

Post Reply



 



Advertisement

Worth A Click