Shop OBEX P1 Docs P2 Docs Learn Events
Games which scroll in both X and Y directions. — Parallax Forums

Games which scroll in both X and Y directions.

Lord SteveLord Steve Posts: 206
edited 2008-11-26 17:14 in Propeller 1
Are there any Hydra games which use tile scrolling in both X and Y direction and allow the player to freely roam around the game map?· I looked at the Master Project List sticky but not all games are there, me thinks, and not all those listed had screen shots or videos.· (I do not have a Hydra.)

Thanks


Post Edited (Lord Steve) : 11/25/2008 5:39:06 PM GMT

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-11-25 19:05
    I can't think of any off the top of my head..

    Bet a cool version of this could be done using the driver Alex and I are playing with..
    Someone should do a Gauntlet clone..

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • BaggersBaggers Posts: 3,019
    edited 2008-11-25 19:35
    I was wondering when someone would mention gauntlet lol
    You're AI_Driver would be great for that, and since characters and baddies can't overlap each other anyway [noparse]:)[/noparse] so that would be ideal for the game [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • trodosstrodoss Posts: 577
    edited 2008-11-25 19:39
    @OBC,

    Funny that you mention Gauntlet... I have been working on it, but got side-tracked [noparse];)[/noparse] If anyone though wants to give it a try in the mean time though feel free. The current proejct is a sort of "test bed" for some of the things I am trying to figure out.
    @Lord Steve:
    As far as "scrolling x y" (meaning horizontal and vertical scrolling), Underwelt is another that uses a form of block·scrolling, and Ailen Invaders (with the Hydra book) also implements smooth vertical scrolling. Progue (a rogue-clone) might...but I am not sure. I know a lot of "rogue-like" games use a basic form of scrolling (or "windowing") [noparse][[/noparse]Edit:] And if you plan on getting a PropGFX, I think Baggers has an 8-directional scrolling routine.

    As long as you implemented a 2-dimensional array, and knew where the "top left" corner of the display is, you can do a "fake" sort of horizontal/vertical scrolling.

    Example: (map where # = block, _ = open space)
    1 2 3 4 5 6 7 8 9 0
    1# # # # # # # # # #
    2# _ _ _ _ _ _ # # # #
    3#_ _ _ _ _ _ # # # #
    4# # _ # # # # # # #
    5# # _ # # # # # # #

    Now, imagine that your "window" (meaning what you can see on the screen is a simple 2x2 space. If the top-left was at x1 y1, you would be able to see:
    1 2
    1# #
    2 # _

    if you moved right 1 space (inrementing the top-left to x2, y1 you would see:
    2 3
    1# #
    2_ _

    Well, either you get the idea, or I have confused you horribly and I apologize.

    Post Edited (trodoss) : 11/26/2008 6:55:04 AM GMT
  • BaggersBaggers Posts: 3,019
    edited 2008-11-25 20:05
    yes, thanks trodoss, the propgfx has 8 way pixel scrolling [noparse];)[/noparse] including split screen for the status panel which could also be scrolled if you so wish [noparse]:D[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    http://www.propgfx.co.uk/forum/·home of the PropGFX Lite

    ·
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2008-11-26 01:38
    Alex,

    You don't happen to already have the scroll code for displaying the "windowed" area already done do you?
    I'd love to see it for learning if you do.

    I'm picturing a DAT section that looks something like this.

    DAT
    
    Background_Level_Map_1
    byte "===============================================",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                                                       ========        ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                  ========       ==",0
    byte "==                                 ==                                                           ==",0
    byte "===============================================",0
    
    



    I suppose that the code would "center" the hero sprite in the middle of the
    windowed area moving the board and other characters as required. I can *almost*
    picture the code for this, but haven't wrapped my head around DAT usage yet.
    (Time to study.. [noparse]:)[/noparse] )

    OBC

    OBC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    New to the Propeller?

    Getting started with a Propeller Protoboard?
    Check out: Introduction to the Proboard & Propeller Cookbook 1.4
    Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
    Got an SD card connected? - PropDOS
  • AndreLAndreL Posts: 1,004
    edited 2008-11-26 01:44
    Yes, the Alien Invasion demo, uses 2D scrolling over a large tile map. Scrolling vertically smoothly is very easy, horizontal is a little more challenging since you need a scanline buffer, so you can render the partial pixels per tile.

    Andre'
  • trodosstrodoss Posts: 577
    edited 2008-11-26 05:34
    I suppose that the code would "center" the hero sprite in the middle of the
    windowed area moving the board and other characters as required. I can *almost*
    picture the code for this, but haven't wrapped my head around DAT usage yet.
    (Time to study.. [noparse]:)[/noparse] )
    As far as the DAT section, it really is just that--data.· It is how you use the data that makes the difference.· To try to put it in a more concrete manner, imagine that you have a 30 by 30 block map.· Your physical map size would be 900 (30 * 30).· It could be represented in·one long byte 1, 0, 1, 1, ... or, you could organize it by rows/columns (a series of 30 byte 1, 0, 1... statements).· It is however it makes sense for you when you look at it.· For purposes of this example, assume the data is 30 sets of 30 byte elements (so the dimensions make sense).
    In your CON section, you might have something like:
    'constants representing the map
    MAP_WIDTH = 30
    MAP_HEIGHT = 30
    DISPLAY_WINDOW_WIDTH = 16
    DISPLAY_WINDOW_HEIGHT = 16
    
    

    In your DAT section you would have map data defined:
    DAT
    Level_Map  byte 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, 1, 1, 1, 1, 1, 1, 1, 1, 1
    
               byte 1, 0, 0, 0, 0, 1, 1, 1, 1, 1 ,1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, 1, 1, 1, 1, 1, 1, 1, 1, 1
    
               byte 1, 0, 0, 0, 0, 0, 1, 1, 1, 1 ,1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ,1, 1, 1, 1, 1, 1, 1, 1, 1, 1
    
               byte 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 ,0, 0, 0, 0, 0, 0, 0, 1, 1, 1 ,1, 1, 1, 1, 1, 1, 1, 1, 1, 1
    
    

    ...you get the idea
    Then you might have something like the following:
    'current_x and current_y represent the 'top left' of the viewable area PUB DrawMapWindow (current_x, current_y) | map_x, map_y, map_char
       repeat x from 0 to DISPLAY_WINDOW_WIDTH
           repeat y from 0 to DISPLAY_WINDOW_HEIGHT
              map_x := current_x + x
              map_y := current_y + y
              'you would have to add 'bounds checking' 
              map_char := byte[noparse][[/noparse]@Level_Map][noparse][[/noparse]map_x * map_y]
              'pokechar used for an example
              text.pokechar (x, y, blue, map_char)
    
    

    [noparse][[/noparse]Edit:] When accessing the data in this example, I am taking advantage that the data is structured in 30 rows by 30 columns (using multiplication the way you would 'fake' a 2 dimensional array in Spin).
    ...from there you would just add your 'character' on top of the display.· When you add bounds checking to this (meaning when the displayable window could not croll, that would be when the character would 'move' around the screen.· Otherwise, as you mentioned, the character would effectively be 'centered' on the displayable area, and you would calculate what is the top left corner of the window at all times.
    Hopefully that is enough to get you started.· I haven't tested the above code, but it should at least help point you in the right direction.· Bear in mind this is only one of what could be any number of implementations to do the same thing.· Definately do some expiramenting on your own.·
    Again, if the example is as clear as mud, I apologize in advance.
    Just to clarify --·this is more an example of how to handle map movement rather than real scrolling.· As Baggers and Andre have mentioned, there is a lot more that goes into 'pixel perfect' scrolling.· If you get interested in that there is certianly going to be good information in the Hydra book, and also as Andre mentioned, an example of a vertical scrolling game on the CD.· For some games (and some people) the 'windowed' map movement is good enough.· It most likely isn't going to yield 'Final Fantasy' -- more like maybe Rogue, or some of the very first RPG's.

    Post Edited (trodoss) : 11/26/2008 2:20:59 PM GMT
  • Spork FrogSpork Frog Posts: 212
    edited 2008-11-26 17:14
    If you just want a tilemap scroll without sprites, you may want to take a look at the video driver for my Boulderdash clone. It's a simpleish implementation (just a 4 color tilemap, that's all) but it gets the job done.

    Without sprites, you don't need to have a scanline buffer at all, even with horizontal scrolling. You just need to keep two tile lines in COG memory all the time, and you can shift them left or right as needed. Horizontal scrolling is accomplished through setting where on the first tile you're starting then keeping a running count of the number of scanlines in the video frame.

    Additionally, I know there are a few more drivers out there that do smooth scrolling. Off of the top of my head, I know the XVIDEO driver does it with sprites (if you've got a RAM expansion card) as well as Bamse's multi-cog renderer.

    Post Edited (Spork Frog) : 11/26/2008 5:21:18 PM GMT
Sign In or Register to comment.