.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   YaPB (http://forums.bots-united.com/forumdisplay.php?f=55)
-   -   First beta release of YaPB 2 (http://forums.bots-united.com/showthread.php?t=5283)

jeefo 19-05-2006 18:01

Re: First beta release of YaPB 2
 
Make dll less biggger is not a point to use dynamic memory allocation. Dynamic memory allocation allows to save memory at runtime (ie. RAM). Currently yapb2 uses old method for storing language translations, ie. there are predefined arrays of chars that uses constant array size (512), whatever the size of the string stored in this array.

Currently yapb2 uses something like that:
PHP Code:

char szTextStr[512];
char szCpy[] = "this is string";

strcpy (szTextStrszCpy); 

So the source string has length = 14, and allocated size = 512, so we waste 498 bytes of memory.

And the original yapb uses something like that:
PHP Code:

char *szTextStr;
char szCpy[] = "this is string";

szTextStr strdup (szCpy); 

In this way we waste nothing :)

The Storm 19-05-2006 18:34

Re: First beta release of YaPB 2
 
Check EPB. With std:string you waste nothing too. :) Dinamic string... ;)

jeefo 19-05-2006 18:39

Re: First beta release of YaPB 2
 
Ofcourse, but i'm don't like to use Standard Template Library, because of several reason, thats why i've write "handmaded" versions of std::vector and std::string.

The Storm 19-05-2006 21:01

Re: First beta release of YaPB 2
 
Can you tell me the reasons that you don't like to use STL ? I'm interested. :)

jeefo 19-05-2006 21:49

Re: First beta release of YaPB 2
 
Well i can't explain everything in english, but main reasons is that it's make output binary more huge (yapb2 with debug build = 1.02Mb, yapb2 with debug build + STL = 1.37Mb, on VC++Pro8), staticly linked against STL because "new" versions of VC uses non-standard dll binaries (msvcp80.dll), sometimes my friends has some errors using soft on different linux distros, with segmentation faults on libstdc++.so, and i don't like to code with STL, code style, tons of template parametrs, and all those allocators and stuff.

It's just my opinion... :)

The Storm 20-05-2006 10:46

Re: First beta release of YaPB 2
 
I have VC++ 2005 and VC++ 2003. The 2003 one is much better for such stuff than 2005. In 2005 MS try to import their own standart witch I don't like. I think that VC++ 2003 fits the C++ standarts perfect and you will not have problems running you app on differend Windows OS's because it use the standart dll binaries. :) Btw STL have most of the power in C++. You can do some things very easy with already predefined functions.

jeefo 20-05-2006 11:48

Re: First beta release of YaPB 2
 
Ok lets stop this. Its a complete offtop. :) The ms standard can be switched off by #pragma warning (disable : 4996) :) And i don't own VS 2003.

Ancient 20-05-2006 19:59

Re: First beta release of YaPB 2
 
Everything seems fine, but the yapb_quota thing is kind of confusing at first, I added like 17 addbot's at the end of the cfg file..

The bot's skill I set them at 60 - 70 and it seems like 2 or 3 shots and your dead, these bot's are alot harder than podbot mm.
The aim is deadly accurate.
I like it :)
Everything works well, it's just the bot's take forever for all of them to join the server.
I use listenserver.

Seems like old pb 2.6, like nothing has been changed just few commands and verion sayings and thats it :P
It was frustrating to edit the liblist.gam because the attributes were changed to read-only.
I see that there are 2 dll's, 1 PODBot.dll and other yapb.dll, which one should be directed to by metamod plugins.ini?

Whistler 21-05-2006 03:42

Re: First beta release of YaPB 2
 
podbot.dll is the old YaPB while the yapb.dll is this version.

and actually there _are_ a lot of changes :)

The Storm 21-05-2006 09:23

Re: First beta release of YaPB 2
 
Where I can see the changes? :)


All times are GMT +2. The time now is 11:26.

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