Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Making a Decision
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Tectra
Neophyte

USA
3 Posts

Posted - Jun 30 2005 :  2:09:46 PM  Show Profile  Send Tectra an AOL message  Send Tectra a Yahoo! Message  Reply with Quote
Hi everyone, Very Nice site, it's the best I've seen yet for the Visual Basic Language. Keep it up!
Well im having aittle trouble deciding on wether to use VB.NET or VB6 to create games. VB.NET is of course better now at certain things but I'm not sure if I need to use it to create good games. I would think that VB6 would be easier to write the code for games because it's less complicated or maybe im wrong. I also know it depends on which games your going to create, but for most games, VB6 can still kick butt in creating great games. I dont know all about VB.NET but is seems to lean toward more on the aspect of other programming uses then having more advances in the game department.
If i'm worng, correct me cause im of course some what new. I have programmed before but not useing VB6 or VB.NET. What does VB.NET have to offer for the gamers that VB6 doesn't?

Thanks Fellous & Take Care.....

You can learn anything, all it takes is some common sense :D

Vankwysha
Squire

Australia
43 Posts

Posted - Jun 30 2005 :  9:00:27 PM  Show Profile  Click to see Vankwysha's MSN Messenger address  Reply with Quote
Hi Tectra, welcome to the site. Before I begin, this is my personal opinion regarding VB6 vs VB.NET, and by no means am I right or wrong.

I programmed in VB6 for about three years, and I've been programming in VB.NET for about one year. Obviously in that time I've tried to produce some games. Now, when I programmed in VB6, I did not even come close to understanding how to use APIs or DirectX (hmm, pretty sad three years but hey, I was in primary school), and I programmed my games using, *sigh* VB6 controls. *Shudder*, that brings back painful memories...

Anyway, obviously my opinion concerning VB6 as a gaming tool is a bit biased. However, even my "games" would have been a lot easier to program in VB.NET, even before we get to DirectX.

Well, DirectX. From what I have read, and someone correct me if I'm wrong, using DirectX in VB6 requires a long and painful list of API calls using unmanaged code. However, Microsoft's introduction of Managed DirectX 9 means that programming a game using the .NET framework is as simple as referencing a DLL. Well, maybe not, but it sure makes things easier .

Also, I think that the object-oriented nature of VB.NET means that creating classes and objects is a lot easier than it was in VB6, which can simplify things such as management of the game, AI etc.

Over all, I think that the main downfall in VB.NET is that it is hard to obtain. Personally, because I'm at school I was able to get the Academic edition of VS.NET for about AUD150, but other than that it can be hard to find. You can download VB.NET Express 2005 Beta from the Microsoft site, but I'm not sure how big a download that is.

However, if you can overcome that hurdle I would whole-heartedly recommend VB.NET. It can be difficult at first, but once you have learnt the basics it makes things so much easier.

Go to Top of Page

Threshold
Squire

USA
44 Posts

Posted - Jun 30 2005 :  9:17:31 PM  Show Profile  Reply with Quote
They'll both do the job nicely. VB.NET is far more compliant with OOP standards (VB6 claims to be but doesn't quite get there). However, I use VB6 primarily. Why? Because it's simpler. Plus, I've got a whole library of stuff I've already made in it. But if you're starting from scratch, it would probably be wise to start with the newest tech so you won't be as far behind in a few years...especially if you ever find yourself needing to use your VB programming skills professionally (VB6 isn't much more than a hobbyist's language these days).

Life is short. They say "don't waste it, have fun." They're right, don't waste it...but DO redefine "fun."
Go to Top of Page

dxgame
Knave

USA
73 Posts

Posted - Jul 01 2005 :  06:14:25 AM  Show Profile  Visit dxgame's Homepage  Reply with Quote
The answer really depends on your personal goals and target market. Everyone in the shareware industry pretty much agrees the .net framework is the future, not the present. If your goal was to learn the latest MS products and to prepare to enter the games industry on the Windows platform in the future, I would probably recommend the .net framework. But if your goal is to release a shareware/commercial game in the next 6-12 months I would recommend VB6 because of the stability of the language, most users already have the VB6 runtimes installed, and if they don't, the runtime download is not that demanding on the end user. I personally plan on using VB6 for the next 2-3 years and keep an eye on the .net framework as it matures. ;)
Go to Top of Page

Almar
Moderator

Netherlands
192 Posts

Posted - Jul 01 2005 :  4:52:46 PM  Show Profile  Visit Almar's Homepage  Send Almar an ICQ Message  Reply with Quote
I have the opposite opinion. I've been programming VB + DirectX since version 5, and haven't got any complaints since DX7... :)
Go to Top of Page

Tectra
Neophyte

USA
3 Posts

Posted - Jul 01 2005 :  9:15:52 PM  Show Profile  Send Tectra an AOL message  Send Tectra a Yahoo! Message  Reply with Quote
Thanks fellous, appreciate that. I'm not looking to making high tech games of that matter, my focus is to work on multiplayer games with decent style graphics. The graphics are never more important then the gameplay, I intend focusing on gameplay while also keeping the graphics good enough to enjoy.
I'm thinking to go with VB6, it's powerful and easier to write the code for the games which is all I need anyway. I like to use only what I need to accomplish tasks.
I would like to ask if anyone has any information or tips for online mutiplayer games in VB6? Such as things to watch out for, or how to make the online experience more smoother?
I plan on makeing a Big Online multiplayer Title with alot of players, wether it's 100 to 5,000 players. Then I would just keep adding new stuff to the game.
Any information would be helpful in knowing how to go about VB6 online games.

Regards, Brian

You can learn anything, all it takes is some common sense :D
Go to Top of Page

Struan
Squire

21 Posts

Posted - Jul 11 2005 :  04:01:40 AM  Show Profile  Visit Struan's Homepage  Reply with Quote
I am working for my college right now converting a VB6 program to VB.NET and I have had extensive experience with both. And I have to tell you that once I got comfortable with VB.NET, going back to VB6 is nothing short of agonizing. I am glad I only read VB6 for work and don't have to program in it.

I would recommend getting Visual Basic Express when it comes out. It will have a ton of new features and use the new .NET 2.0 Framework, and at $50 you can't beat the price. I wouldn't recommend learning VB6 since you don't know how long MS will be supporting it. I know I want my apps to keep working as long as possible. And simply put I think VB.NET is better. You also have to consider all the benefits of using .NET

I have listed the pros / cons for each in the order you probably care most about (pertinence to games)

Speed
------
From what I've seen VB.NET beats VB6 hands down speedwise with one big exception. It generally (but not always) will load apps slower because it has to JIT compile the code. You can solve this by precompiling this code when the app is installed and then it will normally beat VB6. The app loading times aren't terrible anyway, just a little slower than VB6. But for gaming this typically isn't a big deal anyway especially when you want every last drop of performance while its running in which case VB.NET beats VB6.

OOP
----
VB.NET has a lot more object oriented features than VB6, and this is a good thing if you are planning on programming a game with 5000 players. When programming games in VB.NET I typically do things the "right" way, but when I was using VB6 a lot of the time I had to resort to "hacks" to get stuff to work.

Easy of use
------------
Once again VB.NET wins, it is ridiculously easy to write cool programs in .NET and its getting easier with the next version. The only way I can see VB6 being easier is because its "what you are used to", but thats a really bad excuse. The syntax is virtually identical just a few minor changes that don't take long at all to get used to. Then their is the .NET Framework it takes a little while to learn, but their is a lot of sample code out there, and its certainly not "hard". and you will find that once you are comfortable with .NET you are a lot more productive than with VB6. VB.NET also has a garbage collector so you don't have to worry about memory leaks (with a few exceptions) however I would warn you against using it as a crutch.

Distribution
-----------
Right now I'd have to say VB6 is easier to distribute (at least in the context of games) than VB.NET simple because a lot of people don't already have the .NET framework (this won't be a problem after Windwos Longhorn) and it is a lot larger than the VB6 dll, but this is changing in the next version. The .NET Framework 2.0 will introduce ClickOnce apps. Which will auto-install, auto-update, auto-install .NET framework, and automatically install extra components your app depends on. This is great if you are making an online multiplayer game. Rather than having to tell everyone to update the game and creating your own update code to check for patches etc., You can have your program automatically check your website for a newer version when it starts and then download that automatically. This way you can easily keep everyone up to date.

Flexibility
---------
VB.NET wins again, its a lot easier to write much more general code. I rarely ever reused most of my VB6 code. Most of the time it was too specific to the particular scenario it was designed for. But with .NET everything is a lot more OO and generally a lot more reusable. Its also a lot easier to work with a group of people in VB.NET than in VB6. I am doing a .NET project with several other people for work and its a lot easier to collaborate than VB6 would have been since its easier to separate classes/controls/forms, just divide and conquer. And if you know a C# coder and want to collaborate it it is really easy since the dlls .NET makes are all compatible.

Networking
-----------
Networking in .NET is so much better than VB6. The protocols are part of the framework so you don't anything extra like a winsock control to use TCP or UDP. Compared to VB6, VB.NET networking is a breeze.

Databases
----------
If you want to make online games you are going to have to deal with databases and I can tell that VB.NET is a lot better with them than VB6.

XML
----
.NET has native support for XML files which I have found to be extremely helpful. I could go on and on about why XML is great but this post is already getting too long, But as an example I created map files for one of my programs and went through 6 subversions of my program without having a compatibility issue with the files. Even after adding several totally new things to the file format. There is no way you could do that as easily in VB6 as I did it in .NET

Debugging
----------
You guessed it. VB.NET wins again. Visual Studio.Net comes with a ton of great debugging tools. And .NET handles errors a lot better than VB6. And the CLR Profiler is simply amazing. You can watch the memory usage of your program down to the individual datatypes, you can see which functions are taking the longest, and you can see what the garbage collector is up to.

Intellectual Property
--------------------
I consider this a non-issue, but a lot of people seem to be worried that other people will steal their code. Because you can decompile .NET code function names and all (no code comments tho). However, Visual Studio 2003 and higher comes with a code obfuscator that basically jumbles all your variable names so the code is as illegible as C++ decompilers. Why is this a non-issue? First because you probably won't have anything worth stealing, I know I've never written any code that was worth stealing. You aren't going to be doing anything revolutionary with the code for your game (even if its Doom3) that people can't figure out how it works just from using the program. And you're probably still thinking "What if someone steals my game code". Yeah, so what? They will have to understand the whole thing in order to do anything useful with it, and at that point they might as well just write their own. Its sort of like plaigarising a book by checking it out the library then typing up the whole thing yourself. Then change all the names and locations, and change a couple elements of the plot and then modify the backstory. And so on and so forth, until its practically a new book anyway. So what if people copy a couple snippets of your code? Its not worth losing sleep over. I would take it as a compliment, and If people wanted to know how something works then I would tell them or send them a code snippet. So now you are thinking "What about security? I don't want people hacking into my online game and playing for free. If they have my code they can figure out how it works." First off, if you are worried about this then you probably need to rethink how you are authenticating players. But to help you out, the .NET Framework has several cryptography features. Which would be useful for implementing CD keys in an online game and thats practically the only copy protection that hackers can't easily bypass these days for any programming language.

Sure both VB6 and VB.NET can make great games, but from a development standpoint VB.NET is clearly better. Especially since you have not learned VB6 already and won't have several of the bad programming habits from it going into VB.NET. All in all there is really no good reason not to use .NET

Anyway, good luck with your games no matter what language you choose.

Go to Top of Page

VBStrider
Neophyte

6 Posts

Posted - Jul 11 2005 :  09:51:47 AM  Show Profile  Visit VBStrider's Homepage  Reply with Quote
But what about encryption keys and encryption itself? If someone can decompile your code and see everything, there's no reason to encrypt files, packets, etc. since they can easily find out how you did it.

VBStrider
Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - Jul 11 2005 :  10:54:39 AM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
Arguments either for or against either VB 6 or VB.NET are generally just people's opinions and not real facts. "Which is better?" is a loaded question and there is no correct answer.

However, there are a couple of facts regarding the two different languages that are of importance when programming games:

1. There is a lot of source code and example programs available on the internet and in the DirectX SDK for using DirectX 7 and DirectX 8 with VB 6.
2. There are zero VB.NET examples in the DirectX 9 SDK.
Go to Top of Page

Tectra
Neophyte

USA
3 Posts

Posted - Jul 11 2005 :  11:25:51 AM  Show Profile  Send Tectra an AOL message  Send Tectra a Yahoo! Message  Reply with Quote
Well thats True, theres oppinons but I think theres more of a correct answer depending on what your going to use the langauge for, VB.NET certainly has alot more advantages over VB6, so that makes .NET better itself but when talking about creating games for a hobby or of that sort, VB6 would be easier.
.NET is certainly great for games but lacks alot of information on how to create games in it's language so its harder for others to deal with. Besides making games, anything else you want to develop would be better off with VB.NET since it's of higher standard now.

Regards, Brian

You can learn anything, all it takes is some common sense :D
Go to Top of Page

Struan
Squire

21 Posts

Posted - Jul 11 2005 :  7:43:52 PM  Show Profile  Visit Struan's Homepage  Reply with Quote
But a lot of the samples for VB6 games use DirectDraw which is being deprecated by Microsoft so newer versions of DirectX might not support it fully or at all. And while its true that there are few VB.NET DirectX samples (There ARE VB.NET DirectX 9 samples from Microsoft, just not from the most recent SDK), I found it very easy to find C# samples and convert them since they use Managed DirectX in exactly the same way. And Managed DirectX is much easier than using DirectX 7 or 8. You don't have to worry about lost devices and resetting the device, you just use managed resources and it takes care of everything for you, and its very easy to switch between resolutions or windowed/fullscreen mode on-the-fly. I thought everyone knew MDX was easier than DX thats why I didn't bother mentioning it in my post. The only thing you really need samples for is the render loop and there are lots of examples of that out there.

I don't see why you insist that VB6 is better for hobbyists. Just because you are a hobbyist doesn't mean you shouldn't use the latest greatest technology. Just guesstimating here, but in VB6 I probably spent 20% of my time learning how to do stuff and 80% implementing it. With VB.NET I spent (when I started out, and was pretty unfamiliar with OOP) about 50% of my time learning and 50% implementing but I got more done in the same amount of time and my programs are much better.

Most of the information about making games for VB6 applies to VB.NET and other languages for that matter. Sure the code isn't exactly the same but the principles are. But there is lots of source code out there for VB.NET that isn't aimed at gaming but it doesn't mean you can't use it in a game. What feature do you think you won't be able to do or get tutorials for in .NET? If its something I have done then I could probably post a tutorial.

If you want to try out Beta 2 of Visual Basic Express you can get it here http://lab.msdn.microsoft.com/express/vbasic/default.aspx

I haven't tried it yet, but everyone says its awesome. Unfortunately, I have to use my computer for Framework 1.1 development right now (for work) and I don't want to go through the trouble of configuring both then having to set it all up again when it comes out but I am definitely getting it when its released. Btw I currently run Visual Studio 2002 and 2003 on the same computer with no problems (Other than 2003 associates with the .vb files so i have to open them through 2002 if I want them in it).

Also, If you have a high speed internet connection (or are patient) then you should check these out http://lab.msdn.microsoft.com/express/beginner/ They are video tutorials for beginners (No programming experience required at all) One of my co-workers had no programming experience at all prior to starting work this summer and has quickly became fairly comfortable with .NET by watching a lot of Learn VB.NET videos.

Please don't choose VB6 just because its the "hobbyist language". I think VB.NET is GREAT for hobbyist development even If you are not an experienced programmer.
Go to Top of Page

Vankwysha
Squire

Australia
43 Posts

Posted - Jul 11 2005 :  7:45:20 PM  Show Profile  Click to see Vankwysha's MSN Messenger address  Reply with Quote
quote:
2. There are zero VB.NET examples in the DirectX 9 SDK.


While this is technically true, there is an easy work-around. The DirectX 9 SDK comes with the DirectX Sample Browser, which features dozens of samples in managed C#. No, it's not VB, but it still uses managed code and the .NET framework, so if you have a very basic understanding of C/C++ you should be able to convert the tutorials and samples. Myself, I spent about 5 hours getting a basic understanding of C++ and now I can perfectly understand what the samples are saying. Also, I think there is a wide community of VB.NET gamers, certainly not as wide as VB6, but there's plenty of support out there if you want to find it.

Also, people keep saying that VB6 is simpler for writing games. Could someone please explain to me why this is so? I haven't seen anything that VB6 can do that VB.NET can't do in less code.

Vank
Go to Top of Page

Struan
Squire

21 Posts

Posted - Jul 11 2005 :  8:33:10 PM  Show Profile  Visit Struan's Homepage  Reply with Quote
quote:
Originally posted by Vankwysha
Also, people keep saying that VB6 is simpler for writing games. Could someone please explain to me why this is so? I haven't seen anything that VB6 can do that VB.NET can't do in less code.



Why didn't I think of saying that?
Go to Top of Page

dxgame
Knave

USA
73 Posts

Posted - Jul 11 2005 :  10:42:47 PM  Show Profile  Visit dxgame's Homepage  Reply with Quote
"But for gaming this typically isn't a big deal anyway especially when you want every last drop of performance while its running in which case VB.NET beats VB6."

That's great to know! But I've had several developers state just the opposite, do you have any compiled VB6 vs VB.Net apps to compare the speed increase?

"I haven't seen anything that VB6 can do that VB.NET can't do in less code."

Again, for educational purposes I would love to see some example code which clearly explains the above. I look forward to coding in Vb.net, in the coming years. ;)
Go to Top of Page

Struan
Squire

21 Posts

Posted - Jul 11 2005 :  11:13:08 PM  Show Profile  Visit Struan's Homepage  Reply with Quote
quote:
Originally posted by dxgame

That's great to know! But I've had several developers state just the opposite, do you have any compiled VB6 vs VB.Net apps to compare the speed increase?



Those several developers are either misinformed, or they are refering to ASP.NET VB or they are simply referring to load times (because VB.NET code has to be JIT compiled when it is run).

Most of the so called "benchmarks" that test VB6 vs. VB.NET are terrible, they typically try to use syntactically similar code instead of doing something the fastest way possilble in each language. Which would be a much better performance benchmark. VB.NET has several legacy functions that are comparatively slow because they are only in the framework to help ease the transition between VB6 and VB.NET. What the people writing benchmarks should do is write something the fastest way it can be written in each language. There are also a lot of lousy benchmarks claiming that C# is faster than VB.NET but once again. They either use legacy VB functions that are known to be slower. Or they write code that is slightly more optimized in the C# version compared to the VB (often without realizing it because they arent regular VB.NET programmers)
Go to Top of Page

Struan
Squire

21 Posts

Posted - Jul 12 2005 :  01:10:26 AM  Show Profile  Visit Struan's Homepage  Reply with Quote
Ok, I decided to do my own benchmarking of VB6 versus VB.NET mainly out of curiosity and because I think its pretty obvious VB.NET is faster than VB6 when you are actually using them.

I am no expert at benchmarking, but I did my best to do a fair test based on my knowledge of both VB6 and VB.NET

I didn't do anything remotely complicated because I wanted it to be a fair test so I used very simple code. I decided since this benchmark pertains to games, I would use loops and simple math. I also wanted to pick something that I would code the same way in both.

This is the code I came up with

  
        n = 1984  
        a = 1  
        b = 1000000  
        c = -1000  
        r = QPC(start)  
        For j = 1 To 10  
            For i = a To b  
                If i >= c Then
                    r = n * i  
                End If
            Next i  
        Next j  
        r = QPC(finish)  
  


I picked a few numbers for the variables they don't really have any significance (was born in 1984).
All variables were declared as 32-bit integers except start and finish which were 64 due to the performance counter (and I had to do some funky stuff to handle the 64-bit integers in VB6, yet another reason not to use it)

Both programs run the code from a button on an otherwise empty form.

I used option explicit in both (as well as option strict in VB.NET) and I turned on all the speed optimizations I could find for both VB6 and VB.NET. Then I made 2 executables, turned off all my other programs and ran the test.

I was amazed at the results.

VB6 finished in 4151790 ticks.
VB.NET took only 57957 ticks.

This makes VB.NET about 70 times faster for this particular code.

I ran the test at least 10+ more times and received very similar results.

The VB6 program even took a very noticeable amount of time to finish, while the VB.NET program seemed instantaneous. I know I am not an expert benchmarker or anything, and this isn't a real world test. I will acknowledge there is probably some innacuracy to my test, but VB.NET was consistently around 70 times as fast as VB6. So my test does show that VB.NET kicks the crap out of VB6 when it comes to optimizing loops and that is something you will probably use a lot in game development.
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.25 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.