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

  • Home
  • SEARCH
  • 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 6651799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:03:15+00:00 2026-05-26T01:03:15+00:00

I am developing a tile based 2d game. I have split things up into

  • 0

I am developing a tile based 2d game. I have split things up into components such as skybackground, landbackground, town, UI and so on, with each component handling its drawing. before invoking any of the draw calls, I spritebatch.Begin() with default values so that I draw everything in 1 batch.

For drawing the land mass, I repeatedly draw a square land texture across the area until i fill it up. However there is a spriteBatch mode called linear wrap that does just that. the downside would be that I will have to change my design by splitting up my one global spritebatch.begin() many times down to each component.

So my question is what is better/more economical, tiling a texture manually or splitting up the begin() and end() among subcomponents?

There are also other issues that may require me to split a single spriteBatch.Begin(), so how significant is 1 extra spriteBatch.Begin()? or 10 more? or 100 more? I would like to know at what scale should I start to worry about adding more begins().

  • 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-26T01:03:16+00:00Added an answer on May 26, 2026 at 1:03 am

    The best solution is to have as much work happening on the GPU instead of the CPU (e.g. by taking advantage of tiling and the like) and to have as few SpriteBatch.Begin() calls as possible thus…

    It’s sounds like the optimal solution here is not to go with either extreme.

    Why not just have two SpriteBatches and use on for your land and the other for everything else?

    e.g. Re-architect your solution so that:

    • both SpriteBatches are passed into every component and let the component decide which one to use? …or…

    • each component has a property that indicate which SpriteBatch it requires and pass in the appropriate one upon drawing?

    As for the impact of each SpriteBatch.Begin(), it really depends on your particular game (and the amount of work that needs to happen to complete the previous spriteBatch and begin the next one) so I would suggest continually testing and monitoring performance is your best way to determining when you should care.

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

Sidebar

Related Questions

No related questions found

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.