The Wheels Start Turning

Published February 25, 2011
Advertisement
Hello again, So starting off with my new project, I decided what I needed first. Sprites being one of the most fundamental things with a game I decided to start with that. Thanks to XNA getting sprites onto the screen is pretty darn easy. Its been a while since I've done any programming in XNA and C# so I decided to go with UML class diagrams to do a quick 'sketch' of what I'll need for my sprite classes. I came up with this, which is really just what I remembered off the top of my head from reading tutorials/books on XNA:

before.png

Nothing fancy going on here, just a simple class diagram with my general non animated sprite class, and then an animated class that inherits from Sprite. I thought about this for a while but then I realized, whats the point, if I set the sprite sheet size too (1,1) then there wont be any animation occuring. So I decided to simply combine the two classes into one, and out lined two classes that will inherit from the 'new' Sprite: AutoSprite, which updates its movements and other shinanigans by itself, and UserSprite, which is controlled by the player. I ended up with this:

after.png

Again, I probably don't NEED to make UML class diagrams for this but hey its nice to start small and since I took a class on this kind of stuff last semester in school, might as well make use of it ;)

Now I just got too actually code this stuff which shouldn't take too long at all!
Ciao.
Previous Entry Mid Term Woes
Next Entry Sick
0 likes 2 comments

Comments

gimbal_
"Now I just got too actually code this stuff which shouldn't take too long at all!"

Well done, you didn't instantly fall into the code generation trap that these kind of UML tools dangle in front of your nose. You gotta hate all these tools pretending they can do the work for you, and the programmers who believe that.
March 11, 2011 10:48 AM
InfectiousGames
ahah thanks, I've been caught in that trap before, trying to make everything perfect before I actually go out and do it! For this project I'm trying to have a very basic guideline of what I want before I code it but nothing more than that. We'll see how that works out for me ;)
March 16, 2011 12:51 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement

Latest Entries

Slump

1158 views

Still Here...

1003 views

Strike?

1060 views

Sick

1080 views

Mid Term Woes

977 views
Advertisement