• entries
707
1173
• views
432930

# Untitled

90 views

Get the object hierarchy done today. Any number of layers can be added to an object. For example:

Which is comprised of 7 layers coming from two textures:

Sword:

Just a quick example that I whipped up, but it shows how things will be done. Here's the code to set it up:
Renderable = new Renderable(SpriteBatch, TextureManager.GetTexture("Character.png"), new Vector2(0, 0), new System.Drawing.Size(32, 64), new Rectangle(0, 0, 32, 64), Color.White);Renderable.Children.Add(new Renderable(SpriteBatch, TextureManager.GetTexture("Character.png"), new Vector2(0, 0), new System.Drawing.Size(32, 64), new Rectangle(32, 0, 32, 64), Color.White));Renderable.Children.Add(new Renderable(SpriteBatch, TextureManager.GetTexture("Character.png"), new Vector2(0, 0), new System.Drawing.Size(32, 64), new Rectangle(64, 0, 32, 64), Color.White));Renderable.Children.Add(new Renderable(SpriteBatch, TextureManager.GetTexture("Character.png"), new Vector2(0, 0), new System.Drawing.Size(32, 64), new Rectangle(96, 0, 32, 64), Color.White));Renderable.Children.Add(new Renderable(SpriteBatch, TextureManager.GetTexture("Character.png"), new Vector2(0, 0), new System.Drawing.Size(32, 64), new Rectangle(128, 0, 32, 64), Color.White));Renderable.Children.Add(new Renderable(SpriteBatch, TextureManager.GetTexture("Character.png"), new Vector2(0, 0), new System.Drawing.Size(32, 64), new Rectangle(160, 0, 32, 64), Color.White));Renderable.Children.Add(new Renderable(SpriteBatch, TextureManager.GetTexture("Sword.png"), new Vector2(22, 38), new System.Drawing.Size(17, 24), new Rectangle(0, 0, 17, 24), Color.White));

The animation system will be very similar to this. To sum it up, pretty much each frame will be a renderable; you'll be able to add different chunks from different textures to each frame and then play through them. I'll have to make a tool for making them, but they system should be pretty awesome.

I dislike XNA to the point of dismemberment. If XNA was a human and had a house, I would totally go there and kick it's puppy. This will be the ONLY game I make with it. After this, I'm going back to C++ and DX until something decent comes along (or SlimDX advances further.)

I'm contemplating taking a web programming job near here. I'll have to go check it out though, because I don't know what they're expecting and what language they're looking for.

I NEED MONIES LOL.

Back to coding. Or sleep. Or maybe some gaming. Be assured that I will be moving on to something though. Or maybe back to something. Who knows. BYE.

Why the contempt for XNA?

I'm rather enjoying using it myself, so I'm honestly curious.

Quote:
 Original post by Jesse Chounard Why the contempt for XNA? I'm rather enjoying using it myself, so I'm honestly curious.

For a few reasons actually.

They recreated several of the System.Drawing classes (Rectangle and Color for example), but they didn't include any of the nice features of said classes and they didn't recreate ALL of them (like System.Drawing.Size.) I can't do using System.Drawing though because of the conflicting classes.

They didn't include an event based input system. I know, I can make my own (and have), but why the fuck wouldn't you include something that pretty much every game needs?

The lack of FFP. I'd like to be able to draw untextured quads and lines, but I have to do all of that myself as well as create a shader.

XACT

There's other stuff too, I just can't remember them now lol.

Quote:
 Original post by Programmer16 XACT

Man, am I ever with you on that one. That was the final straw that put me off XNA for ever. Had a bit of a rant in my journal at the time as I recall.