.:: Bots United ::.  
filebase forums irc server wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps waypoints yapb

Go Back   .:: Bots United ::. > Cyborg Factory > United Bot
United Bot The ultimate beast is being given birth right here! Half-Life 2

Reply
 
Thread Tools
Quake II Full Build all setup for .NET
Old
  (#1)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 402
Join Date: Nov 2003
Default Quake II Full Build all setup for .NET - 21-04-2004

Here is something interesting...
The Quake II full source ported to C++ all setup to build, out of the box on .NET

Isn't the CS source base basically Quake II ported to C++ with some new networking code?

http://msdn.microsoft.com/visualc/ho...e/default.aspx

The direct link to the folks who did the port:
http://www.vertigosoftware.com/Quake2.htm

Now, I would not particularly recommend .NET because I am in the process of moving totally to Linux, but this may be interesting for somebody to toy with.

Last edited by Austin; 21-04-2004 at 12:08..
   
Reply With Quote
Re: Quake II Full Build all setup for .NET
Old
  (#2)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,075
Join Date: Nov 2003
Location: Netherlands
Default Re: Quake II Full Build all setup for .NET - 21-04-2004

this is interesting indeed. In fact, if we can 'port it back' into native C/C++ and make it compile and work with CS maps (probably not that hard to doo), we could eventually even try to update the engine. Well, we could try that


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
   
Reply With Quote
Re: Quake II Full Build all setup for .NET
Old
  (#3)
Wei Mingzhi
Member
 
Status: Offline
Posts: 11
Join Date: Apr 2004
Default Re: Quake II Full Build all setup for .NET - 22-04-2004

Quote:
Originally Posted by Austin
Isn't the CS source base basically Quake II ported to C++ with some new networking code?
Nope, the HL/CS source code is NOT based on Quake 2 ! It's based on the ancient Quake 1. If you look into these two versions of Quake, you'll find lotsa things in Quake1 is very similar to HL, but Quake2 is not.

Edited: I've just downloaded that source code, but I've found it NOT pure C++. Only a little code is C++, the major of the code is still the plain C.

Whistler

Last edited by Wei Mingzhi; 22-04-2004 at 14:08..
   
Reply With Quote
Re: Quake II Full Build all setup for .NET
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Quake II Full Build all setup for .NET - 22-04-2004

The Doom/QuakeI/QuakeII series of games have indeed been developed at times where C++ compilers were not really producing CPU efficient code. They've come some way since.

It won't prevent me to prefer good ole ANSI C, but still...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
   
Reply With Quote
Re: Quake II Full Build all setup for .NET
Old
  (#5)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 402
Join Date: Nov 2003
Default Re: Quake II Full Build all setup for .NET - 23-04-2004

Quote:
Originally Posted by Pierre-Marie Baty
...
It won't prevent me to prefer good ole ANSI C, but still...
Our #1 coder not using C++...

To get a jump start into C++,
When you see class, REPLACE it with struct and rebuild!

Conceputally you can grasp C++ much much faster going through the tutorials first thinking of classes as a structs that can also have functions defined in them.

I think the only difference is all member functions and variables become global using struct instead of class.
   
Reply With Quote
Re: Quake II Full Build all setup for .NET
Old
  (#6)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Quake II Full Build all setup for .NET - 23-04-2004

I *know* how C++ works Mark, I've already written stuff in C++ and hacked proggies that were written in C++, but why do you guys all want to push me to switch over ?

I prefer C because it's more demanding. You need to put a lot of clarty and structuration into a C program to make it work efficiently. You must be able to tell for each variable where it applies, what's its purpose and what's its scope. You must have a complete understanding of the whole program in all cases. The C++ withdraws this responsibility from the programmer... and for this reason I prefer C.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
   
Reply With Quote
Re: Quake II Full Build all setup for .NET
Old
  (#7)
Lazy
Member
 
Lazy's Avatar
 
Status: Offline
Posts: 236
Join Date: Jan 2004
Location: Toronto, Ontario, Canada
Default Re: Quake II Full Build all setup for .NET - 23-04-2004

What would have actually impressed me would be if they ported the entire game to C#.
Managed C++ is good but it takes the fun out of developing a managed application.
   
Reply With Quote
Re: Quake II Full Build all setup for .NET
Old
  (#8)
Austin
Moderator
 
Austin's Avatar
 
Status: Offline
Posts: 402
Join Date: Nov 2003
Default Re: Quake II Full Build all setup for .NET - 23-04-2004

Quote:
Originally Posted by Pierre-Marie Baty
I *know* how C++ works Mark, I've already written stuff in C++ and hacked proggies that were written in C++, but why do you guys all want to push me to switch over ?
PM, I have no idea of your understanding of C++.

My only intention, ok ok my TWO intentions ;-) were:

1) IF you have not spent much time with C++, then knowing that at first you can think of class as struct is an enormous benefit in getting over the initial jolt of the syntax and concepts of C++, of which most all C++ tutorials and books never mention… . So I didn't know but thought that IF you were just starting out with C++ I would throw this help your way, and also help anyone who may read this.

2) C++ Is much better IF it is properly used. Class global variables are way more organized then global or module global variables (static, global to a file). Functions associated with the data they operate on are way more organized then disparate global functions and data. The very first look I had at the pod source I thought all the wp stuff would be a perfect candidate for a class as well as a bot class.

If C++ is used improperly it can become nightmarish. A perfect example of this IMHO is the "standard" C++ practice everyone was pushing when the language came out, of having accessor functions to get/set all of the class variables!!!

So you tell me for a simple class with like 10 member variables I would go from managing ten variable names to 30 names (a get and set function name plus the original variable name! Not to mention writing the tiny functions themselves to get /set the actual variable) What A mess!
But well written C++ is much better to deal with, really it is. But still, even so it doesn't save any time in developing small to medium applications (if you consider the time to develop helper classes) . The calling object interface may become simpler, but the code underneath in the classes is just as complicated as it always was to write, with the exception of some help from well-designed helper-utility classes.

But C++ was a patched on upgrade to c (anyone remember the first c++ compilers that were preprocessors to turn the C++ into totally unreadable C that was then fed to your C compiler?) and many things were changed in C++ to "Fix" problems in C. And C++ isn't even "really" truly object oriented since Main() isn't an object!

The short answer, because well written C++ that takes advantages of the new features of the language is really much better to program in!

P.S.
Just having fun!

Last edited by Austin; 23-04-2004 at 07:48..
   
Reply With Quote
Re: Quake II Full Build all setup for .NET
Old
  (#9)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,075
Join Date: Nov 2003
Location: Netherlands
Default Re: Quake II Full Build all setup for .NET - 23-04-2004

In fact, i use C++ in a minimum way. I use classes so i keep my code more organized. It also prevents me from messing up variables which i should never modify. Classes can restrict you to that. So when a variable gets changed, its my fault

As an example, i have written a small RTS engine (yes i love RTS) in C only. It was ONE huge file (mind, this was the first in C ever i did, hence the first huge program i did in C) with tons of functions, global vars, etc. Eventually you end up with this naming convention:

int game_var_score_of_player;
int game_var_score_of_ai;

etc. Perhaps a bad example, but you get the idea. Now, i use something like:

class cGame
{
public:
tPlayers player[MAX_PLAYERS]; // x amount of players in the GAME
};

and in tPlayer:

struct tPlayer
{
int score;
int credits;
... etc
}

It keeps the code way more organized. I can send you this (compilable!) source... or a binary file to show you how it looks like and how it plays...


Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me
   
Reply With Quote
Re: Quake II Full Build all setup for .NET
Old
  (#10)
Wei Mingzhi
Member
 
Status: Offline
Posts: 11
Join Date: Apr 2004
Default Re: Quake II Full Build all setup for .NET - 23-04-2004

I only converted the bot_t struct in the original PODBot source code to a class because that will be handy in MSVC.

I thinks using too many classes (especially virtual functions) will reduce the performance.

Whistler



   
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com