As always Im playing catch-up; I didnt get .NET until last year, and that is when I switched from VB6 to C#.NET; I like C# better by the way - more intuitive. Anyway, graphics is always a fun thing to play with and Ive always be a self-teacher so I know Im doing somethings wrong (as far as best practices), but thats for a later post.
Looking around 30 fps for painting full screen seems to be standard (maybe not) with GDI+, regardless, my experiances playing with Flash 5 have taught me that things (objects) moving fast across the screen dont look (appear) smooth at this frame rate, you almost need triple that speed with your movement increments decreased (going 1 pixel per frame rather than 6) for it to appear both fast and smooth. My question is for you gurus... is 30 fps fast enough for action games where things are constantly moving or should GDI+ strictly be used for board-like/card games that arent graphic intensive? And if it is fast enough how do you get to not appear choppy because your moving objects 6+ pixels per frame for it to appear to me moving fast?
Also it would seem that if you could tell GDI+ to only repaint what needs repainting it would be able to run faster; is there a way to do this?
And one last thing; I read in a post about manually double buffering? How do you do that? Ive been doing:
this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
Is this wrong? Maybe an alternative would increase the fps? Example please.
I played with BeginRegion() and EndRegion() just to see what it does, but is there a real-world use for it?
Sorry for the length, but Im trying to play catch-up with the rest of the programming world, Ill save the rest of my qs for later
Brian
Looking around 30 fps for painting full screen seems to be standard (maybe not) with GDI+, regardless, my experiances playing with Flash 5 have taught me that things (objects) moving fast across the screen dont look (appear) smooth at this frame rate, you almost need triple that speed with your movement increments decreased (going 1 pixel per frame rather than 6) for it to appear both fast and smooth. My question is for you gurus... is 30 fps fast enough for action games where things are constantly moving or should GDI+ strictly be used for board-like/card games that arent graphic intensive? And if it is fast enough how do you get to not appear choppy because your moving objects 6+ pixels per frame for it to appear to me moving fast?
Also it would seem that if you could tell GDI+ to only repaint what needs repainting it would be able to run faster; is there a way to do this?
And one last thing; I read in a post about manually double buffering? How do you do that? Ive been doing:
this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
Is this wrong? Maybe an alternative would increase the fps? Example please.
I played with BeginRegion() and EndRegion() just to see what it does, but is there a real-world use for it?
Sorry for the length, but Im trying to play catch-up with the rest of the programming world, Ill save the rest of my qs for later
Brian