PDA

Click to See Complete Forum and Search --> : question about gaming


xstopx81
Aug 3rd, 2000, 03:24 AM
I heard from someone that most games are made in C++. Is this true? I've been programming for for 3 years now and I can't possibly imagine me writing a code for games such as final fantasy... Are these programmers crazy or am I just too far behind... I could make binary search trees to store in some data and print them out on a screen but that's about only thing I can do... If people expect programmers to make those crazy games, I have a LONG WAY TO GO!!!!

Fox
Aug 3rd, 2000, 05:56 AM
Indeed, C/C++ is fast and flexible enough to write games. Actually using DirectX is probably the best way to write games.

All good games I know are made in C/C++...

Aug 3rd, 2000, 10:27 AM
Even though VB is good for games these days (because of DirectX support), I would recommend using C++ because it's a much more flexible language than VB.

Even though it might take a few years to master it, it will defenitly help you out in the long run.

kedaman
Aug 3rd, 2000, 04:34 PM
Although it isn't impossible to do great games in Vb, I've heard some good games actually was done with Vb, and I have myself done pretty much with DirectX

Aug 3rd, 2000, 05:05 PM
I was not implying that VB was bad at it, but if games is what you're insterested in, C++ is the better language.

kedaman
Aug 3rd, 2000, 05:17 PM
I agree C++ Is a lot more flexible, therefore more useful in making games, but with the right tricks you could get as far with VB.

Aug 3rd, 2000, 05:44 PM
I must disagree with your idea regarding getting as far with VB. First of all, C++ produces much faster Applications and smaller file sizes. On top of that, you do not need to have a 3rd party Type Library to translate between the two programs. In C++ they talk directly to each other. This gives C++ yet another speed advantage.

Illuminator
Aug 3rd, 2000, 06:27 PM
I've writte equivilant image processing algorithms in both VB and C++. The image arrays (600X600) took about a tenth of the time to compute in C++ than it did in VB. This is after the bound checking options in VB were turned off.

Results:
VB Median Filter (5X5) region per pixel: 61.45 s
C++ Median Filter (5X5) region per pixel: 5.87 s

Sam Finch
Aug 3rd, 2000, 06:46 PM
Illuminator, are you sure the VB code was compiled, vb is very slow in the IDE but nearly the same speed as C++ when it's compiled. The reason C++ is better for games is that you can use pointers and other tricks to improve the algorithms, because in gaming you have to run the same algorithms loads of times.

kedaman
Aug 3rd, 2000, 07:00 PM
That's what i think you can do in Vb too, but i'm not sure how

Aug 4th, 2000, 08:18 AM
Sam: I must disagree with you on this as well. They are not the same speed when compiled. VB still needs to translate through the runtime files and the Type Library to get to the system, whereas C++ does not.

PsyVision
Aug 5th, 2000, 01:42 PM
The Unreal Editor was written in vb, thats why it so **** slow

parksie
Aug 6th, 2000, 01:44 PM
It's also unstable and tricky to get running in the first place.

kedaman
Aug 7th, 2000, 12:36 PM
That's probably the programmers fault, not VB.

parksie
Aug 7th, 2000, 03:17 PM
Yeah, I think UnrealEd was a quick hack for in-house development. Didn't they rewrite a better one for commercial use?

/\/\isanThr0p
Sep 16th, 2000, 01:15 PM
u can use pointer by the varptr function. it is there even if you never find them in the manuals. and use the copymem api.
That proffesional games need the VB runtimes is because of 'outside game' tools like mapeditors configuration programs, setups, and litte proggies that are perhaps loaded during game for speed independent stuff.

What do you mean by calling the runtimelibries as api?

AND Please tell me more about this!!!!!!!!!!!!!!!!!!!!
>What can you do to minimize the amount of interpretation >to do? I know you can minimize it a bit by using an API to >make a window instead of "Drawing" a window, but what else >can you do?

thanks

Warmaster199
Sep 16th, 2000, 08:20 PM
What I mean when I said using the VBRuntime Libraries as API was that you can Declare functions in the libraries such as VarPtr. Why you have to declare this even if it must be in your program's references, I don't know... But I do know that to use that function, you have to Declare it; You can't get it from the Object Browser.

parksie
Sep 17th, 2000, 04:37 AM
I don't need to on mine...

If I just type VarPtr into the code window it pops up the parameters thingie.

Warmaster199
Sep 17th, 2000, 09:00 AM
I tried it out... Parksie you were right... You don't need to declare it. I typed in Varptr and in tooltip text, "VarPtr(Ptr as Any) As Long". It is clear that pointers are in Visual Basic too.

And /\/\isanThr0p, I just noticed it now, but you wanted to find more about making forms with API's. I won't post the code here because it's a 10KB Bas Module which would extend this page about 40-50 lines. I will say that you can find out how to do this by going to http://www.vbexplorer.com/DirectX4VB
Go to Code or Tutorials and download the windows thing... Also, If you want, I can Email you the code module with a more in-depth version of their code(I got my module somewhere else on net, I forget where).

/\/\isanThr0p
Sep 17th, 2000, 02:41 PM
Hey thanks warmaster.

Of course I'm interested in you more in depth version (whatever that will mean (I'm german))

I used the varPtr some times, but I could not write to an adress used by a C program. I tried it with two VBprogramms changing the value of textboxes and it worked, but not with the C program.!