Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3320800
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:59:12+00:00 2026-05-17T22:59:12+00:00

hope not to be .. boring. In my video game development (2d, in Sdl.NET),

  • 0

hope not to be .. boring.
In my video game development (2d, in Sdl.NET), i would like to create some 2d “map” (top-down map, also called flybird i suppose).
I would like to create Big Map, for example 4000×4000 px.
Obviously, i would like to show only what the user resolution can be.
If my user uses 800×600, i must show a “crop” of my big map.

What’s the best approach to solve the problem of the screen scrolling ?
And, how to show only the correct “piece” of my map (terrain) ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:59:13+00:00Added an answer on May 17, 2026 at 10:59 pm

    In regular GUI development the approach is to use a ViewPort. Not sure about your platform specifics, but a ViewPort takes care of what the user can see while keeping track of where in the larger “Big Map” the ViewPort fits. In regular GUI programming, you have scrollbars to move around, but you will likely need to manage moving that yourself.

    The basic premise of the ViewPort is that the document is much larger than what the user can see. I’m guessing that Sdl.NET doesn’t have such a construct per se. (I couldn’t find the API docs). You can create one yourself, that will take care of blitting the right portion of the background or Big Map to the screen itself. The ViewPort would just be a couple of points to keep track of the upper left corner of the screen and lower right corner of the screen. Give yourself a couple methods to move the ViewPort and make sure it is within the boundaries of the Big Map.

    After that it’s just a matter of tying it all together.

    It’s not uncommon to have a tree of all objects in the scene, so that you can make sure you are displaying just the objects that are supposed to be in the screen. That will help your “Draw” function to blit the background, and any foreground elements inside the view port automatically.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope not everyone is using Rational Purify. So what do you do when
Although my question might seem abstract I hope it's not. Suppose I develop an
I hope this question does not come off as broad as it may seem
I hope this question is not considered too basic for this forum, but we'll
I hope this question is not a RTFM one. I am trying to write
It's not quite a programming question, but I hope its related closely enough. Do
). I hope somebody wants some easy reputation by answering a simple question ::-
I really hope someone can advise on displaying a google map from a hidden
I hope this has not been covered before, but if I compile a 32-bit
I hope this is not a duplicate question, but if it is, feel free

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.