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 7928417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:43:31+00:00 2026-06-03T19:43:31+00:00

I have a tile based game. Each tile texture is loaded and then I

  • 0

I have a tile based game. Each tile texture is loaded and then I draw each one next to the other, forming a continuous background. I actually followed this tutorial for the xml files.

http://www.xnadevelopment.com/tutorials/looksleveltome/looksleveltome.shtml

The sources of the textures are 50×50.

However, it works only it the scale is 1 (or lower), if the scale is greater

The results : Normal size (50 pixel and scale 1)
http://imageshack.us/photo/my-images/525/smallzp.jpg/

Larger size (Zoomed or 100 pixel in xml file)
http://imageshack.us/photo/my-images/577/largeki.jpg/

We can see there are lines between the tiles, which are not in the texture. It’s actually not so bad here, but in my game tileset, that’s what it does :
http://imageshack.us/photo/my-images/687/zoomedsize.png/

The same effect is present whether I increase the tile size in the xml file, change the scale when drawing or use my camera to zoom.

//zoom code
public Matrix GetTransformation()
{
    return
       Matrix.CreateTranslation(new Vector3(-_pos.X, -_pos.Y, 0)) *
       Matrix.CreateRotationZ(Rotation) *
       Matrix.CreateScale(new Vector3(Zoom, Zoom, 1)) *
       Matrix.CreateTranslation(new Vector3(_device.Viewport.Width * 0.5f, _device.Viewport.Height * 0.5f, 0));
}

//draw
_spriteBatch.Begin(SpriteSortMode.Immediate, 
  BlendState.AlphaBlend, null, null, null, null,
  _camera.GetTransformation());

//for each tile
theSpriteBatch.Draw(mSpriteTexture, Position, Source, 
  Color.Lerp(Color.White, Color.Transparent, mAlphaValue),
  mRotation, new Vector2(mSource.Width / 2, mSource.Height / 2),
  Scale, SpriteEffects.None, mDepth);

Is there a reason for this? A way to fix it to have a continuous texture when zoomed?

  • 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-06-03T19:43:33+00:00Added an answer on June 3, 2026 at 7:43 pm

    The problem is in your sampler state, the gpu is trying to sample colors near the point to interpolate them.

    Use SamplerState.PointClamp in your spriteBatch.Begin() and it will be fixed.

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

Sidebar

Related Questions

I have started a 2d tile based game for iphone , i will jump
i have implemented a tile based layer in my game, but after the first
I'm making an online tile based game and I have just finished scripting the
I am developing a tile based 2d game. I have split things up into
I'm creating a 2d tile based sim game. I have a 2d array of
I have a tile based game and I need to find the closest tile
I am working on a 3d tile-based strategy game and have read that implementing
I'm making a 2d tile-based game. Some of my testing levels have few tiles,
I've been working on a simple tile-based terrain generator for fun, and have run
I have Tile s which represent the tiles in a game's 2-dimensional world. The

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.