Hi,
VB6 has a poor implementation of OOP called class modules. They can
certainly improve VB6 developers programs, but are missing key
elements, such as inheritance.

The switch from VB6 to VB.NET was the best thing I've ever done!
(Okay, maybe that's a little exaggerated.) What I don't think
developers realize is how much easier OOP is versus an object-based
language. It can be especially useful in games, where you might have a
generic Enemy class, and would like to create specific sub-classes
with special properties or methods.

Another good thing about switching, is you get access to the .NET
framework! One feature that was really lacking in VB6 was the ability
to spawn threads. There's a whole bunch of other cool things, like
networking (without WinSock), database connectivity, LINQ, and some
crypto stuff.

One big difference is how garbage collection works. VB6 is based on
COM (each obj has a reference counter, although hidden, that count the
number of variables in the scope that point to the object). So if you
were to use the New keyword with an object, (assume there are no other
variables in the scope), the reference count would be increased to 1.
Do the same thing again, and the reference count is increased to 2. So
when it gets to 0 (one common way is to set to Nothing), there is no
need for this object to be in memory anymore, and is therefore thrown
in the trash by the garbage collector.

.NET handles this differently. Instead of seeing how many objects
point to one another, .NET will keep a list of what things point to
one another. So let's say all the pointers have gone away. Once this
happens, just an unreferenced object is in memory. Eventually, .NET
will garbage collect these unreferenced objects. You might think that
this doesn't really affect how you program, but in reality, it does!
In VB6, you might set a variable to Nothing (causing the reference
count to be 0), and have VB6 do garbage collection. In .NET, if there
is only one reference to the object, setting the object to Nothing
will cause it to be collected, later. So if you need garbage
collection immediately, you should implement a dispose method, which
can be found here:
http://msdn.microsoft.com/en-us/library/fs2xkftw.aspx.

Thanks.
-Ryan
www.rsgames.co.nr

On Wed, Jul 7, 2010 at 9:30 PM, Thomas Ward <thomasward1...@gmail.com> wrote:
> Hi Hayden,
> Oh, I would imagine that would be a major undertaking for any game
> developer. The differences between VB 6 and VB .Net are quite
> sugnificant. For a developer that knows both it wouldn't be so much
> difficult as totally time consuming. Unfortunately, for a developer
> like Jim Kitchen he doesn't know VB .Net at all. In fact, he has said
> before that he doesn't understand object oriented programming and
> design which is necessary to program in any of the .Net languages as
> they are all object oriented. That would be quite a problem.
>  I know back in 2006 after I got James North's source code for
> Montezuma's Revenge it took me about three months to convert the
> source from VB 6 to C# .Net. Since I know both languages it wasn't
> difficult, but was time consuming to convert it from one language to
> another.
> Now, assuming a developer converted ten games, taking three months to
> complete each, that is 30 months of work. That's more than two years
> of work just for ten games. Jim Kitchen has a lot more than that. I'd
> say that would be like three or four years of work minimum to convert
> all of his games to VB .Net.
>
> HTH
>

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to