The Engine Constructor used in the XNA Game Engine Tutorial Series 2.0 so far is incorrect. It should actually be as follows: public Engine(GraphicsDeviceManager Graphics) { services = new ServiceContainer(); services.AddService(typeof(IGraphicsDeviceService), Graphics); services.AddService(typeof(IGraphicsDeviceManager), Graphics); this.graphicsDevice = Graphics.GraphicsDevice; content = new IEContentManager(Services); spriteBatch = new SpriteBatch(GraphicsDevice); this.graphicsDevice = GraphicsDevice; } In the future, the tutorials and [...]
-
December 29th, 2009 by Sean
One of the most common types of transformations that are simulated in 3D Engines is rotation. There are a number of way of representing rotations: in matrices, quaternions, angle vectors, and in degrees and radians. The most accurate and least limited way of storing them is in matrices. A matrix is a mathematical concept that [...]
This is a quick post which will discuss picking. Picking is the process of figuring out what object was clicked on in a 3D scene. There are a number of ways of doing this, each with their own pros and cons. Color Keys The first method of picking is using color keys. Basically, every 3D [...]
It seems like alot of people are having problems when writing their own code for the engine, where they are getting issues with things like texture stretching, transparency, depth buffer issues, etc. Almost always, this is because of SpriteBatch. When you use the SpriteBatch, it changes alot of RenderStates (Engine.Graphics.RenderState.###), and this can mess things [...]
-
January 2nd, 2009 by Sean