Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualInu_

Posted 07 December 2012 - 06:00 PM

I have na 32x32 sprite that is going to be the Grass/ground of my game, and I am trying to make it fill the entire screen, but the image actualy becomes all distorced.

Here is a picture of the problem:

[attachment=12654:tilingsprite.png]


And here is the Draw code(using XNA 4.0):

  spriteBatch.Begin(SpriteSortMode.BackToFront,
						BlendState.AlphaBlend,
						null,
						null,
						null,
						null);
			GraphicsDevice.SamplerStates[0] = SamplerState.LinearWrap;
			Rectangle source = new Rectangle(0, 0, 500, 500);
			spriteBatch.Draw(spritetest, Vector2.Zero ,source, Color.White, 0, Vector2.Zero,1.0f, SpriteEffects.None, 0.5f);
  spriteBatch.End();

#2Inu_

Posted 07 December 2012 - 05:59 PM

I have na 32x32 sprite that is going to be the Grass/ground of my game, and I am trying to make it fill the entire screen, but the image actualy becomes all distorced.

Here is a picture of the problem:

[attachment=12654:tilingsprite.png]


And here is the Draw code(using XNA 4.0):

  spriteBatch.Begin(SpriteSortMode.BackToFront,
						BlendState.AlphaBlend,
						null,
						null,
						null,
						null);
			GraphicsDevice.SamplerStates[0] = SamplerState.LinearWrap;
			Rectangle source = new Rectangle(0, 0, 500, 500);
			spriteBatch.Draw(spritetest, Vector2.Zero ,source, Color.White, 0, Vector2.Zero,1.0f, SpriteEffects.None, 0.5f);
  spriteBatch.End();

#1Inu_

Posted 07 December 2012 - 05:29 PM

I have na 32x32 sprite that is going to be the Grass/ground of my game, and I am trying to make it fill the entire screen, but the image actualy becomes all distorced.

Here is a picture of the problem:

[attachment=12654:tilingsprite.png]


And here is the Draw code:

  spriteBatch.Begin(SpriteSortMode.BackToFront,
						BlendState.AlphaBlend,
						null,
						null,
						null,
						null);
			GraphicsDevice.SamplerStates[0] = SamplerState.LinearWrap;
			Rectangle source = new Rectangle(0, 0, 500, 500);
			spriteBatch.Draw(spritetest, Vector2.Zero ,source, Color.White, 0, Vector2.Zero,1.0f, SpriteEffects.None, 0.5f);
  spriteBatch.End();

PARTNERS