Tag Info

Hot answers tagged

4

There are many different variables that come into play regarding this. If two faces are next to each other that use different textures, light levels, colors, etc.. you more than likely won't be able to join them together anyhow (nearly anything's possible with enough work, but it'd probably be FAR too much work). If, however, you have a lot of cube faces ...


4

I found I had to do the following to set the FPS limit free. In your Game class, do the following: graphics = new GraphicsDeviceManager(this); // I have this stored as a member variable graphics.SynchronizeWithVerticalRetrace = false; IsFixedTimeStep = false; Note that an unlimited FPS can cause unpredictability in physic engines, and network games. A ...


3

The reason you wouldn't put the initialize logic in the constructor is because Initialize is the first point where you can be sure that GraphicsDevice is set up. Recall that, while your constructor for your Game-derived class may create GraphicsDeviceManager, the graphics device itself is only created when Game.Run() is called (an instance method, so it ...


2

I don't have a specific example for an Isometric camera, but it sounds like you are asking about the basic camera system in general. The camera I use in my games is somewhat simple and is illustrated in the figure below: The Camera class contains the following member variables: Vector2 position; Vector2 viewport; Rectangle worldRectangle; Converting ...


2

The XNA SpriteFont class uses the SpriteBatch and Texture2Ds to back it. Just as when you render any other Texture2D if you use vectors with non whole numbers XNA samples the overlapping source pixels leasing to the unexpected behavior you are experiencing. To avoid the issue make sure the the you use whole numbers when assigning the location so that the ...


1

A health/damage mining system would be much more flexible and should be easier to implement than a fixed, time-based system. Basically, assign each block a health value, and your pickaxe a "mining damage" value, and whenever the pick strikes the block, you subtract its damage from the health of the block. When the block's health goes to zero or below, the ...


1

The FPS is capped at 60 because of the default value of true on Game.IsFixedTimeStep. If you set this value to false it should allow your FPS to go to whatever you need it to. Game.IsFixedTimeStep on MSDN


1

You want to get real familiar with a handy-dandy 3D math operation called Dot Product. Pretty much all 3D graphics libraries include this 3D math function; for example http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.vector3.dot.aspx The dot product can be used for a number of things, but every use boils down to: when you take the dot product ...


1

public static Texture2D ConvertToTexture(System.Drawing.Bitmap b, GraphicsDevice graphicsDevice) { Texture2D tx = null; using (MemoryStream s = new MemoryStream()) { b.Save(s, System.Drawing.Imaging.ImageFormat.Png); s.Seek(0, SeekOrigin.Begin); tx = Texture2D.FromStream(graphicsDevice, s); ...



Only top voted, non community-wiki answers of a minimum length are eligible