help... moving the screen in 2d

This is a discussion on help... moving the screen in 2d within the Game Programming forums, part of the General Programming Boards category; in a 2d adventure game, how do you make the screen move with the player (or at all)?...

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    2

    help... moving the screen in 2d

    in a 2d adventure game, how do you make the screen move with the
    player (or at all)?

  2. #2
    Registered User VBprogrammer's Avatar
    Join Date
    Mar 2002
    Posts
    175
    You'll need to tell us what you are using i.e. Mode 13h, graphic's libary ect.
    VC++ 6

  3. #3
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    to be extremely generic, you have to change the coordinates at which it is being displayed

  4. #4
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Location
    Plano, Texas, United States
    Posts
    2,738
    yeah it really depends on a lot of things, one thing is which API you are using...but that is really the least of your worries.

    It's all about the algorithm.

    How do you want the player and background to move around?

    Do you want the player to stay in the center of the screen at all times?

    Do you want the player to stay in the center of the screen unless you have reached the edge of the map/background/room/etc, and then let the player go into free moving mode?

    Do you want the player to be completely free moving around the screen?

    It all depends on how you want it done.

    For 2d Dragonball Z side view action game that I am making right now, I have the player always in the center of the screen except for when he reaches the edge of the map. Then I put him into free moving mode until he goes away from the edge of the map again. That is what most games really use...in the same genre that is...one example is Liero...it does it that way.
    My Website

    "Circular logic is good because it is."

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Trouble moving lines up in 2D array
    By powell5487 in forum C Programming
    Replies: 5
    Last Post: 03-03-2009, 11:54 AM
  2. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 03:56 PM
  3. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 09:18 PM
  4. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 02:41 AM
  5. Converting from Screen to World Coordinates
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 05-11-2004, 12:51 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21