Hot answers tagged c#
3
In general, "translating" code from one language to another (or to run on one system or another) is called a port (note interesting relation or port to portable).
Ports take a lot of work, and although there are many tools out to "help" you perform the task of porting, it's largely going to be a manual process.
If you want to program in C#, a good thing to ...
2
Quite the opposite. MonoGame stands to be the perfect replacement for existing XNA developers. It doesn't do everything that XNA did yet but there's no good reason why it can't. Coupled with the fact that it sports many more platforms and it's already being used in many reputable games I'm confident it will be great for some time to come.
Edit: I wrote ...
1
I managed to pull this off, by grabbing all (x,y) coordinates of the sprites that intersect, then calculating as follows:
VerticalDepth = Bottom.Y - Top.Y
HorizontalDepth = Right.X - Left.X
Based on the direction of the collision, I would then adjust accordingly.
if (depth > 0)
AdjustPosition();
That is the simplified explanation. I would ...
1
You've probably heard of the God/Blob object anti-pattern. Well your problem is a God/Blob loop. Tinkering with your message passing system will at best provide a Band-Aid solution and at worst be a complete waste of time. In fact, your problem has nothing specifically to do with game development at all. I've caught myself trying to modify a collection while ...
Only top voted, non community-wiki answers of a minimum length are eligible