Yipee! Great to hear from you!
You may send your sourcecode to this e-mail:
jupiter999jupiter999@gmail.com
But back to serious discussion, I'd been using PARGB32bpp format already since a few months ago (from an article found somewhere in http://stackoverflow.com).
So far I am facing a few problems as follows:
1) Redraws the entire map for every movement (player's movement + monsters' movement).
What goes awkward is when hundreds of monster moved one by one after player's movement. The game screen goes flickering on each monster's movement. Did you have this kind of problem?
2) I need some delay in my drawing routine, so I use "Thread.Sleep" method. But then UI thread will be frozen by this, so after a long hours of trial and error with research, I used backgroundworker.
But then my whole coding becomes a havoc to me. It looks to me as if OOP practices breaks down in my coding. I can't separate drawing routine away from my core game routines. So I end up wasting much of my time busy modifying the drawing routines instead of the more important game core routines.
3) Caught exception "object reference not set to an instance of an object" from time to time. I'm still debugging it, but it seems to me that multi-threading codes started a few drawing calls that "fighting among themselves" to draw on the same bitmap variable. Still investigating...
I'm totally taken aback when I saw you game runs, especially when the camp fire keep smoking on its own while I'm firing some monsters and others keep moving.
It's brilliant!
Everything is drawn smoothly.
Fast, that I don't see any flickering whatsoever...
By the way, are you doing a Windows Forms Application project or Console Application project?
Really curious about this as well.
I wish that my game core routines are portable, even for the drawing routines. But that will be my final objective, not now.
Feel free to comment / suggest / advice me. Appreciate all of them.
Thanks~
Best regards.
You may send your sourcecode to this e-mail:
jupiter999jupiter999@gmail.com
But back to serious discussion, I'd been using PARGB32bpp format already since a few months ago (from an article found somewhere in http://stackoverflow.com).
So far I am facing a few problems as follows:
1) Redraws the entire map for every movement (player's movement + monsters' movement).
What goes awkward is when hundreds of monster moved one by one after player's movement. The game screen goes flickering on each monster's movement. Did you have this kind of problem?
2) I need some delay in my drawing routine, so I use "Thread.Sleep" method. But then UI thread will be frozen by this, so after a long hours of trial and error with research, I used backgroundworker.
But then my whole coding becomes a havoc to me. It looks to me as if OOP practices breaks down in my coding. I can't separate drawing routine away from my core game routines. So I end up wasting much of my time busy modifying the drawing routines instead of the more important game core routines.
3) Caught exception "object reference not set to an instance of an object" from time to time. I'm still debugging it, but it seems to me that multi-threading codes started a few drawing calls that "fighting among themselves" to draw on the same bitmap variable. Still investigating...
I'm totally taken aback when I saw you game runs, especially when the camp fire keep smoking on its own while I'm firing some monsters and others keep moving.
It's brilliant!
Everything is drawn smoothly.
Fast, that I don't see any flickering whatsoever...
By the way, are you doing a Windows Forms Application project or Console Application project?
Really curious about this as well.
I wish that my game core routines are portable, even for the drawing routines. But that will be my final objective, not now.
Feel free to comment / suggest / advice me. Appreciate all of them.
Thanks~
Best regards.