Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 20 Oct 2009
Offline Last Active Jun 04 2013 06:58 PM

Topics I've Started

Dictionary of Dictionaries based on Type

03 June 2013 - 06:48 PM

Hey guys. I'm working in XNA.


I'm basically trying to have a Data/Asset Manager class that holds everything that's loaded in by the ContentManager.


I'm trying to have a property that's essentially something along the lines of



Dictionary<T, Dictionary<string, T>> listOfObjects;



My hope is to be able to get objects doing something like



Texture2D texture = listOfObjects<Texture2D>("nameOfTexture");

SpriteFont font = listOfObjects<SpriteFont>("nameOfFont");

// etc. 



Any help and / or suggestions? Thank you so much in advance smile.png

Port XNA to iOS step-by-step (using MonoGame)

25 March 2013 - 07:15 PM

Hey everyone,


So I have an XNA 4.0 windows game in VS2010 running on my Windows PC (windows 7).


The game itself isn't finished yet, but before I continue work on it I'd like to try to get it running on my iPad, so that I suss out the porting procedure and feel confident about continuing to use XNA. The primary platforms I'd like this game to go on would be on Windows (and possibly Mac) and iOS.


I know that monogame is the way to go with porting XNA to iOS, but I'm finding it difficult finding step by step walkthroughs as to how to actually do this.


This is what I currently have:



A windows 7 PC

Visual Studio 2010

My XNA 4.0 game project on windows 7


A Macbook

MonoDevelop (it was installed as part of the Unity 4.0 install)

An iOS developer account

Latest XCode


Can anyone point me to any tutorials or guides as to how I can, from here, get my game ported over to iOS? Any comprehensive help and tips along with them would be much appreciated.


Thanks so much.

Point and Click Graphic Adventure DEVELOPMENT BLOG

02 March 2012 - 11:16 PM


The gist of it: I'm making an adventure game in C#, and I've just started a development blog:

I'm a fairly junior developer who's been working on an old school 2D point and click graphic adventure game for some time now. I'm coding it entirely by myself in C# using XNA.

I have made significant progress since I first undertook this fairly insane quest, bypassing opportunities to start out with tetris and mario clones while gunning straight for the big old graphic adventure. I've admittedly run into frequent road blocks regarding simple things like storing data (conversations, locations, etc) and saving the game. I've since overcome these issues, but of course with new nagging ones instantly taking their place.

I hope to document my progress as I continue developing the game. For those experienced devs out there, I'd really appreciate if you could follow my blog and my progress. It is a means for me to share my progress alongside any discoveries I make, but I also hope for it to be a forum of sorts for discussing techniques I've used, and the inevitable problems I come across. God knows I've far too often tried pulling my hair out as I hit problem after problem after problem - so I could really benefit from as many readers as possible.

As I continue to make progress on the game engine and iron out technical issues, I will disclose more information regarding the story and concept. As for now, all I can say is that the theme of the game is "beauty", and that there is a teaser video on the blog that partially gives away the look and feel the game will have.

Thank you to all who decide to check it out.

Sprite class [a proper and complete implementation]

29 January 2012 - 03:15 AM


I was wondering about the proper implementation of parents/children in a sprite class, beyond the usual members of a sprite class, such as Position, Texture2D, Rotation, and etc.

What I was personally planning on doing was to simply add two new members:

Sprite Parent;
List<Sprite> Children

And then of course, change all the members to look more like this (Alpha member example):

get {
if (Parent != null) return Parent.Alpha * this.alpha;
else return this.alpha;

At first I thought this wasn't such a bad idea (how else would such a class be implemented/structured?) but with this example in particular (alpha), drawing a Sprite where, say, alpha = 0.5, and which has many children, will result in each child Sprite blending into each other, since all of their alpha values are now at 50%

The desired result is that the object as a whole would be at 50% transparency and blends only with the background, and not with Objects that are within itself.

I thought of each parent Sprite object to be drawn to a Texture2D using a render target, and then applying the alpha to the Texture2D instead. That way, the object as a whole would have a transparency of 50% and not every child Sprite. But to have each Sprite applied to a Texture2D using a render target... would such a thing not be very taxing on the cpu?

My question then is... what is the best implementation of a Sprite class that has this functionality? It really is basically trying to replicate the MovieClip class in AS3. How could this be replicated in C#/XNA?

Thanks. Any help/input would be appreciated.

Generic xml serializer class that can serialize dictionaries

22 January 2012 - 02:33 PM


I've searched and searched the net for serializer classes that do as the topic describes, but have found none. Is anybody out there using a serializer class that can take care of everything for them? The best I got -- I have to specify an array of all other custom classes that the object I'm trying to serialize contains, and even then, it cannot serialize dictionaries, since they're not supported. Using this class also doesn't serialize private objects, for obvious reasons, but I'd like to know if there is a way to serialize them using a helper class.

How do you handle your XML Serialization?

Is having a single class to take care of everything possible? If anybody can point to some classes I could download or code online, that would be great. Your personal solutions would also be appreciated.