.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 2 SDK (http://forums.bots-united.com/forumdisplay.php?f=62)
-   -   VC++ or VC .net? (http://forums.bots-united.com/showthread.php?t=3312)

gerbopel 01-01-2005 15:27

VC++ or VC .net?
 
To develop AI code for a HL2 MOD do I need .NET or can I get by with VC++ 6.0? Is it designed for .NET or VC++ 6.0?

Cheers,
Gerb

Cpl. Shrike 01-01-2005 16:04

Re: VC++ or VC .net?
 
Both can be used. Read this almost at bottom of page.

http://www.valve-erc.com/srcsdk/faq.html#faqCompiler2

koraX 01-01-2005 19:14

Re: VC++ or VC .net?
 
don't use MSVC 6.0. It has many ugly bugs, mainly in STL and C++ core.

@$3.1415rin 01-01-2005 19:35

Re: VC++ or VC .net?
 
there was something like 6.x after 6.0. ( you can't look up when you're not at home, that making me crazy ;) ) that 6.x had a lot better browse functionality, in .net it's just luck if it works, and some functions were even removed.

and for slower computers .net isnt the best choice, the compiler is significantly slower, although some stuff like asm intrinsics etc are now working by default, no update needed there.

stefanhendriks 01-01-2005 19:44

Re: VC++ or VC .net?
 
MSVC rocks. Its fast, it works, and i tried .Net , its slow as hell and it did not work as i wanted it to work.

Btw, the .net framework, sucks as well , imo. I don't need it, i don't even *want* to need it

sfx1999 01-01-2005 20:04

Re: VC++ or VC .net?
 
I use MinGW. How would I use that with HL2?

Whistler 02-01-2005 07:28

Re: VC++ or VC .net?
 
well unfortunately I don't think MinGW can be used with HL2 because it don't know what "__asm" is.
But for HL1 it's perfect :) and unlike MSVC6, it also complies with ANSI C/C++ Standards

M$ also has a "command-line compiler" which you can get for zero price, not sure if that works with HL2

(I don't want to touch a certain sensitive topic this time)

Quote:

Originally Posted by @$3.1415rin
there was something like 6.x after 6.0. ( you can't look up when you're not at home, that making me crazy ) that 6.x had a lot better browse functionality, in .net it's just luck if it works, and some functions were even removed.

I don't think there is a MSVC 6.x - http://msdn.microsoft.com/visualc/
but there are several hhhhhhuuuuuuuuuuuggggggeeeeeee service packs (really huge!!!) for MSVC6

sfx1999 02-01-2005 09:56

Re: VC++ or VC .net?
 
Well, not all of it is ANSI compliant. A long long (64-bit int) is a POSIX thing I believe.

Anyway, it is possible to write alternative code. I bet it is already in there due to the Linux version.

koraX 02-01-2005 11:58

Re: VC++ or VC .net?
 
DO NOT USE MSVC6.0.
Newset service pack for MSVC6.0 is version 6 and there is also a processor pack for MSVC6.0, but is is still buggy. If you insist on using MSVC6.0, download newest Platform SDK from Microsoft and patches for C++ from dinkumwares site.

If .NET is too slow for you, use MinGW.

About __asm, MinGW uses gcc style of asm.
Example between Microsofts style and MinGW :
Code:

#if defined __unix__ || ( defined _WIN32 && defined __GNUG__ )
        // this is for gcc and MinGW
        __asm__ __volatile__ (
                "rdtsc\n\t"
        : "=A" (cycles)
        : );
#endif

#if defined _WIN32 && !defined __GNUG__
        // this is for MSVC
        __asm {
                push eax
                push edx
                rdtsc
                mov dword ptr [cycles],eax
                mov dword ptr [cycles+4],edx
                pop edx
                pop eax
        }
#endif

long long is not defined in ISO C++ standard, but it is supported both by gcc/MinGW and MSVC.NET. However I recommned not using long, because it is represented differently in 64bit systems (ling is 64b in unix64 and 32b in WIN64)

And for those whiners who don't use MinGW because it does not have IDE, well look here http://www.bloodshed.net/dev/devcpp.html

Whistler 02-01-2005 14:16

Re: VC++ or VC .net?
 
can't seem to open the bloodshed.net site but here is also the official download for Dev-Cpp:
http://sourceforge.net/projects/dev-cpp

There is also KDevelop for GNU/Linux (which is part of KDE) which can be used for editing the source code. You can also use GNU Emacs (with syntax highlighting, auto formatting the code and so on, for both GNU/Linux and Windows) but it's just an editor and not an IDE.

another thing is: do *NOT* use the MinGW version shipped with Dev-Cpp. it has bugs which can't compile HL bots. Download the MinGW which works for HL here:
http://prdownloads.sourceforge.net/m...1.exe?download

P.S., actually the MinGW compiles kinda slowly... but the original GCC under GNU/Linux isn't slow, dunno if this is M$'s fault or MinGW hacker's fault. But I don't care about it due to the reasons some of you may already know :)

Pierre-Marie Baty 02-01-2005 16:32

Re: VC++ or VC .net?
 
I don't like the VS .NET IDE. It's not very practical for pure C programs. What I like in the MSVC 6 IDE is that dropdown menu where you can type the beginning of a function's name, and it takes you right there. And the right-click-browse-to-definition shortcut too. In .NET it's not as practical, the dropdown lists the functions that are in the current file only, if you want to browse to another one without knowing exactly where it is you need to use the class explorer thingy on the left side of the screen. And you can't type the beginning of the function's name anymore, it doesn't allow you to. That sucks big time, because these 2 features save me a lot of time when I code :( That's why I went back to 6 when I tried .NET.

The Storm 09-01-2005 22:21

Re: VC++ or VC .net?
 
Well I very like and use Microsoft Visual Studio 2003 .NET.
It work very good for me. Maybe is because I have fast computer :).
I don't like Microsoft Visual Studio C++ 6.0 because it have some bugs in "Linking".
And I wont to ask who is the better edition of Microsoft Visual Studio 2003 .NET because it have 3 editions.
I currently use Microsoft Visual Studio NET 2003 Enterprise Architect.

Maleficus 25-01-2005 11:03

Re: VC++ or VC .net?
 
I use MSVC 6.0 Enterprise and have never had any problems. It works perfectly, is fast and tight, and does what I want it to do.

I don't even really know WHY you would need all the baggage and crap that .NET brings for a game, unless you like your games bloated and really slow. o_O:|

@$3.1415rin 25-01-2005 14:24

Re: VC++ or VC .net?
 
you are not automatically using any .NET stuff in your compiled stuff, unless you explicitly want that. if the VC.net compiler is slower than the 6.0 ... dunno, ok, compiling takes longer, but I havnt done any benchmarks with the compiled results

Lazy 25-01-2005 20:37

Re: VC++ or VC .net?
 
Bah, I don't see why the hate against .NET...
It does get JITed into native code the first time it's run and not that much slower than using somthing like C.

But still, the right tool for the right job...
I still use C if it has to be cross-platform or needs alot of speed but if its a windows program with a GUI .NET makes it really easy and fast to develop.

By the way, visual studio .NET 2002 allows function name completion, just type something like SetWindowsHoo then press the ( I think its control-space ) key and it fills out the name or brings up a list if theres more than one match.


All times are GMT +2. The time now is 08:36.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.