Tuesday, November 5, 2013

Respawning a Player in a Relatively Safe Spot in C#

My rudimentary (kinda brute force-ish) way of re-spawning the player in a spot away from enemies and thus my fix for instant-death-spawning.This is something from  my bacon jam 6 entry for fixing a major bug after the contest. It does not account for things like falling enemies but, it should do the trick in a pinch.

Considerations:

So performance wise I'm pretty sure Linq isn't great for xna with respect to garbage collection and number of instructions but, baring that Im going to ignore it for now seeing as premature opt being the route of all evil  or whatever..

Enjoy


Link to code


2 comments:

Will Sullivan said...

Just saw your comment on my blog :| have let it go stale. Where the hell have you been? Assuming you are being a good dad. Walking dead is always a good time to show up.

Terrance Smith said...

Hey, I've been in Prosperity. Doing the work from home deal so I have more time to do the the good dad stuff. I haven't been out all that much. I'll swing on by this Sunday.