Jump to content
  • Advertisement
Sign in to follow this  
io9

[DirectDraw]View frustrum? ('ello! I is a newb)

This topic is 4001 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

Hello everybody! I'm a total DirectX noob! I was wondering, how would I go about creating a "camera" in DirectDraw for a Pokemon-style game? Sorry for the idiot question, for I am an idiot. Thanks, Ilya Ostrovskiy -[io9`]-

Share this post


Link to post
Share on other sites
Advertisement
This actually doesn't have much to do with DirectDraw or DirectX in general. What you have to do is make some POINT variable to keep track of the position of camera, then whenever you draw an object just do something like Object.Draw(x-CameraPosition.x, y-CameraPosition.y), where (x, y) is the position of the object relative to the game world and (CameraPostion.x, CameraPosition.y) is the location of the upper left corner of the screen relative to the game world. In addition you should probably do some checks to make sure your not wasting computer cycles drawing tons of off screen objects.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!