.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   n00b: Linux/C++ (http://forums.bots-united.com/showthread.php?t=1069)

dead bwoy 11-03-2004 20:17

n00b: Linux/C++
 
wassup coders.
so i want to learn how to make a bot.
I am also learning Linux to setup a Linux HLDS.
1) Is there a good program to use for C++ in windows?
2) Would it be better to learn c++ in linux or windows?
3) What would be a good c++ compiler for me?
4) Are the compilers different for progs done in different os's (Linux/Win)? IE: If I compiled something in linux, would it run in windows?
5) Which distro of Linux is best for HLDS's?
Thank you for your time and patience.
I know it takes time, but I learn quickly, I am already familliar with AMX plugin scripting, which looks REALLY similar to, if not C++. I am also an old DOS user, so Linux is very appealing to me.
Feedback please:

Lazy 11-03-2004 20:32

Re: n00b: Linux/C++
 
1. If you want to spend the money visual C++ is a good compiler and visual programming tool. Other than that there are some free ones kicking around.

2. Thats a tough one, whatever OS you are more comfortable in would be a better start.

3. See 1.

4. You would need to port it in some cases, if it's a simple console application that uses standard io then there shouldn't be too much problems.

5. Not sure, about that one but try Mandrake.

Don't get small ( amx ) confused with c++, since small is a subset of C and it works VERY differently.

If you really want to get a good understanding of C++ I suggest buying a book on it, preferably a large book with lots of content.

dead bwoy 11-03-2004 21:13

Re: n00b: Linux/C++
 
Thanks for the info on small! I'm sure that will avoid future confusion. As far as books... I've actually found plenty of C++ tutorials @ google.

Mandrake seems like its a beginners linux, is that true? Would Mandrake be best for a HLDS server?
or does it really matter which distro I use?

Anyone know of any good FREE C++ programming appz/toolz? Can Dreamweaver MX be used for C++? If so, I'd imagine it wouldn't include a compiler...

Cpl. Shrike 11-03-2004 21:21

Re: n00b: Linux/C++
 
It doesn't really matter which distro you use for running HLDS
because all distro's use the newest upto date linux kernel.
Im using RedHat and before that i ran SuSE linux.

As for coding ... im using MS VC++ 6 but that's not an cheap compiler to obtain.
I haven't used other windows compiler so i dunno if they good or not.
On linux i compile with the standard C compiler that's build in almost every linux distro.

-------
edit.

Nope dreamweaver can't compile C code as far as i know.

dead bwoy 11-03-2004 21:38

Re: n00b: Linux/C++
 
So could I pretty much use any text editor to write the code?

With dreamweaver, there's a document type: C#
I pasted some C++ code into the C# document and it all became color coded, so I'm assuming that C# = C++
Am I a retard?

Lazy 11-03-2004 21:43

Re: n00b: Linux/C++
 
C# is a .NET language, although it is very powerful, it is not portable and is very different from C++.

Cpl. Shrike 11-03-2004 21:44

Re: n00b: Linux/C++
 
Nope not retarded.
That's cool if dreamwaver does the coloring at C then it helps to write code.
But it's not a real code checker or debugger. :)

C is not C++

Pierre-Marie Baty 11-03-2004 22:50

Re: n00b: Linux/C++
 
You can use any text editor you want to write C code, provided there's a compiler behind it to compile your source code into some sort of executable.

I only use MS Visual C++'s development IDE because it's (honestly) simply the best, eye-candy, fully-featured, time-saving source code editor available. You can get cheap licenses for it if you're a student or by asking a relative who works in education, since educational licenses for MSVC are WAY cheaper than standard licenses.

About Linux, check the thread "I'm switching over to Linux, got a few Q's" started by botmeister in the C/C++ coding discussions forum.

I personally choosed to develop on Windows for 2 reasons: first, the availability of the MSVC editor :D - and second, that all the games I code for are natively running -and made to run- on Windows first. I hack the code, I compile, I hit a button and poof a listenserver starts up with my bot DLL attached and I can debug it right away. Quite valuable.

C/C++ programs are generally portable between Windows and Linux. However the problem with game programming is not YOUR code, the problem is in the code your DLL will include from the SDK. There is VERY platform-specific code in the HL SDK, that won't allow you for example to compile your code natively on any other compiler than GCC 2.95.3 (with the latest metamod patches), or if not, on a prehistoric compiler. But generally, apart from low-level routines such as directory searching or (obviously) Windows API specific calls, your code should compile and run fine on Windows and Linux. A good C book will teach you what are the facilities that belong to standard C and which are the ones that are platform-specific (put it simply, if you don't find reference for them in your book, then it's platform-specific and you should avoid it like the plague).

dead bwoy 11-03-2004 23:02

Re: n00b: Linux/C++
 
Thank you all!!! you have answered my questions well.
im sure ill be back with more q's in the future, but i think im good to go for now...

Terran 12-03-2004 14:25

Re: n00b: Linux/C++
 
For anyone developing for/at linux:

kdestudio: a powerful development environment for KDE
KDE Studio is an integrated development environment for the KDE. It
delivers a full-fledged IDE for the development of sophisticated C++
KDE applications - including the high utility features you expect from
a modern development environment, such as code completion, dynamic
syntax highlighting and popup function parameter lookup. Debugging is
simplified by tight integration with kdbg in the IDE.
.
KDE Studio supports complex projects, composed of multiple executables,
static or shared libraries, all in one centralized workspace, including
support for multiple targets from a single project. You can explore the
structure of your classes with an intuitive tree view. Functions and
data members are exposed for a quick understanding of library structures.
The class tree is updated on the fly while you type your code.

scite: Lightweight GTK-based Programming Editor
GTK-based Programming with with syntax highlighting support for
many languages. Also supports folding sections, exporting
highlighted text into colored HTML and RTF.

Or some of the "vi"-alikes: elvis, vile, vim

dead bwoy 13-03-2004 19:30

Re: n00b: Linux/C++
 
more great info! Keep it coming!!! Im eating it all up!!! quick-like!

@$3.1415rin 13-03-2004 19:42

Re: n00b: Linux/C++
 
the bloodshed devc++ stuff is also a nice lightweight "development environment"

dead bwoy 13-03-2004 22:30

Re: n00b: Linux/C++
 
anyone know of a "how to compile (for windows)" thread? Im not lazy, I just dont have the time to search this ever growing forum...

MaherG 08-06-2004 11:13

Re: n00b: Linux/C++
 
I'd rather stick to good old Emacs.

Maher

stefanhendriks 08-06-2004 16:30

Re: n00b: Linux/C++
 
@ dead bwoy it depends on what you try to compile. When you use MSVC (i'd advice that) you can mostly open up the DSW file , then just hit F7 to compile it. For any other compiler you have to edit the makefile, and 'make' it.

Ow, for both MSVC and for compiling with any other compiler, you need to set paths correctly though! So, tell us, what compiler do you use?

BAStumm 09-06-2004 03:25

Re: n00b: Linux/C++
 
pico or nano and gcc all from command line here :)

dead bwoy 09-06-2004 04:29

Re: n00b: Linux/C++
 
I've given up on coding for now as all my time is spent on czero customizations, model editing, nav editing, and basic .db and .vdf coding for CSBot. I'm sure I'll give coding another go once all my projects are released as I'd like to create a czero mod. Maybe after this summer...
Just so you know, I was using MSVC trying to compile a czero compatible metamod, which has been released since then (metamodX).

BAStumm 10-06-2004 02:54

Re: n00b: Linux/C++
 
Metamod.org has an official update released recently that is compatible, 1.17.1 or summat.

Pierre-Marie Baty 10-06-2004 08:57

Re: n00b: Linux/C++
 
Yes, and they apparently fixed the crash bug there was with pre-Steam servers. It is now possible for everybody to use the same metamod.


All times are GMT +2. The time now is 07:42.

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