Visual Basic and Game Programming

Started by
7 comments, last by brkydn123 17 years, 10 months ago
Some VB questions here. 1. Why is Visual Basic regarded so negatively for game development? (I get this from numerous discussions I have seen) 2. What is the different between VB6 and VB.NET? And is VB6 being discontinued cause to stop using it?
Advertisement
1.Peformance slow compared to C/C++
Not many books on VB and game programming.
Encourages bad programming practices with lots of use of goto for error checking and no requirement to explicitly declare variables,etc...
2.Lots might as well be considered different languages since they are not backwards compatible.Yes VB6 is discontinued but lots of business still use it since many business applications are written in VB6.
[size="2"]Don't talk about writing games, don't write design docs, don't spend your time on web boards. Sit in your house write 20 games when you complete them you will either want to do it the rest of your life or not * Andre Lamothe
Quote:Original post by daviangel
1.Peformance slow compared to C/C++
Not many books on VB and game programming.
Encourages bad programming practices with lots of use of goto for error checking and no requirement to explicitly declare variables,etc...


Performance can be slower, but I guarantee it is MUCH easier to write bad/slow C++ code than VB code most of the time. Learning the basics of visual basic is so easy, it would be stupid to buy a book on it. There are, however, several books on managed directX programming, which are very easy to port from C# (almost line for line). VB.NET supports try/catch stements for exception handling, and both languages can be made to recognize strong typing (Option Explicit, IIRC).

Quote:Original post by daviangel
2.Lots might as well be considered different languages since they are not backwards compatible.Yes VB6 is discontinued but lots of business still use it since many business applications are written in VB6.


True, VB6 has huge code-bases in the industry of business software. However, VB.NET is still definately the way to go.


1. People do not understand the concept of using the right tool for a job. IT is stupid to write a web based app in c++, and it is stupid to write an FPS with assembly. You have to choose a language based on your knowledge of the language, your speed needs, and your coding efficiency. VB is extremely esasy to program, but can have issues with speed if you are not careful.

2. Although I began my game programming in VB6, I would not recommend it. As stated, it encourages bad practices (such as variants and spaghetti code). However, VB.NET is a different story. It preserves the simple and intiutive syntax of Visual Basic with the power and speed of the .NET framework. VB.NET is certainly fast enough to create 2D and 3D games using managed DirectX. VB.NET supports all the features of modern languages, inclusing encapsulation, inheritance, polymorphism, etc.
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute
As mainly a C/C++ programmmer I picked up VB 6 very easily. I don't agree much about the so called "bad behavior" caused by VB 6. It's certanly true it's not as strict as C/C++ but it was never intended to be that either.

As mentioned above it's just as easy to write ugly code using C/C++ as any other language. When you do have learned to program you will have eliminated most of the "bad behavior style" a newcomer is often doing. Like with every new subject one tries to learn, it takes time and effort to develop skill and get it right.

Otherwise I agree that VB.NET is the way to go if want to develop games and applications for the near future. If you're just in for it as a hobby and have access to VB 6 you might as well stick with and learn what you can. The transition to VB.NET wont be that difficult if you know VB 6, but it does introduce a new style which takes some time to get used to.
Free Classic Arcade Games by Blitzway Games
Hi, what are the differences between vb6 and vb.net, apart from the obvious (i.e. vb.net will be compiled against the .net platform)? What I mean is could you use old vb6 books (lots of them around), to learn vb.net?

Also what tools resources are there for supporting directx on vb.net?
Quote:Original post by Anonymous Poster
Hi, what are the differences between vb6 and vb.net, apart from the obvious (i.e. vb.net will be compiled against the .net platform)? What I mean is could you use old vb6 books (lots of them around), to learn vb.net?


I've never tried VB6 but know from what my book and other programmers have told me that VB.net is very different from VB6 yet so alike that for an old VB6 programmer it could be hard to make the transition since the languages are so alike, yet not alike at all.
And no, you couldn't use VB6 books to learn Vb.net.
Quote:Original post by daviangel
Encourages bad programming practices with lots of use of goto for error checking and no requirement to explicitly declare variables,etc...


Just to clear a few things,If we are talking about Visual Basic 6.0, first of all you do not need to use goto statement for error checking although it is legal to use such a method ( same is true for c++ , you can also use goto, continue, break etc and end up with spagetthi code). What makes goto statement EVIL is tracking the Jump points in a source code, but the way VB6 uses goto for error checking, you do not have that problem. Just scroll to the end of function.

'Private Sub exampleSub()On Error GoTo ErrHandler''do stuff'Exit SubErrHandler:'Select Case Err.Number    '    Case 13: 'Type Mismatch        'bla bla    Case Else        '        'some other error, log or whatever        'End Select'End Sub'

'
For explicitly declaring variables, you must have the following decleration:
'
 Option Explicit


Quote:Original post by PHPCoder
What is the different between VB6 and VB.NET? And is VB6 being discontinued cause to stop using it?


There are many differences, most important one is the VB 2005 ENCOURAGES Object Oriented Based programming and fully supports it. VB6 is partially Object Oriented in its kind of way I can comment.

VB.Net obviously uses .Net framework. VB6 Compiles to Native Code, and that is one of the compiler based differences.

Quote:Original post by Sr_Guapo
People do not understand the concept of using the right tool for a job.


I can't agree more.

Cheers,
_EpcH_
Have we sent the "Don't shoot, we're pathetic" transmission yet?
There are at least some games written in VB6. Even a FPS. You just need a 3D-engine that work with VB6. Here is one: http://www.mwdgames.com
you may use Truevision

http:\\www.truevision3d.com

This topic is closed to new replies.

Advertisement