What Should Be in a 2D Game Engine? [closed]

You’re approaching it in an upside-down manner. What should be in your engine is the following: All the code that turned out to be common between your first and your second game. First, write a game. Don’t write an engine, because, as you have found out, you don’t know what it should contain, or how … Read more

UI library for XNA

xWinForms is easily the most complete and actively maintained GUI system for XNA. Window System for XNA (WSX) had some good progress in the past (I was working on it for a while), and is still a decent system, though it hasn’t been maintained for over a year now. The best option is definitely to … Read more

Custom WP7 Silverlight control with dynamic 3D content

I couldn’t find any way of detecting that a Silverlight control needs to change its presentation, be it due to user interaction or animation. Controls are rendered only when the 3D scene changes because of this, and so they lack the slick look and feel of the native WP7 applications. Make something that always changes … Read more

Is MonoGame just XNA?

Almost. MonoGame doesn’t use the XNA framework, it is a re-implementation of the XNA framework. The difference is that all of the code inside MonoGame has been re-written to behave identically to the XNA framework. You’re probably wondering why someone would want to re-implement something that already exists. Well, you’re correct in saying that XNA … Read more

XNA 2D Camera Engine That Follows Sprite

So I figured it out using a combination of the tutorials above and have created the class below. It tweens towards your target and follows it around. Try it out. public interface IFocusable { Vector2 Position { get; } } public interface ICamera2D { /// <summary> /// Gets or sets the position of the camera … Read more

Extracting Yaw from a Quaternion

The quaternion representation of rotation is a variation on axis and angle. So if you rotate by r radians around axis x, y, z, then your quaternion q is: q[0] = cos(r/2); q[1] = sin(r/2)*x; q[2] = sin(r/2)*y; q[3] = sin(r/2)*z; If you want to create a quaternion that only rotates around the y axis, … Read more