Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Why do 2D games have main character locked in the middle of the screen


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
14 replies to this topic

#1 warnexus   Prime Members   -  Reputation: 1504

Like
0Likes
Like

Posted 20 November 2013 - 09:53 PM

Edit: Not how but Why?

 

Why do 2D games have the main character locked in the middle of the screen when the character starts to move to the middle of the game screen?

 

Mario NES, Kirby GBA, Megaman NES, Ghost and Goblins NES all do this.

 

There are exceptions where the main character to "break out of the lock". This happens when Kirby needs to go to a door or when megaman needs to climb a ladder


Edited by warnexus, 20 November 2013 - 09:58 PM.


Sponsor:

#2 Dragonsoulj   Crossbones+   -  Reputation: 2126

Like
2Likes
Like

Posted 20 November 2013 - 09:58 PM

Viewport (Camera) is locked on the main character's coordinates, as the character moves, so does the camera.



#3 Kryzon   Prime Members   -  Reputation: 3314

Like
9Likes
Like

Posted 20 November 2013 - 10:29 PM

The centre of the screen is the best framing to give the player enough visual information of what's coming ahead as well as what's behind him, if he needs to head back.


Edited by Kryzon, 20 November 2013 - 10:30 PM.


#4 reenigne   Members   -  Reputation: 199

Like
1Likes
Like

Posted 21 November 2013 - 07:13 AM

It has to do with the ability to react the Mario brother games for example once you get moving and pass some items you could potentially have stuff come at you from behind. Remember not everything on those screens moves in just one direction. If you were stuck against the left side of the screen or close to it you first may not see it before it could effect you and you just may not have the time to react. 



#5 warnexus   Prime Members   -  Reputation: 1504

Like
0Likes
Like

Posted 21 November 2013 - 07:15 AM

The centre of the screen is the best framing to give the player enough visual information of what's coming ahead as well as what's behind him, if he needs to head back.


Good point! Thanks

#6 warnexus   Prime Members   -  Reputation: 1504

Like
0Likes
Like

Posted 21 November 2013 - 07:16 AM

It has to do with the ability to react the Mario brother games for example once you get moving and pass some items you could potentially have stuff come at you from behind. Remember not everything on those screens moves in just one direction. If you were stuck against the left side of the screen or close to it you first may not see it before it could effect you and you just may not have the time to react.


True.

#7 kburkhart84   Members   -  Reputation: 1757

Like
3Likes
Like

Posted 21 November 2013 - 12:04 PM

It is all about game fairness. If your player loses, it should be his own fault.  How many times have you died in a game(not stealth type either) simply because you couldn't react to an enemy or obstacle quick enough?  Did it feel fair to you?

 

For example, you will notice in faster moving games, if they did it right, the camera could actually show more ahead than behind, simply so you have more time to see what is coming as you move.  Since you are moving faster in that direction, most likely what is behind isn't near as important since you are likely outpacing it, while what is ahead is much more important.  If you slow down or stop, than the camera should recenter you considering that what is behind has more chance to catch up, and because you no longer as far of a view distance ahead since you are slower or stopped at this point.  Note that the above applies as well in top-view as it does in side-view.





#8 Kryzon   Prime Members   -  Reputation: 3314

Like
0Likes
Like

Posted 21 November 2013 - 01:29 PM

For example, you will notice in faster moving games, if they did it right, the camera could actually show more ahead than behind, simply so you have more time to see what is coming as you move.  Since you are moving faster in that direction, most likely what is behind isn't near as important since you are likely outpacing it, while what is ahead is much more important.  If you slow down or stop, than the camera should recenter you considering that what is behind has more chance to catch up, and because you no longer as far of a view distance ahead since you are slower or stopped at this point.

I've noticed this too, in StarFox 64 and some other games.

I was testing this behaviour and made a simple demo for Windows illustrating it if anyone's curious:

 

fcismh.png

http://www.mediafire.com/?jg3akhm678zvm3c (612 kB)



#9 Paradigm Shifter   Crossbones+   -  Reputation: 5432

Like
0Likes
Like

Posted 21 November 2013 - 01:56 PM

But there's no "do a barrel roll!" button :(


"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#10 warnexus   Prime Members   -  Reputation: 1504

Like
0Likes
Like

Posted 21 November 2013 - 02:19 PM

 

For example, you will notice in faster moving games, if they did it right, the camera could actually show more ahead than behind, simply so you have more time to see what is coming as you move.  Since you are moving faster in that direction, most likely what is behind isn't near as important since you are likely outpacing it, while what is ahead is much more important.  If you slow down or stop, than the camera should recenter you considering that what is behind has more chance to catch up, and because you no longer as far of a view distance ahead since you are slower or stopped at this point.

I've noticed this too, in StarFox 64 and some other games.

I was testing this behaviour and made a simple demo for Windows illustrating it if anyone's curious:

 

fcismh.png

http://www.mediafire.com/?jg3akhm678zvm3c (612 kB)

 

Neat application. There is something weird about two buttons. Why does the game have up key makes ship go down and down key makes go up?


Edited by warnexus, 21 November 2013 - 02:20 PM.


#11 Kryzon   Prime Members   -  Reputation: 3314

Like
0Likes
Like

Posted 21 November 2013 - 10:36 PM

There is something weird about two buttons. Why does the game have up key makes ship go down and down key makes go up?

You are correct. I believe it's a personal matter like being left-handed or right-handed.

 

Some people prefer controlling aircraft in games with the reverse vertical controls (makes it feel more like a real control stick, and should work better with analog-sticks in gamepads). Others prefer the normal version.

I chose reversed since it's a simple demo, but the professional way is to let the user decide what he wants.


Edited by Kryzon, 21 November 2013 - 10:38 PM.


#12 Ludus   Members   -  Reputation: 970

Like
2Likes
Like

Posted 22 November 2013 - 01:03 AM

In many 2D platformers such as Super Mario Bros., the camera is actually locked to a predefined vertical height and will only move horizontally with the player, keeping him roughly in the centre of the screen only on the X-axis. In this setup, the main character is not necessarily in the middle of the screen. The camera does not move up with the player as he jumps or even when he moves to higher platforms. It's even possible to jump above the top of the screen so the character is no longer in view. The basic principle behind this method is that the camera should move as little as possible and only when it needs to. Jumping is a quick motion and would cause the screen to be very jerky if it were locked to the player's position. Many later platformers such as Super Mario Bros. 3 used a hybrid system in which the camera would lock to varying vertical heights defined throughout a level but could enter a "free mode" if the player happened to move too far in one direction up or down or where in places there is no defined vertical height to lock to. In this "free mode" the camera more or less keeps the player in the centre of the screen.



#13 TheComet   Crossbones+   -  Reputation: 1640

Like
1Likes
Like

Posted 22 November 2013 - 02:13 AM

There is something weird about two buttons. Why does the game have up key makes ship go down and down key makes go up?

 

Because that is how a joystick on every real life aircraft works.

 

if they did it right, the camera could actually show more ahead than behind, simply so you have more time to see what is coming as you move.

 

Intrusion 2 does a great job at this:

http://www.youtube.com/watch?v=2hpfIEzTf3E


YOUR_OPINION >/dev/null

#14 warnexus   Prime Members   -  Reputation: 1504

Like
0Likes
Like

Posted 22 November 2013 - 05:25 PM

 

There is something weird about two buttons. Why does the game have up key makes ship go down and down key makes go up?

You are correct. I believe it's a personal matter like being left-handed or right-handed.

 

Some people prefer controlling aircraft in games with the reverse vertical controls (makes it feel more like a real control stick, and should work better with analog-sticks in gamepads). Others prefer the normal version.

I chose reversed since it's a simple demo, but the professional way is to let the user decide what he wants.

 

Ah that's a neat fact! I never knew that aircraft joystick were like that



#15 SeraphLance   Members   -  Reputation: 1453

Like
1Likes
Like

Posted 23 November 2013 - 12:13 AM

Some games have the camera move when the player exits a bounding box, but where the box is substantially smaller than the viewport.  This can sometimes make things look a little more fluid.  I personally prefer this approach, especially for top-down 2D games.  It's substantially more work on the coding side though (still not that hard, really).






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS