0
\$\begingroup\$

I have been looking into making a game engine using VB.NET but I'm having some trouble finding how I would draw stuff to the screen. In some places, people draw to the screen using the picture box control but I have read else where that it is not recommended to do this as I will run into problems in the future if I draw to a picture box

So I would like to know what would be the best way to draw sprites etc. to the screen. Is it OK to use picture boxes or is there another way?

\$\endgroup\$
  • \$\begingroup\$ Typically, you should try these things out before asking. You'll have a better idea about what you should ask about and be able to give a more concrete example of what you think the problems might be. \$\endgroup\$ – MichaelHouse May 4 '14 at 15:49
  • \$\begingroup\$ If you want to learn how to write really efficient code, learn GDI+. It's so painfully slow that you need a lot of skills to archive 30fps for a small, tilebased jump'n'run (but it is possible by only updating exactly what was covered by the player) \$\endgroup\$ – jalgames May 4 '14 at 16:09
2
\$\begingroup\$

I once started with VB.NET and the Picture Box control to create a Bejeweld like game. This worked out fine, but the game had no effects and was very static. People are right by stating that you'll run into trouble as soon as you want anything more dynamic.

Therefore, I'd recommend using some .NET framework such as XNA, which allows you to draw sprites easier and far more efficiently. Visual Basic XNA Example on MSDN explains how to do exactly this.

\$\endgroup\$
0
\$\begingroup\$

XNA\MonoGame will get you up and running almost over night but I would not get to deep into XNA because while I loved it and it was awesome to get me started by the time you are good with the API you will be wanting to move over to sharpDX, then have to unlearn heaps of stuff that XNA lets you do and get used to the power DX11 brings.

I came in to XNA just before they dropped support and I wish I had moved to sharpDX sooner because its a bit harder but I found that having to write all my own tools and framework to be very rewarding.

I use the sharpDX toolkit for all my 2d stuff and raw sharpDX for the rest, the toolkit also looks just like XNA so moving to the sharpDX toolkit is easy once you get your head around XNA.

SharpDX.Toolkit

My point is, use XNA to get your feet wet but don't get to locked in and move over to sharpDX as soon as you can.

Because not many ppl seem to do fun stuff with VB.net you will have to convert the XNA samples from C# to VB.net and there are some parts of sharpDX that need to be changed in order to work with VB.net.

I know sharpDX seems like a lot of work, it is but its worth it in the end.

GitHub is your friend and the sharpDX dev is a beast and knows his shit, I'm also proly going to add a VB.net repo for sharpDX to my GitHub(at some point).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.