Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Top-down Racing game, redrawing map (VB)

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

Elo.. What is the fastest/best/most preferable way to redraw a map on the background. Explenation: I can either load up wall parts in an array, or just blit em right to a memory DC called "map" or something If i load up the array, i would redraw each n every wall part (inside the visible screen), every frame. Parts might get up to 1000-2000. If i load it onto a DC, i would blit the visible part from the Map DC every frame. What is faster/better ?? Help me!

Share this post

Link to post
Share on other sites
First off, good to see you using Device Contexts instead of PictureBoxes.

If your wall-parts are in a single-dimensional array, a list, then maybe you should consider drawing a main "map". If they are in a 2-dimensional array, a tile map, then doing it via each-frame-redraw of everything in-view is better.

If at all possible, avoid the one-huge-ass-map idea. If needed, perhaps throw small groups of parts, sorted by 2D position, into an array of large (1/4 of the screen) "chunks", and draw just the chunks that are on-screen.

Share this post

Link to post
Share on other sites

  • 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!