DCHVirtual
New member
- Joined
- Oct 23, 2015
- Messages
- 2
- Programming Experience
- 10+
I was following someone's youtube instructional videos on how to get the framework for a 2D game setup, and I don't know what I did wrong, but on his video the image does not flash, and in my game the sprite flashes in and out of existence.
Here is the code I am using to implement:
Any idea what I am doing wrong?
Thanks!
Here is the code I am using to implement:
C#:
private void render() {
Bitmap frame = new Bitmap(1200, 700);
Graphics frameGFX = Graphics.FromImage(frame);
while (true)
{
Bitmap Spherecraft = Forcewave2.Properties.Resources.Spherecraft;
frameGFX.DrawImage(Spherecraft, 100, 100);
drawHandle.FillRectangle(new SolidBrush(Color.Black), 0, 0, 1200, 700);
drawHandle.DrawImage(frame, 0, 0);
}
}
Any idea what I am doing wrong?
Thanks!