Jump to content
  • Advertisement
Sign in to follow this  

NeHe Lesson 32 display issues

This topic is 5197 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In Lesson 32, the shooting gallery, 2D objects fly across the screen at a relatively slow rate using time based movement. At this point, things look fine. However, if you increase the speed of those objects just slightly, and take away their rotation, ugly display issues start showing. The object looks only half drawn from the first and next frame as it flies across the screen, so theres a "I'm still drawing" line through the middle of it. This issue doesn't show up when the object is moving at a slow speed, and I'm not sure what the technical term for it is. Also, it doesn't matter what FPS you force the game to run at. The problem gets much worse when you increase the size of a sprite. I'm using Lesson 32 as the base code for my game engine, and have already added a good 500 lines of engine code (physics, collision detection, projectile classes etc.) so I'd like to fix this issue as soon as possible. I'm assuming its not the fault of my "new" 19" CRT monitor. I certainly haven't noticed this in any professional games I've played on my computer. Could someone take a look at the source code and see if they can find the issue? To increase the speed of the objects so you can see the issue, simply go to line 561 in Lesson32.cpp (or around there, I'm using the DevC++ project file), and A. comment out the rotation, B. increase the speed of the objects slightly. I changed the x value to 0.017f, I believe it was 0.012f: object[loop].x+=0.017f*float(milliseconds); If you really want to see the issue in all its uglyness, change the size dimensions of the objects from {1.0, 1.0} to {2.5, 2.5}. Thanks. EDIT: I know I've read about this issue somewhere and some graphic engines have ways to combat it but I can't recall the technical term for the issue or the solution to that issue. I'm sure one of you will recognize it.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!