Dear CodeProject Members,
I have been facing serious memory issues and they are driving me nutes. Currently I am making a terraria like game, as you can see on this video:
I have been able to make a fully working chunk system, and so far have updated it so that I can have about 250 different kind of blocks. Although here is not where my problem lies I seem to be only gaining memory. It's driving me nuts and I have no idea why. This is what I mean:
I tried drawing only with the graphics from the Paint Event itself but this resulted the same with even more
memory. Is this normal or am I seriously messing something up?
Here is my piece of code:
protected override void OnPaint(PaintEventArgs e)
Bitmap _Bitmap = new Bitmap(this.ClientSize.Width, this.ClientSize.Height);
using (Graphics g = Graphics.FromImage(_Bitmap))
e.Graphics.DrawImage(_Bitmap, 0, 0, this.ClientSize.Width, this.ClientSize.Height);
The funny thing is, is, that without even going out of the first chunk the issue still occurs, so it is not a chunk error. Which I have also checked over 100+ times.
Let me also add that this memory does not drop down to it's original amount after a while, people told me that.
Anyone ? Help ! :L