Post

 Resources 

Console


RE: visual basic? Adam Hoult (2 replies, 0 views) (2000-Jun-23)
-
I agree with most of what Minion said. However your question about speed is VERY subjective. I can show you some pieces of code i wrote a year ago, compared to the same thing if i wrote it now, and expect a 300% speed increase in the new version. Basically it boils down to your coding ability, pure and simple. We're not really talking about trying to squeeze more power out of VB (since all VB is doing is calling a set of API's just like we would do in C++ (ok we are talking about 2D apps here, not hardcore maths in 3d =)) The trick lies in your knowledge of how things work, and endless hours spent researching all the tricks, and functionality which is available to us. For example, I have seen MANY amateur programmers copying data around manually (especially arrays) when a single CopyMemory call will suffice etc. These are all things you pick up over time. Unfortunately VB users are sheltered from many of these things in our everyday application uses, wheras C++ programmers must use these methods from the word go, whatever they are writing, whether it's a game, or an application, so they know them inside out. One thing I have also found in my travels, is when i compare C++ and VB projects, I have found that in about 80% of comparisons, the normal VB Game programmers code tends to do everything, all the time, and in the most complex way. (when i say that, i mean as far as things like drawing the screen, updating AI, etc etc) wheras C++ game coders employ an arsenal of tricks, like time slicing, look up tables etc etc, wheras the average beginner VB coder will do everything the hard way. Thats not to say that it's rubbish, or they are crap at coding, but more along the lines that they simply have not been exposed to the techniques which C++ game coders use to make things run faster than there VB counterpart. Wether this is just because it's easier to understand, or from lack of understanding of how games are written I don't know. The REAL difference in speed between VB and C++ is not caused by the compiler or the language, but how things are written. I'm not saying that VB is as fast as C++ (because we all know it isn't) (I await the day with bated breath, that true pointers appear in VB) but that the more you learn, the faster things will get. Just as with VB7, agreed there will be no real RAW speed increase in code execution, but the actual extra functionality which will be available, will allow things to be exectued FAR quicker, wheras if it was written in VB6, it would take perhaps an extra 40 CPU Cycles per itteration around an array for a type conversion for example etc etc. THIS is why VB has a bad name, not because it's not fast enough, not because it isn't functionally able to perform these tasks, but because we haven't had as much experience in these types of techniques, or in using the functions which have always been available to us, but we have not needed. Also mainly because most beginner VB game programmers do not have access to the information that is needed to get the REAL TIME speed out of the platform itself. This is something which is slowly changing, thanks to sites like VoodooVB, Luckys VB Gaming site, the VBDirectX mailing list and MANY others who have information on these types of things. Slowly this knowledge is being distributed, thanks to the hard work and determination of people who came before you, and even us =) Put it this way, if it wasn't for the C++ coders, writing Type Libraries, porting code, writing tutorials, we wouldn't be where we are today (a great deal of credit goes to patrice scribe !!), and to be honest i have grown tired out of the VB/C++ argument. I'm past caring. I like VB (yes i am competent in C++), i'm a competent VB programmer, I can get great results from VB, and THAT is the only thing that matters to me, and thats the only thing that should matter in ANY argument about VB/C++. Anyway enough ranting, feel free to flame me, and i'll feel free to ignore anyone who does =) Adam Hoult SysOp


-
Up One Level | Back to Forum

RE: visual basic? minion (1 reply) (2000-Jun-23)
I thought... Rag on a Stick (0 replies) (2000-Jun-24)

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 61 visitors within the last 20 minutes
RSS News Feed