Post

 Resources 

Console

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

 All Forums
 VBGamer
 VBGamer
 Making a Decision

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
Tectra Posted - Jun 30 2005 : 2:09:46 PM
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.....
15   L A T E S T    R E P L I E S    (Newest First)
VBBR Posted - Jul 18 2005 : 07:17:19 AM
I kinda like Python... it's good for a script language :)
Eric Coleman Posted - Jul 17 2005 : 8:28:30 PM
As history has shown us,
C is slower than Assembly
C++ is slower than C
VB is slower than C++

Then why would anyone assume that VB.NET is automatically faster than it's predecessor? And a loop multiplying a number is an oversimplified test that means absolutly nothing.

A real game is more than just a single loop.

And if you're so proficient in C++ or C#, then why convert the SDK examples to VB.NET? Just use C# since you already know the language and save yourself some time.

And as for a VB6 versus VB.NET discussion, it is really like comparing apples to oranges. As Straun pointed out earlier in this thread, any similarties between the two are simply for backwards compatibilty and shouldn't be used at all. While we're on the subject, you might as well compare VB to C++, JAVA, Python, Perl, etc. If speed is so important, then I'm sure at least one of those languages will be better than VB6.
Struan Posted - Jul 14 2005 : 12:24:30 AM
Yeah, VB5 was ever so slightly faster than VB6 :)
timbo152k Posted - Jul 13 2005 : 11:41:26 PM
"What gets me is why would people even assume that VB.NET could be slower? Why would anyone produce a new programming language that was slower than its predecessor?"

It does happen.. Sometimes speed/performance is sacraficed for an easier, less time-consuming (cheaper, for the boss) programming experience.. Abstraction can be good, but it can be a bottleneck to performance if implemented poorly.
Vankwysha Posted - Jul 13 2005 : 05:09:54 AM
I don't have any VB6 code, I didn't use DirectX when I was using VB6 and I don't have VB6 anymore, I was just saying that displaying text is something that I was having trouble with. I've seen an old post by Knight Chat X which has cleared up most of my problems :).
Almar Posted - Jul 13 2005 : 04:40:49 AM
Could you post your VB6 code?:)

Vankwysha Posted - Jul 12 2005 : 8:27:24 PM
I'm not saying that strings are going to be the bottleneck, far from it, I just think it's another area that should be tested to see the difference in speed between 6 and .NET. The only real area where I've had trouble with strings up until this point in my game is displaying them, which I find reduces my FPS by heaps.
Struan Posted - Jul 12 2005 : 7:55:14 PM
What kind of string benchmark? Searching? Sorting? Concatenating? There is a lot you can do with strings. I can't think of a practical situation where strings would be the bottleneck in your game anyway, but I would be happy to do a benchmark if you came up with something. I won't have much time to write it until next week maybe not until the week after that.
Vankwysha Posted - Jul 12 2005 : 7:22:17 PM
What gets me is why would people even assume that VB.NET could be slower? Why would anyone produce a new programming language that was slower than its predecessor? I think that Struan's benchmarks show that VB.NET is faster for most practical gaming purposes. Struan, if at all possible, I think a string benchmark would also be useful.
Struan Posted - Jul 12 2005 : 01:42:15 AM
It seems I was too quick to jump to my 70 times faster conclusion. I decompiled the VB.NET to see what optimizations it made and I found out it turns For Loops into Do Loops automatically (I think I knew that before and I forgot). So I rewrote the code for VB6 into the same Do Loops that VB.NET uses in its MSIL state and managed to get the VB6 down to the much more reasonable 626936 ticks although it is still about 10 times slower than VB.NET
Struan Posted - Jul 12 2005 : 01:10:26 AM
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.
Struan Posted - Jul 11 2005 : 11:13:08 PM
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)
dxgame Posted - Jul 11 2005 : 10:42:47 PM
"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. ;)
Struan Posted - Jul 11 2005 : 8:33:10 PM
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?
Vankwysha Posted - Jul 11 2005 : 7:45:20 PM
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

VBGamer © Go To Top Of Page
This page was generated in 0.17 seconds. Snitz Forums 2000

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