.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 1 SDK (http://forums.bots-united.com/forumdisplay.php?f=33)
-   -   single/multiplayer source? (http://forums.bots-united.com/showthread.php?t=350)

sPlOrYgOn 14-01-2004 00:17

single/multiplayer source?
 
does anyone know whats the difference between ./Multiplayer Source/ and ./Single-Player Source/ directories?(beside their names)
They look exactly the same to me.

Pierre-Marie Baty 14-01-2004 00:37

Re: single/multiplayer source?
 
There is additional code in the single-player source that is used to build a game and a client DLLs that support single player missions (which multiplayer source does not). Single player DLLs differ a bit from multiplayer DLLs because they need to implement rather complicated things that are specific to single-player gaming, such as save/restore features and seamless transition between maps.

In short, only use the single-player source if you want to code something that will make use of single-player features ; use the multiplayer source for all the rest.

sPlOrYgOn 14-01-2004 00:50

Re: single/multiplayer source?
 
so do bots use multiplayer or single player?
I saw in HPBBot's DSP that botman used single player.

Pierre-Marie Baty 14-01-2004 03:26

Re: single/multiplayer source?
 
bots use the multiplayer SDK.

It's not botman who changed the .dsp file of the HPB bot plugin, but myself - since I am one of the weirdos who use the single player stuff for everything. Anything that can compile with the multiplayer SDK will compile with the single-player one - the contrary is not true, that's why.

sPlOrYgOn 14-01-2004 03:29

Re: single/multiplayer source?
 
oh okay

botman 14-01-2004 14:49

Re: single/multiplayer source?
 
The other big difference between the single player source and the multiplayer source is that the single player souce code has all of the Monster AI code. The multiplayer source code just has stubs (empty functions) for the Monster AI code (see mpstub.cpp in the multiplayer source as an example).

The code in the Single Player directory will allow you to build a DLL that will support both single player and multiplayer (exactly like the valve\dlls\hl.dll file does). If you want a MOD that has single player levels and multiplayer maps, use the Single Player source). If you want a MOD that's just multiplayer only, use the Multiplayer source.

The problem with the HPB bot hooking the game DLL caused problems with the Save/Restore code and you couldn't transition between maps (since this game feature automatically used the save/restore code). I had to modify the HPB bot hook code so that people could still play Half-Life single player whenever they had the HPB bot installed in the 'valve' directory.

botman

Pierre-Marie Baty 14-01-2004 15:11

Re: single/multiplayer source?
 
...yes, by building your own exports array and hooking on FunctionFromName() and NameForFunction(), but AFAIK you didn't make use of anything really specific to single-player in the SDK, am I right ?

botman 15-01-2004 15:48

Re: single/multiplayer source?
 
Right, nothing in the single player game code was changed.

The only change was faking out the NameForFunction() and FunctionFromName() to get the save game code to work properly.

botman


All times are GMT +2. The time now is 17:12.

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