Click here to Skip to main content
15,886,840 members
Home / Discussions / C#
   

C#

 
GeneralRe: Holding ArrayLists in an ArrayList Pin
A.Wegierski25-Aug-03 22:55
A.Wegierski25-Aug-03 22:55 
GeneralRe: Holding ArrayLists in an ArrayList Pin
amadeonMk26-Aug-03 0:43
amadeonMk26-Aug-03 0:43 
GeneralRe: Holding ArrayLists in an ArrayList Pin
Julian Bucknall [MSFT]26-Aug-03 5:50
Julian Bucknall [MSFT]26-Aug-03 5:50 
GeneralRe: Holding ArrayLists in an ArrayList Pin
A.Wegierski26-Aug-03 20:12
A.Wegierski26-Aug-03 20:12 
Question.NET security sample anyone? Pin
devvvy25-Aug-03 21:36
devvvy25-Aug-03 21:36 
GeneralI cann't send mail to the other server Pin
Velichko Sarev25-Aug-03 20:54
Velichko Sarev25-Aug-03 20:54 
GeneralRe: I cann't send mail to the other server Pin
Corinna John28-Aug-03 1:28
Corinna John28-Aug-03 1:28 
GeneralFast graphics in C# Pin
Stephane David25-Aug-03 20:37
Stephane David25-Aug-03 20:37 
I'm trying to write a game in C# to learn the language.
It's a mini clone of civilization III.
The main game window is a map, drawn with tiles (20x20 tiles right now).
To draw the map, I have somewhere a Bitmap that I store as backbuffer, where I draw the tiles themselves. Then to animate the sprites I use this "map bitmap", and draw the sprites above it.
To draw a tile, I have canvas in memory, with all the braw bitmaps (they contains 9x9 tiles), I select the right tile (-> creation of a source rectangle, corresponding to the right tile in the canvas), then I draw it in my Bitmap, after having found the destination rectangle.

So basically it's something like

graphics.Draw(CanvasBitmap, SourceRectangle, DestinationRectangle).

I have some problem with speed : rendering 20x20 tiles (each is 128x64) takes 950 ms. As I need to render it anytime I scroll (because the map is 200x200, but the viewport is only 20x20), it is not acceptable.

Is there a way to speed the process using only GDI+ and C#?

Must I use direct X?



GeneralRe: Fast graphics in C# Pin
Meysam Mahfouzi25-Aug-03 23:35
Meysam Mahfouzi25-Aug-03 23:35 
GeneralRe: Fast graphics in C# Pin
Stephane David26-Aug-03 1:26
Stephane David26-Aug-03 1:26 
GeneralRe: Fast graphics in C# Pin
Ista26-Aug-03 4:46
Ista26-Aug-03 4:46 
GeneralRe: Fast graphics in C# Pin
Philip Fitzsimons26-Aug-03 2:28
Philip Fitzsimons26-Aug-03 2:28 
GeneralRe: Fast graphics in C# Pin
Stephane David26-Aug-03 3:55
Stephane David26-Aug-03 3:55 
GeneralRe: Fast graphics in C# Pin
Philip Fitzsimons26-Aug-03 4:25
Philip Fitzsimons26-Aug-03 4:25 
GeneralRe: Fast graphics in C# Pin
Philip Fitzsimons26-Aug-03 4:43
Philip Fitzsimons26-Aug-03 4:43 
GeneralRe: Fast graphics in C# Pin
Stephane David26-Aug-03 5:06
Stephane David26-Aug-03 5:06 
GeneralRe: Fast graphics in C# Pin
Philip Fitzsimons26-Aug-03 5:46
Philip Fitzsimons26-Aug-03 5:46 
GeneralRe: Fast graphics in C# Pin
Stephane David26-Aug-03 11:04
Stephane David26-Aug-03 11:04 
GeneralRe: Fast graphics in C# Pin
Philip Fitzsimons26-Aug-03 23:11
Philip Fitzsimons26-Aug-03 23:11 
GeneralRe: Fast graphics in C# Pin
Ista26-Aug-03 4:45
Ista26-Aug-03 4:45 
GeneralRe: Fast graphics in C# Pin
J. Dunlap26-Aug-03 11:37
J. Dunlap26-Aug-03 11:37 
Generalgrid control Pin
Member 52474025-Aug-03 19:39
Member 52474025-Aug-03 19:39 
GeneralSplitting a string Pin
Member 50926225-Aug-03 18:52
Member 50926225-Aug-03 18:52 
GeneralRe: Splitting a string Pin
Nick Parker25-Aug-03 19:18
protectorNick Parker25-Aug-03 19:18 
GeneralRe: Splitting a string Pin
Member 50926225-Aug-03 19:35
Member 50926225-Aug-03 19:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.