Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Flipping a grid of tiles & time rewinding

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2011
    Location
    HAMPSHIRE
    Posts
    2

    Flipping a grid of tiles & time rewinding

    Hello Everyone,

    My team and I are currently in the process of developing our first game (student project), we're making a 2D side-scroller and we kind of hit a pretty big brick wall - we're trying to find out: a math formula for flipping a grid of tiles coherently & if possible an algorithm for rewinding time...
    The tile flipper is - because we'll be trying to "flip the gravity" - just flipping our character upside down and walking on the ceiling...
    I apologize if there already is an answer to any of these, but i've looked arround and the only thing i could fins with search was how to flip an image.

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    513

    Re: Flipping a grid of tiles & time rewinding

    Not sure if that does what you want, but how about: turn the camera upside down?

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2011
    Location
    HAMPSHIRE
    Posts
    2

    Re: Flipping a grid of tiles & time rewinding

    Well not in our case at least, because we'll have some pusles in place and in order to pass say from point A to point B you will have to walk on the ceiling - gravity switch...sort of like the game "Shift" (http://armorgames.com/play/751/shift)

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Posts
    513

    Re: Flipping a grid of tiles & time rewinding

    Well not in our case at least, because we'll have some pusles in place and in order to pass say from point A to point B you will have to walk on the ceiling - gravity switch
    gravity is something outside of OpenGL/graphics, you'll have to track its direction somewhere in your code.
    So is the problem then that you only want to be some tiles upside down? You could invert the texture coordinates along one axis in the vertex shader to flip only certain tiles upside down or use a texture matrix if you need to use the fixed function pipeline. But that boils down to flipping an image which your original post says is not what you want...
    Hmm, I'm afraid I don't really understand your question...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •