PictureBox Problem

Permit2kill

Member
Joined
Jun 25, 2007
Messages
21
Programming Experience
Beginner
Basically, I'm creating a game in which I have to manipulate slash move picture boxes. It's getting to the point where I'm moving around 10-15 10x10 pixel picture boxes around a form.

The problem I'm getting is that it's starting to run really slow once the number of picture boxes increases. I mean, I'm not running through a ton of complicated motions but it's honestly getting ridiculous the delay in movement. I'm wondering, is there an efficient way to manipulate picture boxes or is there some other kind of problem here.
 
You'd probably be better off using GDI+ to draw the Images directly onto the form. You then reduce your overhead by having fewer controls, plus you can optimise the drawing by invalidating the minimum area on each paint.
 
Yeah I've heard some good things about GDI+, I just haven't had the time to check it out quite yet. However, after seeing another person support it, it must be good so I'll look it up. Thanks man.
 
If your serious about game development then you probably want to be looking into languages such as C++ which are much more efficient due to the way they compile and run.

As for doing it in VB.NET, I would have to agree with previous replies and say go for GDI.
 
You should also keep in ming that Windows Forms was never intended to support games. It was never intended to have lots of movement going on. If you want to get into game programming in VB.NET then you should look at Managed DirectX, either immediately or in the near future. That's your future as a .NET games developer.

There is also XNA, which I believe is basically a layer that sits on top of DirectX to make your life easier. XNA games can also run on XBox 360. XNA Game Studio Express is already out (in 2005, maybe not in 2008 yet) and XNA Game Studio is due soon. Unfortunately it only supports C# to begin with, but they're looking at adding VB support.
 
You should also keep in ming that Windows Forms was never intended to support games. It was never intended to have lots of movement going on. If you want to get into game programming in VB.NET then you should look at Managed DirectX, either immediately or in the near future. That's your future as a .NET games developer.

There is also XNA, which I believe is basically a layer that sits on top of DirectX to make your life easier. XNA games can also run on XBox 360. XNA Game Studio Express is already out (in 2005, maybe not in 2008 yet) and XNA Game Studio is due soon. Unfortunately it only supports C# to begin with, but they're looking at adding VB support.

Thanks man, I'll definitely check that out. Especially because I've been learning a little C# on the side as well.
 
Back
Top