locked
2D Games with VB RRS feed

  • Question

  • Hi,

    I want to make 2D game with VB. I have read that I can use DirectX or XNA (althought it is designed mainly for C#). However, why can I not make the game without the use of any of these techniques?. Are there disadvantages of simply create graphics in pictureboxes or whatever, then make these graphics move or change according to the pressed keystrokes which is caught by the KeyDown event? What DirectX or XNA can give me?

    Thanks in advance.

    Sunday, March 10, 2013 7:41 PM

Answers

  • DirectX or XNA will give you better performance, with more direct control over the updating of the game play.  You can certainly create 2D graphics games in VB without them, using either drawing with GDI or by manipulating controls, and there should be ample examples available for download.   Drawing with GDI will give better performace than using controls such as picture boxes, as the controls include a lot of overhead that is not relevant to games.

    So if performance is not an issue and you don't mind graphics that are based on rectangular components, then games created with standard Windows Forms controls is one way to do it.

    • Marked as answer by BGQQ Monday, March 11, 2013 3:37 PM
    Sunday, March 10, 2013 8:57 PM

All replies

  • Way back in the day I used bitblt
    http://msdn.microsoft.com/en-us/library/aa930997.aspx
    its obsolete sorry ment for VB 6

    Maybe someone else can give you the updated version

    Sunday, March 10, 2013 7:57 PM
  • XNA works good with VB.NET 

    Can also use DirectX with VB ... A bit more complicated however

    Sunday, March 10, 2013 8:50 PM
  • DirectX or XNA will give you better performance, with more direct control over the updating of the game play.  You can certainly create 2D graphics games in VB without them, using either drawing with GDI or by manipulating controls, and there should be ample examples available for download.   Drawing with GDI will give better performace than using controls such as picture boxes, as the controls include a lot of overhead that is not relevant to games.

    So if performance is not an issue and you don't mind graphics that are based on rectangular components, then games created with standard Windows Forms controls is one way to do it.

    • Marked as answer by BGQQ Monday, March 11, 2013 3:37 PM
    Sunday, March 10, 2013 8:57 PM