.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   New coder needs help (http://forums.bots-united.com/showthread.php?t=3123)

haha 02-12-2004 21:03

New coder needs help
 
Title says the right thing:) Im a new coder (in c++) i need some help to start it off. I've been reading that a good way to start off with making bots is copy paste or somthing like that and try change some lines and see the diffrence. Well... I've tried it. also i dont know any place to start so if anyone know this.

Is there any totorials on the web that helps on getting out basis of the c++ coding? or is it worth to buy that book and read it?

If there are any good sites to get basis(maybe some more) can you please post it. needed:)

Pierre-Marie Baty 02-12-2004 21:25

Re: New coder needs help
 
It is certainly worth it to buy a book and read it !!

You should get yourself a good reference manual for the C language. Once you know C well, C++ will flow like water. The best reference manual I've read so far is "C: A Reference Manual (5th edition)" (http://www.careferencemanual.com). Note that you'll also need a tutorial book, because a reference manual will tell you how to use the C standard libraries efficiently, how to write clean code and what is the state of the art in programming, but it won't tell you the basics if you've never written some sort of computer program before.

I don't know any good C tutorial book (I sorta didn't need one). But what I would find of the highest importance in such a book would be that the book goes at such a pace that the reader understands fully, *totally*, what he is doing. Everytime. Else you'll end up wrapped in class creation wizards, third-party tools that are supposed to do the work for you and MFC, and in the end you won't understand half of what you code.

What are you experienced in ? PHP ? Javascript ? BASIC ? programmable calculators like Casio or TI ? If you're *completely* new to programming, it won't be easy for you if you start off hacking a bot.

If you want to hack one, perhaps the simplest one for you is botman's HPB_bot template (not the full release).

BAStumm 03-12-2004 02:14

Re: New coder needs help
 
I came from a php background (self taught) and my first attempts at C were with botmans HPB_bot the full version, not the template. PHP and C are similar enough to have some idea whats going on. I wont pretend to be a great C programmer but I manage to get along ok now. Biggest hurdle for me was learning my way about the SDK and how to access various pieces of info from the half-life engine.

haha 03-12-2004 18:10

Re: New coder needs help
 
Quote:

What are you experienced in ? PHP ? Javascript ? BASIC ? programmable calculators like Casio or TI ? If you're *completely* new to programming, it won't be easy for you if you start off hacking a bot
well.. i have a bit experience in C#,

i got some more experience in Javascript, BASIC and some C.

Is there any tutorial's on the net that would help me a bit?

Pierre-Marie Baty 04-12-2004 05:25

Re: New coder needs help
 
Whoa, C#, Javascript, BASIC and C ? You don't need any tutorial dude :) Trust me. Download the HPB_bot template and hack away :)
Start by finding your way around it, and do simple things first. Figure out where are the timers that make the bots chat, for example. Then make them chat a bit more on different occasions. Or try to improve their weapon usage. Or change the welcome text into a glowing text (compare with the source code of other bots)... there are a lot of things to do. Just be creative ;)

koraX 04-12-2004 10:32

Re: New coder needs help
 
http://www.cplusplus.com
http://www-ccs.ucsd.edu/c/index.html

haha 04-12-2004 17:45

Re: New coder needs help
 
Quote:

Whoa, C#, Javascript, BASIC and C ? You don't need any tutorial dude :) Trust me. Download the HPB_bot template and hack away :)
Start by finding your way around it, and do simple things first. Figure out where are the timers that make the bots chat, for example. Then make them chat a bit more on different occasions. Or try to improve their weapon usage. Or change the welcome text into a glowing text (compare with the source code of other bots)... there are a lot of things to do. Just be creative
Well ive done it just seems so difficult... The only things i know the change is, server commands like "addbot" weapon skills and text and some very simple stuff. but well thats a start

@koraX

thanks i will be looking at the links

haha 05-12-2004 17:42

Re: New coder needs help
 
I need help again.

Well I have been reading much about c++ now and c(didnt know so much about c) and i got very good informations and readed some AI guides.

i downloaded potbot 2.6 source and hpb_bot template #4
Well my problem is the files not work anymore.. they been corrupted... everytime i open the file it says somthing strange. but another way i can do this on works.
but i dont know i shall compile the things i made everytime i compile i get a very small dll contains nothing. anyone got this problem or know how to fix?

sfx1999 05-12-2004 20:59

Re: New coder needs help
 
You don't really need to learn C first.

stefanhendriks 05-12-2004 21:25

Re: New coder needs help
 
you learn more from doing things then from reading about it. I'd say, go hack any bot source you can find and use the book as reference.

haha 05-12-2004 22:34

Re: New coder needs help
 
Well now i done it:P

but my question was... i cant go hack podbot 2.6 source or hpb bot template. it says the files are corrupted or missing while i still have them... anyone can help me on that?

Brainz 06-12-2004 03:29

Re: New coder needs help
 
copying new versions over the top might help

Pierre-Marie Baty 06-12-2004 12:55

Re: New coder needs help
 
What is the exact message you get ?

haha 07-12-2004 17:09

Re: New coder needs help
 
Well i am danish. i dont know the exact translate but its says:

The file didnt get found.
or
The file is corrupted.

i am able to open the file and get into the solution window.(im using Microsoft Visual Studio) and i see the cpp. and h, files but when i open them i get the errors

Pierre-Marie Baty 07-12-2004 17:17

Re: New coder needs help
 
There is probably a problem either with your unpacker (unzipping software) or the file has been corrupted while downloading. Try downloading it again and unpack it with the latest version of WinZip or WinRar.

Another problem, would be that your Visual Studio installation is corrupted. Try reinstalling Visual Studio too.

haha 07-12-2004 19:07

Re: New coder needs help
 
i dont really think its my Visual Studio. i am able to open all other files even yapB and podbot 2.6mm. but not hpb bot template or podbot 2.6 source.

either anything wrong with my files ive been trying to redownload them 3 times. no changes... i am able to open them single. but i cant open the completed file that one i can build the dll with. any other way to make the file?

sfx1999 08-12-2004 06:28

Re: New coder needs help
 
I wonder why that happens. CPP and H files are just plain text, so that doesn't really make sense.

Whistler 08-12-2004 07:12

Re: New coder needs help
 
WinZip and WinRAR are all non-free sharewares. Try 7-Zip instead:
http://sf.net/projects/sevenzip
pure technically... zip files compressed by 7-Zip is slightly smaller than those by WinZip and WinRAR.

haha 08-12-2004 14:48

Re: New coder needs help
 
i allready got WinZip. and i can see all the files... i are not able to open the project. i can only open the cpp. and h. files. but the full project together is unavaible. i arent able to build the dll file that i need to see the changes

Pierre-Marie Baty 08-12-2004 15:00

Re: New coder needs help
 
oh, an idea.
Maybe it's been encoded in UNIX format. Check if the end of line characters are LF or CRLF. They should be CRLF (0x0D0A) because Windows is touchy on this point.

haha 08-12-2004 17:39

Re: New coder needs help
 
Ouch. Im bad at theese for shorted words. LF and CRLF never heard of them...

but. i've should have solved the problem now... i got a new message when i open the project now.

somthing about source control i need to install i will that it says it require and see if it helps:)

@$3.1415rin 08-12-2004 18:04

Re: New coder needs help
 
the shorted words are from good old times where you had 'mechanical' printers

CR carriage return
LF Line feed

Cpl. Shrike 10-12-2004 18:20

Re: New coder needs help
 
Didn't you mean "Type Writers"
Printers are still mechanical imho.
There's impact vs none impact printers tho.


@haha.
I don't think source control is required to open up HPBbot template in MSVC.
Double clicking the .dsp or .dsw file should work.

@$3.1415rin 10-12-2004 18:38

Re: New coder needs help
 
yep, right, just to lazy to look that up :)

haha 10-12-2004 18:41

Re: New coder needs help
 
@Cpl. Shrike
Well still no change.

Error on dsw.
The project file 'C:\Documents and Settings\preload\Lokale indstillinger\Temp\_tc\HPB_bot\dlls\HPB_bot.dsp' has been corrupted and cannot be opened

Error on dsp.

The file didnt get foundī

*edit
sry9_9

anyway works now:) thanks for help

Cpl. Shrike 10-12-2004 20:55

Re: New coder needs help
 
Did you find what went wrong ???

Pierre-Marie Baty 10-12-2004 22:03

Re: New coder needs help
 
I found the problem : when it happens, delete the .dsw file and opens the .dsp one. MSVC will recreate a .dsw file. The "source control" (Microsoft's equivalent for CVS) parameters are stored in the .dsw, not in the .dsp, that's why.

haha 10-12-2004 23:27

Re: New coder needs help
 
ok. thanks:)


All times are GMT +2. The time now is 22:55.

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