XNA Reusable Class(es) Challenge! Open Ended

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 2249 Views - Last Post: 15 December 2011 - 01:22 AM

#1 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1355
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

XNA Reusable Class(es) Challenge! Open Ended

Posted 22 October 2011 - 06:08 PM

*
POPULAR

Let me start off by saying that this challenge will not be a contest. There will be no end date, and there will be no winners. What I want to do with this challenge is to challenge each and every person out there that is interested in XNA to create a reusable class(es) that can be "plugged" into an existing codebase and, with the addition of the appropriate logic for instances and method calls in other areas of that codebase, will easily work to achieve the desired results.

In this challenge the only requirement that I'm going to place is that the code must work as is when added to an existing project. That means all of the variables and methods needed to use the class(es) that you have created must be contained within the class.

This challenge is very open to submissions and I'm sure you can all think of things that once upon a time you've thought "Wow, if only there was already a plug and play piece of code that would prevent me from having to re-invent the wheel." That is where this challenge comes in. I want as many people to participate in this as possible and together we can all get a large collection of reusable classes together that will help us all out in the long run.

The submission could range from a simple screen manager, game state manager, input manager, to much more complex things such as tile map editors, collision editors that allow the creation of "polygons" to use as custom collision bounds, physics and math calculators that make working with complex math a little simpler. There are no real limits as to what can be done here. If you wanted to create a complex 3D character creation system with multiple predefined characteristics for bodies, faces, hair, etc. then you're welcome to do that. Like I said, I'm going to leave this very open ended and allow each of you to let your creativity flow.

So let's see what you've got! EVERYONE is welcome, and encouraged to participate in this challenge, from pure beginner to the experts, there is no time limit, there are no winners, there are no losers. Submit what you create here inside code tags, inside spoiler tags to keep the posts from getting too long and also feel free to submit them as snippets here at the site to gain yourself some kudos!

Already a submission that handles the idea that you've chosen? No worries, so long as the code isn't identical, feel free to upload your version of it as it might handle a specific thing better than the previous one(s) do. I want everyone to feel as though they are contributing to this challenge as well as the XNA community as a whole.

Feedback welcome, and changes can be made to this challenge at any time. I'll keep the original post here updated with any changes.

Is This A Good Question/Topic? 6
  • +

Replies To: XNA Reusable Class(es) Challenge! Open Ended

#2 MATTtheSEAHAWK  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 137
  • View blog
  • Posts: 782
  • Joined: 11-September 10

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 22 October 2011 - 09:12 PM

Well I guess I'll start it off. Right now I'm working on a game modifying application written in XNA and I'm mainly working on writing a whole GUI framework. Currently I have one mostly final base class. The base class itself is a control base class for creating a GUI control. It has worked great for me so far providing basic logic for every control I've done so far (Button, CheckBox, TextBox, and a Container and Scrollable Container). Anyways here's a paste-bin of the class:

http://pastebin.com/JQyQgj0P
Was This Post Helpful? 2
  • +
  • -

#3 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1355
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 23 October 2011 - 05:47 PM

That's exactly the sort of thing I was talking about for this challenge, very well done, MATTtheSEAHAWK! SixOfEleven was also trying to put together a GUI library for XNA once upon a time, and I was planning on contributing to it, but things kept getting in the way and I just didn't have time to do it. He might have some of his code left over that might be worth looking into for you if you're planning on extending this to other types of controls.
Was This Post Helpful? 0
  • +
  • -

#4 MATTtheSEAHAWK  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 137
  • View blog
  • Posts: 782
  • Joined: 11-September 10

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 24 October 2011 - 06:06 AM

Thanks Kilorn! I actually have a GitHub repository for the application/library. I can't wait to get into XNA more!

http://www.github.co...heSEAHAWK/Redux
Was This Post Helpful? 0
  • +
  • -

#5 ShadowsEdge19  Icon User is offline

  • D.I.C Addict

Reputation: 142
  • View blog
  • Posts: 664
  • Joined: 16-January 10

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 24 October 2011 - 03:18 PM

I started working on a simple Primitives project that could be implemented into any other project. I have the basic Rectangle and Squares sorted but I'm probably going to need some help with the Ellipsis' and Triangles when they are displayed.

This post has been edited by ShadowsEdge19: 25 October 2011 - 06:07 AM

Was This Post Helpful? 0
  • +
  • -

#6 Fib  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 161
  • View blog
  • Posts: 554
  • Joined: 12-March 09

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 25 October 2011 - 12:22 PM

I have a few things that I can add here. I'll add them here as soon as I can.
Was This Post Helpful? 0
  • +
  • -

#7 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 942
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 04 November 2011 - 08:22 AM

I will also share a few classes that I have that might be helpful, including my input handling class. I'm sure that will be helpful. Just let me clean it up a bit and include a couple things.
Was This Post Helpful? 0
  • +
  • -

#8 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1355
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 04 November 2011 - 08:23 AM

I've actually been using your input handler for a while now, Jamie. With a few modifications of my own to suit my needs.

EDIT: Also, it sucks that we no longer have a member of the moderator staff from the XNA community. Sorry to see that you stepped down, man.

This post has been edited by Kilorn: 04 November 2011 - 08:24 AM

Was This Post Helpful? 0
  • +
  • -

#9 Scorpion1122  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 9
  • Joined: 26-July 11

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 06 November 2011 - 01:29 AM

I've got a simple Key Binding library that i would like to share, what is a good place to upload it?
Was This Post Helpful? 0
  • +
  • -

#10 lordofduct  Icon User is offline

  • I'm a cheeseburger
  • member icon


Reputation: 2506
  • View blog
  • Posts: 4,615
  • Joined: 24-September 10

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 07 November 2011 - 08:32 AM

most of my library either is tied to existing 3rd party libraries out there, or I can't share for various reasons.

But here are a couple util classes.

Collections.Pool<T> - a managed pool of objects of type T
Collections.WeakList<T> - a list of weak references to a specific type T

Utils.Easing - a collection of easing/interpolation methods
Utils.GameTimer - a simple timer updated by the main Game.Update loop (manually call GameTimer.Update)
Utils.MathUtil - a collection of math functions
Utils.StopWatch - similar to GameTimer
Utils.Tweener - interpolates a numeric value by some easing method for a duration of time. Each step and on completion a delegate is called to use the updated numeric value for changing properties.

Attached File(s)


Was This Post Helpful? 3
  • +
  • -

#11 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1355
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 07 November 2011 - 08:45 AM

Nice collection of goodies, lordofduct. I'll definitely be looking a little deeper into these when I get home tonight.
Was This Post Helpful? 0
  • +
  • -

#12 Scorpion1122  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 9
  • Joined: 26-July 11

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 08 November 2011 - 05:16 AM

*self facepalm* you can upload on the post itself, didnt know that.

Wel here is a simple library which enables you to create key bindings defined by a xml document. Feel free to change it to your liking and feel free to give tips/ideas to expand it.

Attached File(s)


Was This Post Helpful? 4
  • +
  • -

#13 SixOfEleven  Icon User is offline

  • using Caffeine;
  • member icon

Reputation: 942
  • View blog
  • Posts: 6,342
  • Joined: 18-October 08

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 21 November 2011 - 06:52 AM

*
POPULAR

This is a version of my input handling class, Xin. Took forever to strip the comments out of it so it wouldn't break the Javascript that highlights code on DIC. It is pretty easy to use, just add an instance of Xin to the components in your game.

Spoiler

Was This Post Helpful? 5
  • +
  • -

#14 Ntwiles  Icon User is offline

  • D.I.C Addict

Reputation: 119
  • View blog
  • Posts: 716
  • Joined: 26-May 10

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 22 November 2011 - 07:19 PM

*
POPULAR

Here's a simple debug tool I've started using in my games. This first version has a static output as well as a dynamic value display off to the side. It's extremely plug and play; it takes a minimum of 4 lines of simple code to use (it does assume use of the content manager and at least one installed spritefont). It should be pretty self explanatory. I'm inexperienced with XNA so I would love any feedback on it.

Spoiler

This post has been edited by Ntwiles: 22 November 2011 - 07:21 PM

Was This Post Helpful? 6
  • +
  • -

#15 Fib  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 161
  • View blog
  • Posts: 554
  • Joined: 12-March 09

Re: XNA Reusable Class(es) Challenge! Open Ended

Posted 23 November 2011 - 09:26 AM

Very nice and practical class you got there Ntwiles. It will be very helpful.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2