2D Direct3D Sprite Rotation (such a basic problem :( )
Sup, (sorry in advance for the poor written quality and the dumb n00bish question, I'm at work and not supposed to be onthe internet. There's a lot of quick alt-tabbing going down when the boss is about!! Gotta bequick)
Right, I'm getting well annoyed with this; I have found various sites on the internet that describe how to succesfully use sprites in Managed D3D (and c#) and perform transforms on them... I just can't seem to get it to work.
Does anyone know of a simple bit of code (not pseudo) that creates a sprite class, rotates it and then places it at coords x,y on the screen?
I keep getting wierd results and would be unbelievably gratefull for a just a simple implementation.
All of the examples (*and there arent many) that i have found on the internet are either written very poorly, or go about it in a way that would be unsuitable for my game.
The game I have already made is a simple asteroids game with a black hole in the middle, guns, time slow down, gravity stuff and teleport (the usual first game of a new language/api learning process!) I made it in GDI which is toss and slow with sprites/bitmaps so I had to jstu draw lines and squares to allow it to run. Obviously I took a very long time drawing all the graphics and so thought I'd port to D3D so that my effort is not lost!
What I am looking to do is just rotate a ship around and place it at coords x,y, and also to display up to 50 asteroids. Does anyone have any tips as to how best to draw the sprites to avoid slowing things right up; i understand it's easily to code this very inefficiently.
At the moment to rotate and display the sprite I am using something along the lines of (im at work so cant remeber exactly)
sprite.begin()
sprite.tranformRotateZ(Angle)
sprite.Draw(can someone explain these overloads properly to me?)
sprite.End()
Also, I am unable to use the begin(spriteflags.Aplha) ,*again can't remember exactly it tells me that it does not understand the sprite flags bit!
I think I might even be creating the sprite incorrectly, so i'd like to check that. Also, what is up with draw2D()? Is it any different to draw?
Oh, and if anyone knows how to use one big bitmap of all the sprite frames and just pluck what you want from that I would love to know (i haven't looked into that yet)
To anyone that can help me....my un-dying respect, i cannot believe how long i have searched the web looking for help...
I made the stupid point of telling myself that i woud port this game to D3D before I start my first little 3D game and now i feel i must finish it. I'll send the finished game to anyone who helps me (and anyone else who wants it!). AS soon as i have the code for the sprite, ill be finish in an hour or two!

