alwayschillin.net Blog chillaxin’ til’ the day i die…

23Apr/081

XNA Follow A Path

I was dabbling in the XNA documentation, and came across the Curve class. I had seen it a couple times before but never really went into it much. But I was looking for something new to do so I got into it and converted the Curve3D class created in the XNA Documenation to a Curve2D class, and added a wrapper class called Path2D which uses to the Curve2D class to travel a long a pre-defined set of points. The Curve2D class itself is very usable by itself, but the Path2D class brings it into a package where you could add it to your Sprite class and let it move around all cool-like on the screen. I also added a couple extra functions for making new paths, and timing how it may take to travel it.

 followpath2d_screenshot

Download it here: http://alwayschillin.net/downloads/FollowPath2D.zip

Enjoy!

Filed under: xna 1 Comment
18Apr/080

XNA Sprite Orbit

This is a quick sample I wrote to answer a forum question at Ziggyware(http://www.ziggyware.com/forum/viewthread.php?forum_id=12&thread_id=12979). It has a sprite rotating around another sprite in an orbit. Pressing A and D will make it orbit around the object, and W and S will make the distance from the sprite increase/decrease.

http://alwayschillin.net/downloads/Rotate2DObject.rar

Filed under: xna No Comments
10Apr/083

XNA Text Drawer

I have a text drawing class that i find pretty useful. It allows you to draw text(single and multi-line) to the screen and align it where-ever you wish to inside of a rectangle top, left, bottom, right, and center. link for the download is right here: http://alwayschillin.net/downloads/TextDrawer.rar

Filed under: xna 3 Comments
5Apr/080

SpriteWorks In The Mix

I've been working full steam on SpriteWorks this last week and its gone pretty good. I added ContentManager support for the actual animations and per pixel collision tests. I've also added my common input libraries, and may start adding a lot of other things(like i said before), so i will probably rename the library eventually. Anyway, its late, so more on this stuff later.

Filed under: xna No Comments