problem about xna-Collection of common programming errors
Outlaw Lemur
c# colors xna argb
I have a color of class Microsoft.Xna.Framework.Color. How can I change its hue (or get a new color with slightly different hue). Should I convert it to System.Dra
Nicol Bolas
xna c# 2d graphics textures
Possible Duplicate:Why are textures always square powers of two? What if they aren’t? I am using C# and XNA (also MonoGame for other platforms than Windows) to create a game in 2D. Ususally for all textures I use the NVidia plugin fo
Josh Petrie
xna
I’ve got a build of my game that works on Windows under a release and debug build as expected. When I deploy the debug version of the game to the Xbox, it works as expected and runs the same as on Windows –
BowserKingKoopa
c# generics struct xna boxing
I’m creating a messaging system for use in an XNA game. My Message types are structs because I want them to behave in a Value Type way. struct MyMessageType1 : IMessage {} st
Austin
c# xna
I’m trying to make a “dungeon crawler” type game demo, and this is my first time really making an
Eric Wilson
alan2here
c# parameters xna optional-parameters xbox
Apparently optional parameters won’t work in C# Xna when used on the Xbox, there non suportedness is stated during compilation.I have a situation like this:func(float? a = null, int? b = null)With large numbers of thease optional parameters that default to the “undefined” value, nul
Ruud Lenders
xna xna-4.0 performance vector
I’m currently playing around with XNA, and creating a simple 2D platformer. I was thinking of adding multiple layers to make it a little bit of challenge. In stead of having a Vector2 for my positions, I now use a Vector3, solely to use it’s Z as layer depth. However, since you can’t use operators bet
JimmyBoh
xna monogame sharpdx windows-8
I have an game which builds for WindowsGL and Windows8. The WindowsGL works fine, but the Windows8 build throws an error when trying to instantiate a new Texture2D.The Code:var texture = new Texture2D(CurrentGame.SpriteBatch.GraphicsDevice, width, 1); // Error thrown here… texture.setData(FunctionThatReturnsColors());You can find the rest of the code on Github.The Error:SharpDX.SharpDXException was unhandled by user codeHResult=-2147024809Message=HRESULT: [0x80070057], Module: [Unknown], ApiCode: [Unknown/Unknown], Message: The parameter is incorrect.Source=SharpDXStackTrace:at SharpDX.Result.CheckError()at SharpDX.Direct3D11.Device.CreateTexture2D(Texture2DDescription& descRef, DataBox[] initialDataRef, Texture2D texture2DOut)at SharpDX.Direct3D11.
Direweasel
xna xna-4.0 tiles tilemap xna-content-pipeline
I’m running into this error:Error loading “desert”. Cannot find type TiledLib.MapContent,TiledLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.atMicrosoft.Xna.Framework.Content.ContentTypeReaderManager.InstantiateTypeReader(StringreaderTypeName, ContentReader contentReader, ContentTypeReader&reader) atMicrosoft.Xna.Framework.Content.ContentTypeReaderManager.GetTypeReader(StringreaderTypeName, ContentReader contentReader, List1& newTypeReaders)atMicrosoft.Xna.Framework.Content.ContentTypeReaderManager.ReadTypeManifest(Int32typeCount, ContentReader contentReader) atMicrosoft.Xna.Framework.Content.ContentReader.ReadHeader() atMicrosoft.Xna.Framework.Content.ContentReader.ReadAsset[T]() atMicrosoft.Xna.Framework.Content.ContentManager.ReadAsset[T](StringassetName, Action1 recordDisposableObject) atMicrosoft.Xna.Framework.Content.ContentManager.Load[T](StringassetName) at TiledTest.Game1.LoadContent() in C:\MyDocuments\Dropbox\Visual StudioProjects\TiledTest\TiledTest\TiledTest\Game1.cs:line 51 atMicrosoft.Xna.Framework.Game.Initialize() atTiledTest.Game1.Initialize() in C:\My Documents\Dropbox\Visual StudioProjects\TiledTest\TiledTest\TiledTest\Game1.cs:line 39 atMicrosoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun) atMicrosoft.Xna.Framework.Game.Run() atTiledTest.Program.Main(String[] args) in C:\MyDocuments\Dropbox\Visual StudioProjects\TiledTest\TiledTest\TiledTest\Program.cs:line 15When trying to run the game. This is a basic demo to try and utilize a separate project library called TiledLib. I have four projects overall:TiledLib (C# Class Library) TiledTest (Windows Game) TiledTestContent (Content) TMX CP Ext (Content Pipeline Extension Library)TiledLib contains MapContent which is throwing the error, however I believe this may just be a generic error with a deeper root problem.EMX CP Ext contains one file: MapProcessor.csusing System; using System.Collections.Generic; using System.Linq; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Content.Pipeline; using Microsoft.Xna.Framework.Content.Pipeline.Graphics; using Microsoft.Xna.Framework.Content.Pipeline.Processors; using Microsoft.Xna.Framework.Content; using TiledLib;namespace TMX_CP_Ext {// Each tile has a texture, source rect, and sprite effects.[ContentSerializerRuntimeType(“TiledTest.Tile, TiledTest”)]public class DemoMapTileContent{public ExternalReference Texture;public Rectangle SourceRectangle;public SpriteEffects SpriteEffects;}// For each layer, we store the size of the layer and the tiles.[ContentSerializerRuntimeType
redcodefinal
c# .net colors xna
I’m writing an HSVtoRGB method for my game framework, and when going through the hues, this happens -> http://youtu.be/ACBwR_0iMWE.Here is the code.public static Color HSVtoRGB(float hue, float saturation, float value, float alpha){if(hue > 1 || saturation > 1 || value > 1) throw new Exception(“values cannot be more than 1!”);if (hue < 0 || saturation < 0|| value < 0) throw new Exception(“values cannot be less than 0!”);Color output = new Color();if (Math.Abs(saturation) < 0.001){output.R = (byte) (value*byte.MaxValue);output.G = (byte) (value*byte.MaxValue);output.B = (byte) (value*byte.MaxV
Leo
c# xna windows-phone-8
I want to do a windows phone game that supports multiple screen resolutions. I tried this Microsoft tutorial but I always get an error message in the ResolutionHelper class.Tutorial: http://msdn.microsoft.com/en-us/library/windowsphone/de
Originally posted 2013-11-09 20:19:17.