OpenGl 2D Tiling problem

This is a discussion on OpenGl 2D Tiling problem within the Game Programming forums, part of the General Programming Boards category; Hi, I am trying to make a basic tile scrolling program but am having problems implementing the culling of tiles ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    33

    OpenGl 2D Tiling problem

    Hi,

    I am trying to make a basic tile scrolling program but am having problems implementing the culling of tiles which are not draw on the screen.

    At the moment i have smooth movement to the right, but it seems to be jerky going to the left. Also i lose my very first and very last tile because i have overlapped the tiles to draw some offscreen. IE if 12 tiles fit across the screen i have 14 drawn for my scrolling.

    I am unsure off where to go from here. If anyone can suggest methods or something i could do different to cull my tiles that are offscreen i would greatly appreciate it!

    I have included my source code to show you how i am doing it, plus an executable to demonstrate the jerkiness when i move the tiles left with the left arrow key.

    Werdy666
    Attached Files Attached Files

  2. #2
    Rambling Man
    Join Date
    Jan 2002
    Posts
    1,050
    Well, I remembered answering somebody's question about tile scrolling collision a while back and here is what I found. The code is specifically for someone who is using Allegro, but you should still be able to get the information you need out of it. Hope that helps you out.

    Btw, I didn't look at your source, so I have no idea exactly what you're doing (I don't have enough time, sorry)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem with the 2D string
    By ssharish2005 in forum C Programming
    Replies: 5
    Last Post: 11-27-2005, 05:26 AM
  2. OpenGL DirectX 2D
    By c++.prog.newbie in forum Game Programming
    Replies: 11
    Last Post: 03-01-2005, 12:54 PM
  3. Storing strings in 2d char arrays problem
    By rainmanddw in forum C++ Programming
    Replies: 5
    Last Post: 10-22-2003, 05:41 PM
  4. Replies: 6
    Last Post: 10-21-2003, 09:57 PM
  5. Help with 2d OpenGL top-down shooter.
    By TonyP in forum Game Programming
    Replies: 4
    Last Post: 09-11-2002, 11:39 AM

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